agrip/agrip_defs.mqc

Go to the documentation of this file.
00001 /*  Copyright 2004 Matthew Tylee Atkinson
00002 
00003     This program is free software; you can redistribute it and/or modify
00004     it under the terms of the GNU General Public License as published by
00005     the Free Software Foundation; either version 2 of the License, or
00006     (at your option) any later version.
00007 
00008     This program is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011     GNU General Public License for more details.
00012 
00013     You should have received a copy of the GNU General Public License
00014     along with this program; if not, write to the Free Software
00015     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00016 
00017     See file, 'COPYING', for details.
00018 */
00019 
00020 /* $AGRIP-START */
00021 /* AGRIP Definitions */
00022 
00023 // Turn on accessibility features...
00024 #define AGRIP 
00025 
00026 
00041 
00042 
00043 .entity agrip_nav; 
00044 .entity agrip_d5k; 
00045 .entity agrip_esr; 
00046 .entity agrip_aux; 
00047 
00048 // These used to be in qw/defs.qc but were removed:
00049 .float volume;
00050 
00051 // Bot stuff...
00052 void KickABotDM(float clientcalled);
00053 float KickABotTeam(float bteam, float clientcalled);
00054 void create_bot(float bottom, float top, string bteam, float clientcalled);
00055 
00056 // Builtins...
00057 // ZQ experimental bot
00058 entity (string name) testbot = #0x5a0A;
00059 // AGRIP's soundtoclient function
00060 void soundtoclient(entity client, entity e, float chan, string samp, float vol, float atten)
00061 
00062 // For debugging...
00063 void safe_soundtoclient(entity client, entity e, float chan, string samp, float vol, float atten)
00064 {
00065     /* for testing this function...
00066     if( random() > 0.99 )
00067     {
00068         dprint("INITING CRASH...\n");
00069         vol = 42;
00070     }*/
00071 
00072     if( vol < 0 )
00073     {
00074         dprint("PLEASE REPORT THIS BUG, INCLUDING ALL ERROR MESSAGES!\n");
00075         local float i;
00076         while( i < 1000000)
00077         {
00078             i = i + 1;
00079         }
00080     }
00081     else if( vol > 1 )
00082     {
00083         dprint("PLEASE REPORT THIS BUG, INCLUDING ALL ERROR MESSAGES!\n");
00084         local float i;
00085         while( i < 1000000)
00086         {
00087             i = i + 1;
00088         }
00089     }
00090     else
00091     {
00092         soundtoclient(client, e, chan, samp, vol, atten);
00093     }
00094 }
00095 
00096 /* $AGRIP-END */

Generated on Tue Jan 1 17:55:54 2008 for AudioQuake QuakeC by  doxygen 1.5.4