From: TimePath Date: Wed, 28 Jan 2015 00:08:39 +0000 (+1100) Subject: Remove `-Wno-double-declaration` X-Git-Tag: xonotic-v0.8.1~133^2~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a08620064dbe59abd194f302768d65934b87b6df;p=xonotic%2Fxonotic-data.pk3dir.git Remove `-Wno-double-declaration` --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 9fde71e10..01d0528f5 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -7,8 +7,7 @@ QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversio # We eventually need to get rid of these. QCCFLAGS_WTFS ?= \ - -Wno-field-redeclared \ - -Wno-double-declaration \ + -Wno-field-redeclared QCCFLAGS ?= \ -std=gmqcc \ diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index 0e7b14150..baf25e1cd 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -19,36 +19,36 @@ // // system globals // -entity self; -entity other; -entity world; -float time; -float frametime; +//entity self; +//entity other; +//entity world; +//float time; +//float frametime; -int player_localentnum; //the entnum of the VIEW entity -int player_localnum; //the playernum -float maxclients; //a constant filled in by the engine. gah, portability eh? +//int player_localentnum; //the entnum of the VIEW entity +//int player_localnum; //the playernum +//float maxclients; //a constant filled in by the engine. gah, portability eh? -float clientcommandframe; //player movement -float servercommandframe; //clientframe echoed off the server +//float clientcommandframe; //player movement +//float servercommandframe; //clientframe echoed off the server -string mapname; +//string mapname; // // global variables set by built in functions // -vector v_forward, v_up, v_right; // set by makevectors() +//vector v_forward, v_up, v_right; // set by makevectors() // set by traceline / tracebox -float trace_allsolid; -float trace_startsolid; -float trace_fraction; -vector trace_endpos; -vector trace_plane_normal; -float trace_plane_dist; -entity trace_ent; -float trace_inopen; -float trace_inwater; +//float trace_allsolid; +//float trace_startsolid; +//float trace_fraction; +//vector trace_endpos; +//vector trace_plane_normal; +//float trace_plane_dist; +//entity trace_ent; +//float trace_inopen; +//float trace_inwater; // // required prog functions @@ -60,29 +60,29 @@ void(float w, float h) CSQC_UpdateView; bool(string s) CSQC_ConsoleCommand; //these fields are read and set by the default player physics -vector pmove_org; -vector pmove_vel; -vector pmove_mins; -vector pmove_maxs; +//vector pmove_org; +//vector pmove_vel; +//vector pmove_mins; +//vector pmove_maxs; //retrieved from the current movement commands (read by player physics) -float input_timelength; -vector input_angles; -vector input_movevalues; //forwards, right, up. -int input_buttons; //attack, use, jump (default physics only uses jump) - -float movevar_gravity; -float movevar_stopspeed; -float movevar_maxspeed; -float movevar_spectatormaxspeed; //used by NOCLIP movetypes. -float movevar_accelerate; -float movevar_airaccelerate; -float movevar_wateraccelerate; -float movevar_friction; -float movevar_waterfriction; -float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value) +//float input_timelength; +//vector input_angles; +//vector input_movevalues; //forwards, right, up. +//int input_buttons; //attack, use, jump (default physics only uses jump) + +//float movevar_gravity; +//float movevar_stopspeed; +//float movevar_maxspeed; +//float movevar_spectatormaxspeed; //used by NOCLIP movetypes. +//float movevar_accelerate; +//float movevar_airaccelerate; +//float movevar_wateraccelerate; +//float movevar_friction; +//float movevar_waterfriction; +//float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value) //================================================ -void end_sys_globals; // flag for structure dumping +//void end_sys_globals; // flag for structure dumping //================================================ /* @@ -141,11 +141,11 @@ void end_sys_globals; // flag for structure dumping .entity owner; // who launched a missile //================================================ -void end_sys_fields; // flag for structure dumping +//void end_sys_fields; // flag for structure dumping //================================================ // Additional OPTIONAL Fields and Globals -float intermission; +//float intermission; float scoreboard_showscores; float scoreboard_showaccuracy; .string message; diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 22b814f2d..e9591e51d 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -299,8 +299,6 @@ void PostInit(void) postinit = true; } -float button_zoom; - // CSQC_InputEvent : Used to perform actions based on any key pressed, key released and mouse on the client. // Return value should be 1 if CSQC handled the input, otherwise return 0 to have the input passed to the engine. // All keys are in ascii. diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 88db7ea21..18efb2baa 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -27,7 +27,6 @@ string minimapname; // -------------------------------------------------------------------------- // General stuff -float drawfont; float postinit; float gametype; @@ -38,7 +37,6 @@ float gametype; //.float ctf_state; //.float health; -float FONT_DEFAULT = 0; float FONT_USER = 8; // -------------------------------------------------------------------------- @@ -92,7 +90,7 @@ entity teamslots[17]; // 17 teams (including "spectator team") .void(void) draw2d; .void(void) entremove; float drawframetime; -vector view_origin, view_angles, view_forward, view_right, view_up; +vector view_origin, view_forward, view_right, view_up; float button_zoom; float spectatorbutton_zoom; diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 2456ee804..3e361ffeb 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -4,7 +4,6 @@ vector teamradar_origin2d; // 2D origin vector teamradar_size2d; // 2D size vector teamradar_extraclip_mins, teamradar_extraclip_maxs; // for non-centered radar display float teamradar_size; // 2D scale factor -float hud_panel_radar_scale; // window size = ...qu float v_flipped; float vlen2d(vector v) @@ -167,7 +166,7 @@ void draw_teamradar_link(vector start, vector end, int colors) R_EndPolygon(); } -float hud_panel_radar_scale; +float hud_panel_radar_scale; // window size = ...qu float hud_panel_radar_foreground_alpha; float hud_panel_radar_rotation; vector hud_panel_radar_size; diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index 0e5099936..ec2ddebb7 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -421,7 +421,6 @@ void turret_ewheel_draw() te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16); } -void(entity e, entity tagentity, string tagname) setattachment = #443; void turret_construct() { if(self.tur_head == world) diff --git a/qcsrc/common/deathtypes.qh b/qcsrc/common/deathtypes.qh index e5e87c65f..591c48e17 100644 --- a/qcsrc/common/deathtypes.qh +++ b/qcsrc/common/deathtypes.qh @@ -2,6 +2,15 @@ // Deathtypes, reworked by Samual // ================================ +int DEATH_SPECIAL_START; +int NORMAL_POS; +int DEATH_MONSTER_FIRST; +int DEATH_MONSTER_LAST; +int DEATH_TURRET_FIRST; +int DEATH_TURRET_LAST; +int DEATH_VHFIRST; +int DEATH_VHLAST; + #define DEATHTYPES \ DEATHTYPE(DEATH_AUTOTEAMCHANGE, DEATH_SELF_AUTOTEAMCHANGE, NO_MSG, DEATH_SPECIAL_START) \ DEATHTYPE(DEATH_BUFF_VENGEANCE, NO_MSG, DEATH_MURDER_VENGEANCE, NORMAL_POS) \ @@ -75,7 +84,6 @@ entity deathtypes[DT_MAX]; #define DEATHTYPE(name,msg_death,msg_death_by,position) \ int name; \ - int position; \ void RegisterDeathtype_##name() \ { \ SET_FIRST_OR_LAST(position, DT_FIRST, DT_COUNT) \ diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index cc529f84f..6844d6274 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -1271,6 +1271,38 @@ string notif_arg_spree_inf(float type, string input, string player, float spree) // Initialization/Create Declarations // ==================================== +enum { + NO_CPID +, CPID_ASSAULT_ROLE +, CPID_ROUND +, CPID_CAMPCHECK +, CPID_CTF_CAPSHIELD +, CPID_CTF_LOWPRIO +, CPID_CTF_PASS +, CPID_STALEMATE +, CPID_NADES +, CPID_IDLING +, CPID_ITEM +, CPID_PREVENT_JOIN +, CPID_KEEPAWAY +, CPID_KEEPAWAY_WARN +, CPID_KEYHUNT +, CPID_KEYHUNT_OTHER +, CPID_LMS +, CPID_MISSING_TEAMS +, CPID_MISSING_PLAYERS +, CPID_INSTAGIB_FINDAMMO +, CPID_MOTD +, CPID_NIX +, CPID_ONSLAUGHT +, CPID_OVERTIME +, CPID_POWERUP +, CPID_RACE_FINISHLAP +, CPID_TEAMCHANGE +, CPID_TIMEOUT +// always last +, NOTIF_CPID_COUNT +}; // notification counts const float NOTIF_FIRST = 1; float NOTIF_ANNCE_COUNT; @@ -1278,7 +1310,6 @@ float NOTIF_INFO_COUNT; float NOTIF_CENTER_COUNT; float NOTIF_MULTI_COUNT; float NOTIF_CHOICE_COUNT; -float NOTIF_CPID_COUNT; // notification limits -- INCREASE AS NECESSARY const float NOTIF_ANNCE_MAX = 100; @@ -1430,11 +1461,9 @@ float notif_global_error; #define MSG_CENTER_NOTIF(default,name,strnum,flnum,args,cpid,durcnt,normal,gentle) \ NOTIF_ADD_AUTOCVAR(name, default) \ float name; \ - float cpid; \ void RegisterNotification_##name() \ { \ SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \ - SET_FIELD_COUNT(cpid, NOTIF_FIRST, NOTIF_CPID_COUNT) \ CHECK_MAX_COUNT(name, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \ Create_Notification_Entity( \ /* COMMON ======================== */ \ diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index f4e9339f3..64fe370a2 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -23,8 +23,6 @@ float autocvar_cl_movement_errorcompensation = 0; // engine stuff -const int REFDEFFLAG_TELEPORTED = 1; -const int REFDEFFLAG_JUMPING = 2; float pmove_onground; // weird engine flag we shouldn't really use but have to for now vector csqcplayer_origin, csqcplayer_velocity; @@ -169,8 +167,6 @@ float CSQCPlayer_IsLocalPlayer() return (self == csqcplayer); } -void(entity e, float fl) V_CalcRefdef = #640; // DP_CSQC_V_CALCREFDEF - void CSQCPlayer_SetCamera() { vector v0; diff --git a/qcsrc/csqcmodellib/cl_player.qh b/qcsrc/csqcmodellib/cl_player.qh index 1774eda4c..92ac5481e 100644 --- a/qcsrc/csqcmodellib/cl_player.qh +++ b/qcsrc/csqcmodellib/cl_player.qh @@ -29,8 +29,8 @@ const int CSQCPLAYERSTATUS_PREDICTED = 2; // only ever READ these! .int pmove_flags; const int PMF_JUMP_HELD = 1; -const int PMF_DUCKED = 4; -const int PMF_ONGROUND = 8; +//const int PMF_DUCKED = 4; +//const int PMF_ONGROUND = 8; void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(); diff --git a/qcsrc/dpdefs/csprogsdefs.qc b/qcsrc/dpdefs/csprogsdefs.qc index 3fc4e61ae..3a318cc4a 100644 --- a/qcsrc/dpdefs/csprogsdefs.qc +++ b/qcsrc/dpdefs/csprogsdefs.qc @@ -198,22 +198,22 @@ const int VF_CL_VIEWANGLES_Z = 36; //(float) const int VF_PERSPECTIVE = 200; -const int STAT_HEALTH = 0; -const int STAT_WEAPONMODEL = 2; -const int STAT_AMMO = 3; -const int STAT_ARMOR = 4; -const int STAT_WEAPONFRAME = 5; -const int STAT_SHELLS = 6; -const int STAT_NAILS = 7; -const int STAT_ROCKETS = 8; -const int STAT_CELLS = 9; -const int STAT_ACTIVEWEAPON = 10; -const int STAT_TOTALSECRETS = 11; -const int STAT_TOTALMONSTERS = 12; -const int STAT_SECRETS = 13; -const int STAT_MONSTERS = 14; -const int STAT_ITEMS = 15; -const int STAT_VIEWHEIGHT = 16; +//const int STAT_HEALTH = 0; +//const int STAT_WEAPONMODEL = 2; +//const int STAT_AMMO = 3; +//const int STAT_ARMOR = 4; +//const int STAT_WEAPONFRAME = 5; +//const int STAT_SHELLS = 6; +//const int STAT_NAILS = 7; +//const int STAT_ROCKETS = 8; +//const int STAT_CELLS = 9; +//const int STAT_ACTIVEWEAPON = 10; +//const int STAT_TOTALSECRETS = 11; +//const int STAT_TOTALMONSTERS = 12; +//const int STAT_SECRETS = 13; +//const int STAT_MONSTERS = 14; +//const int STAT_ITEMS = 15; +//const int STAT_VIEWHEIGHT = 16; // Quake Sound Constants const int CHAN_AUTO = 0; @@ -260,7 +260,7 @@ const vector VEC_1 = '1 1 1'; const vector VEC_0 = '0 0 0'; const vector VEC_M1 = '-1 -1 -1'; -const float M_PI = 3.14159265358979323846; +//const float M_PI = 3.14159265358979323846; vector VEC_HULL_MIN = '-16 -16 -24'; vector VEC_HULL_MAX = '16 16 32'; @@ -551,12 +551,12 @@ void(entity own, vector start, vector end) te_lightning3 = #430; void(entity own, vector start, vector end) te_beam = #431; void(vector dir) vectorvectors = #432; void(vector org) te_plasmaburn = #433; -float(entity e, float s) getsurfacenumpoints = #434; -vector(entity e, float s, float n) getsurfacepoint = #435; -vector(entity e, float s) getsurfacenormal = #436; -string(entity e, float s) getsurfacetexture = #437; -float(entity e, vector p) getsurfacenearpoint = #438; -vector(entity e, float s, vector p) getsurfaceclippedpoint = #439; +//float(entity e, float s) getsurfacenumpoints = #434; +//vector(entity e, float s, float n) getsurfacepoint = #435; +//vector(entity e, float s) getsurfacenormal = #436; +//string(entity e, float s) getsurfacetexture = #437; +//float(entity e, vector p) getsurfacenearpoint = #438; +//vector(entity e, float s, vector p) getsurfaceclippedpoint = #439; int(string s) tokenize = #441; string(float n) argv = #442; @@ -585,11 +585,11 @@ void(float bufhandle, float string_index, string str) bufstr_set = #467; float(float bufhandle, string str, float order) bufstr_add = #468; void(float bufhandle, float string_index) bufstr_free = #469; -float(float s) asin = #471; -float(float c) acos = #472; -float(float t) atan = #473; -float(float c, float s) atan2 = #474; -float(float a) tan = #475; +//float(float s) asin = #471; +//float(float c) acos = #472; +//float(float t) atan = #473; +//float(float c, float s) atan2 = #474; +//float(float a) tan = #475; float(string s) strippedstringlen = #476; float(string s) strlennocol = #476; // This is the correct name for the function, but not removing the decolorizedstring mapping. string(string s) decolorizedstring = #477; @@ -601,7 +601,7 @@ string(string s) cvar_defstring = #482; void(vector origin, string sample, float volume, float attenuation) pointsound = #483; string(string search, string replace, string subject) strreplace = #484; string(string search, string replace, string subject) strireplace = #485; -vector(entity e, float s, float n, float a) getsurfacepointattribute = #486; +//vector(entity e, float s, float n, float a) getsurfacepointattribute = #486; #ifdef SUPPORT_GECKO float gecko_create( string name ) = #487; void gecko_destroy( string name ) = #488; @@ -1416,11 +1416,11 @@ float(string s) isfunction = #607; void(entity e, string s) parseentitydata = #608; // assorted builtins -const int STAT_MOVEVARS_TICRATE = 240; -const int STAT_MOVEVARS_TIMESCALE = 241; -const int STAT_FRAGLIMIT = 235; -const int STAT_TIMELIMIT = 236; -const int STAT_MOVEVARS_GRAVITY = 242; +//const int STAT_MOVEVARS_TICRATE = 240; +//const int STAT_MOVEVARS_TIMESCALE = 241; +//const int STAT_FRAGLIMIT = 235; +//const int STAT_TIMELIMIT = 236; +//const int STAT_MOVEVARS_GRAVITY = 242; string(void) ReadPicture = #501; const int PARTICLES_USEALPHA = 1; float particles_alphamin, particles_alphamax; diff --git a/qcsrc/dpdefs/progsdefs.qc b/qcsrc/dpdefs/progsdefs.qc index bb3f106bf..210ad1b8d 100644 --- a/qcsrc/dpdefs/progsdefs.qc +++ b/qcsrc/dpdefs/progsdefs.qc @@ -291,18 +291,18 @@ const int IT_ROCKET_LAUNCHER = 32; const int IT_LIGHTNING = 64; const int IT_EXTRA_WEAPON = 128; -const int IT_SHELLS = 256; -const int IT_NAILS = 512; -const int IT_ROCKETS = 1024; -const int IT_CELLS = 2048; +//const int IT_SHELLS = 256; +//const int IT_NAILS = 512; +//const int IT_ROCKETS = 1024; +//const int IT_CELLS = 2048; const int IT_ARMOR1 = 8192; const int IT_ARMOR2 = 16384; const int IT_ARMOR3 = 32768; const int IT_SUPERHEALTH = 65536; -const int IT_KEY1 = 131072; -const int IT_KEY2 = 262144; +//const int IT_KEY1 = 131072; +//const int IT_KEY2 = 262144; const int IT_INVISIBILITY = 524288; const int IT_INVULNERABILITY = 1048576; diff --git a/qcsrc/menu/xonotic/demolist.qc b/qcsrc/menu/xonotic/demolist.qc index 3b6467421..6882fcc5e 100644 --- a/qcsrc/menu/xonotic/demolist.qc +++ b/qcsrc/menu/xonotic/demolist.qc @@ -24,8 +24,11 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox) ATTRIB(XonoticDemoList, filterString, string, string_null) ENDCLASS(XonoticDemoList) +#ifndef IMPLEMENTATION +// public: entity demolist; // for reference elsewhere entity makeXonoticDemoList(); +#endif void DemoList_Refresh_Click(entity btn, entity me); void DemoList_Filter_Change(entity box, entity me); #endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc index 092355126..ab2886a28 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc @@ -9,9 +9,12 @@ CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab) ATTRIB(XonoticDemoBrowserTab, democlicktype, float, 0) ENDCLASS(XonoticDemoBrowserTab) entity makeXonoticDemoBrowserTab(); +#ifdef IMPLEMENTATION +// private: const float DMO_PLAY = 1; const float DMO_TIME = 2; #endif +#endif #ifdef IMPLEMENTATION void DemoConfirm_Check_Gamestatus(entity btn, entity me) diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index 39653df23..68f951218 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -17,7 +17,10 @@ CLASS(XonoticStatsList) EXTENDS(XonoticListBox) ATTRIB(XonoticStatsList, columnNameSize, float, 0) ENDCLASS(XonoticStatsList) +#ifndef IMPLEMENTATION +// public: entity statslist; // for reference elsewhere +#endif entity makeXonoticStatsList(); #endif diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index 3bf81587c..485071731 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -1,5 +1,4 @@ -entity ka_ball; // traces multiple trajectories to find one that will impact the target // 'end' vector is the place it aims for, // returns true only if it hit targ (don't target non-solid entities) diff --git a/qcsrc/server/bot/bot.qh b/qcsrc/server/bot/bot.qh index 043f8332c..8feedfb26 100644 --- a/qcsrc/server/bot/bot.qh +++ b/qcsrc/server/bot/bot.qh @@ -111,7 +111,7 @@ void bot_serverframe(); void() havocbot_setupbot; -float c1, c2, c3, c4; +//float c1, c2, c3, c4; void CheckAllowedTeams(entity for_whom); void GetTeamCounts(entity other); float JoinBestTeam(entity pl, float only_return_best, float forcebestteam); diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index b6a39ee67..72e580b56 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -7,7 +7,7 @@ float campaign_level; float campaign_won; string campaign_index_var; -float checkrules_equality; +//float checkrules_equality; float CampaignBailout(string s) { diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 8c276919c..1f31addee 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -1,4 +1,4 @@ -float autocvar_sv_cheats; // must... declare... global +//float autocvar_sv_cheats; // must... declare... global float cheatcount_total; .float cheatcount; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index de445d2e1..e4184e284 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -565,7 +565,7 @@ const float ACTIVE_TOGGLE = 3; .void (float act_state) setactive; .entity realowner; -float serverflags; +//float serverflags; .float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator diff --git a/qcsrc/server/mapvoting.qh b/qcsrc/server/mapvoting.qh index 33e03f8e2..72c519c84 100644 --- a/qcsrc/server/mapvoting.qh +++ b/qcsrc/server/mapvoting.qh @@ -12,7 +12,6 @@ string getmapname_stored; float mapvote_initialized; float mapvote_nextthink; -float mapvote_initialized; float mapvote_keeptwotime; float mapvote_timeout; string mapvote_message; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index ce28b4197..3a150b58d 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1034,7 +1034,8 @@ void readlevelcvars(void) //#NO AUTOCVARS END // Sound functions -string precache_sound (string s) = #19; +//string precache_sound (string s) = #19; +// hack float precache_sound_index (string s) = #19; const float SND_VOLUME = 1; diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 8c3895919..d7102cb81 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -42,12 +42,13 @@ void Mutator_Remove(mutatorfunc_t func, string name); // calls error() on fail // register all possible hooks here +// some parameters are commented to avoid duplicate declarations MUTATOR_HOOKABLE(MakePlayerObserver); // called when a player becomes observer, after shared setup MUTATOR_HOOKABLE(PutClientInServer); - entity self; // client wanting to spawn +// entity self; // client wanting to spawn MUTATOR_HOOKABLE(PlayerSpawn); entity spawn_spot; // spot that was used, or world @@ -82,8 +83,8 @@ MUTATOR_HOOKABLE(PlayerJump); MUTATOR_HOOKABLE(GiveFragsForKill); // called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill // INPUT: - entity frag_attacker; // same as self - entity frag_target; +// entity frag_attacker; // same as self +// entity frag_target; // INPUT, OUTPUT: float frag_score; @@ -98,7 +99,7 @@ MUTATOR_HOOKABLE(GetTeamCount); MUTATOR_HOOKABLE(SpectateCopy); // copies variables for spectating "other" to "self" // INPUT: - entity other; +// entity other; MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon); // returns 1 if throwing the current weapon shall not be allowed @@ -119,7 +120,7 @@ MUTATOR_HOOKABLE(BuildMutatorsString); MUTATOR_HOOKABLE(BuildMutatorsPrettyString); // appends ", Mutator name" to ret_string for display // INPUT, OUTPUT: - string ret_string; +// string ret_string; MUTATOR_HOOKABLE(CustomizeWaypoint); // called every frame @@ -156,8 +157,8 @@ MUTATOR_HOOKABLE(GetCvars); MUTATOR_HOOKABLE(EditProjectile); // can edit any "just fired" projectile // INPUT: - entity self; - entity other; +// entity self; +// entity other; MUTATOR_HOOKABLE(MonsterSpawn); // called when a monster spawns @@ -165,18 +166,18 @@ MUTATOR_HOOKABLE(MonsterSpawn); MUTATOR_HOOKABLE(MonsterDies); // called when a monster dies // INPUT: - entity frag_attacker; +// entity frag_attacker; MUTATOR_HOOKABLE(MonsterRespawn); // called when a monster wants to respawn // INPUT: - entity other; +// entity other; MUTATOR_HOOKABLE(MonsterDropItem); // called when a monster is dropping loot // INPUT, OUTPUT: .void() monster_loot; - entity other; +// entity other; MUTATOR_HOOKABLE(MonsterMove); // called when a monster moves @@ -199,9 +200,9 @@ MUTATOR_HOOKABLE(AllowMobSpawning); MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor); // called when a player gets damaged to e.g. remove stuff he was carrying. // INPUT: - entity frag_inflictor; - entity frag_attacker; - entity frag_target; // same as self +// entity frag_inflictor; +// entity frag_attacker; +// entity frag_target; // same as self vector damage_force; // NOTE: this force already HAS been applied // INPUT, OUTPUT: float damage_take; @@ -211,9 +212,9 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate); // called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier // i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage). // INPUT: - entity frag_attacker; - entity frag_target; - float frag_deathtype; +// entity frag_attacker; +// entity frag_target; +// float frag_deathtype; // INPUT, OUTPUT: float frag_damage; float frag_mirrordamage; @@ -222,7 +223,7 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate); MUTATOR_HOOKABLE(PlayerPowerups); // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items. // INPUT - entity self; +// entity self; float olditems; // also technically output, but since it is at the end of the function it's useless for that :P MUTATOR_HOOKABLE(PlayerRegen); @@ -272,8 +273,8 @@ MUTATOR_HOOKABLE(Spawn_Score); // called when a spawnpoint is being evaluated // return 1 to make the spawnpoint unusable // INPUT - entity self; // player wanting to spawn - entity spawn_spot; // spot to be evaluated +// entity self; // player wanting to spawn +// entity spawn_spot; // spot to be evaluated // IN+OUT vector spawn_score; // _x is priority, _y is "distance" @@ -282,20 +283,20 @@ MUTATOR_HOOKABLE(SV_StartFrame); MUTATOR_HOOKABLE(SetModname); // OUT - string modname; // name of the mutator/mod if it warrants showing as such in the server browser +// string modname; // name of the mutator/mod if it warrants showing as such in the server browser MUTATOR_HOOKABLE(Item_Spawn); // called for each item being spawned on a map, including dropped weapons // return 1 to remove an item // INPUT - entity self; // the item +// entity self; // the item MUTATOR_HOOKABLE(SetWeaponreplace); // IN - entity self; // map entity - entity other; // weapon info +// entity self; // map entity +// entity other; // weapon info // IN+OUT - string ret_string; +// string ret_string; MUTATOR_HOOKABLE(Item_RespawnCountdown); // called when an item is about to respawn @@ -312,7 +313,7 @@ MUTATOR_HOOKABLE(PortalTeleport); // called whenever a player goes through a portal gun teleport // allows you to strip a player of an item if they go through the teleporter to help prevent cheating // INPUT - entity self; +// entity self; MUTATOR_HOOKABLE(HelpMePing); // called whenever a player uses impulse 33 (help me) in cl_impulse.qc @@ -320,7 +321,7 @@ MUTATOR_HOOKABLE(HelpMePing); // but if your mutator uses something different then you can handle it // in a special manner using this hook // INPUT - entity self; // the player who pressed impulse 33 +// entity self; // the player who pressed impulse 33 MUTATOR_HOOKABLE(VehicleSpawn); // called when a vehicle initializes @@ -337,40 +338,40 @@ MUTATOR_HOOKABLE(VehicleTouch); // called when a player touches a vehicle // return true to stop player from entering the vehicle // INPUT - entity self; // vehicle - entity other; // player +// entity self; // vehicle +// entity other; // player MUTATOR_HOOKABLE(VehicleExit); // called when a player exits a vehicle // allows mutators to set special settings in this event // INPUT - entity vh_player; // player - entity vh_vehicle; // vehicle +// entity vh_player; // player +// entity vh_vehicle; // vehicle MUTATOR_HOOKABLE(AbortSpeedrun); // called when a speedrun is aborted and the player is teleported back to start position // INPUT - entity self; // player +// entity self; // player MUTATOR_HOOKABLE(ItemTouch); // called at when a item is touched. Called early, can edit item properties. - entity self; // item - entity other; // player +// entity self; // item +// entity other; // player const float MUT_ITEMTOUCH_CONTINUE = 0; // return this flag to make the function continue as normal const float MUT_ITEMTOUCH_RETURN = 1; // return this flag to make the function return (handled entirely by mutator) const float MUT_ITEMTOUCH_PICKUP = 2; // return this flag to have the item "picked up" and taken even after mutator handled it MUTATOR_HOOKABLE(ClientConnect); // called at when a player connect - entity self; // player +// entity self; // player MUTATOR_HOOKABLE(HavocBot_ChooseRole); - entity self; +// entity self; MUTATOR_HOOKABLE(AccuracyTargetValid); // called when a target is checked for accuracy - entity frag_attacker; // attacker - entity frag_target; // target +// entity frag_attacker; // attacker +// entity frag_target; // target const float MUT_ACCADD_VALID = 0; // return this flag to make the function continue if target is a client const float MUT_ACCADD_INVALID = 1; // return this flag to make the function always continue const float MUT_ACCADD_INDIFFERENT = 2; // return this flag to make the function always return diff --git a/qcsrc/server/mutators/gamemode_ca.qc b/qcsrc/server/mutators/gamemode_ca.qc index fd072ab4e..a0f238358 100644 --- a/qcsrc/server/mutators/gamemode_ca.qc +++ b/qcsrc/server/mutators/gamemode_ca.qc @@ -121,9 +121,9 @@ void CA_RoundStart() allowed_to_spawn = false; } -float prev_missing_teams_mask; float CA_CheckTeams() { + static float prev_missing_teams_mask; allowed_to_spawn = true; CA_count_alive_players(); if(CA_ALIVE_TEAMS_OK()) diff --git a/qcsrc/server/mutators/gamemode_cts.qh b/qcsrc/server/mutators/gamemode_cts.qh index 9d6953bcb..575b1fae8 100644 --- a/qcsrc/server/mutators/gamemode_cts.qh +++ b/qcsrc/server/mutators/gamemode_cts.qh @@ -1,4 +1,4 @@ -float g_race_qualifying; +//float g_race_qualifying; // scores const float ST_CTS_LAPS = 1; diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 9efe965ce..d6285cdaf 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -39,9 +39,9 @@ void freezetag_count_alive_players() #define FREEZETAG_ALIVE_TEAMS() ((redalive > 0) + (bluealive > 0) + (yellowalive > 0) + (pinkalive > 0)) #define FREEZETAG_ALIVE_TEAMS_OK() (FREEZETAG_ALIVE_TEAMS() == freezetag_teams) -float prev_missing_teams_mask; float freezetag_CheckTeams() { + static float prev_missing_teams_mask; if(FREEZETAG_ALIVE_TEAMS_OK()) { if(prev_missing_teams_mask > 0) diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index 6ae1f8b5b..2a6731610 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -46,10 +46,10 @@ float kh_Team_ByID(float t) return 0; } -entity kh_worldkeylist; +//entity kh_worldkeylist; .entity kh_worldkeynext; entity kh_controller; -float kh_tracking_enabled; +//float kh_tracking_enabled; float kh_teams; float kh_interferemsg_time, kh_interferemsg_team; .entity kh_next, kh_prev; // linked list diff --git a/qcsrc/server/mutators/mutator_buffs.qh b/qcsrc/server/mutators/mutator_buffs.qh index c96485006..afb34fa9d 100644 --- a/qcsrc/server/mutators/mutator_buffs.qh +++ b/qcsrc/server/mutators/mutator_buffs.qh @@ -8,7 +8,7 @@ .float buff_flight_prev_gravity; // jump .float stat_jumpheight; -const float STAT_MOVEVARS_JUMPVELOCITY = 250; // engine hack +//const float STAT_MOVEVARS_JUMPVELOCITY = 250; // engine hack // disability .float buff_disability_time; .float buff_disability_effect_time; diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 0654d3efd..91eb7cebd 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -2,7 +2,7 @@ string cache_mutatormsg; string cache_lastmutatormsg; // client counts for each team -float c1, c2, c3, c4; +//float c1, c2, c3, c4; // # of bots on those teams float cb1, cb2, cb3, cb4; diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 8704945f2..85aba53fc 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -155,7 +155,6 @@ void WarpZone_Teleported_Read(float isnew) float warpzone_fixingview; float warpzone_fixingview_drawexteriormodel; -float autocvar_chase_active; void WarpZone_View_Outside() { diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index 8b20d0aad..146fdfb83 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -1,6 +1,3 @@ -int trace_dphitcontents; -.float dphitcontentsmask; - void WarpZone_Accumulator_Clear(entity acc) { acc.warpzone_transform = '0 0 0'; diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index a8b6900cb..3f14b9097 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -666,7 +666,7 @@ void WarpZone_InitStep_FinalizeTransform() } float warpzone_initialized; -entity warpzone_first; +//entity warpzone_first; entity warpzone_position_first; entity warpzone_camera_first; .entity warpzone_next; diff --git a/qcsrc/warpzonelib/server.qh b/qcsrc/warpzonelib/server.qh index 7a301a8b8..3c09ea770 100644 --- a/qcsrc/warpzonelib/server.qh +++ b/qcsrc/warpzonelib/server.qh @@ -6,8 +6,8 @@ void WarpZone_PostTeleportPlayer_Callback(entity pl); float WarpZone_Projectile_Touch_ImpactFilter_Callback(); // server must also define a float called ENT_CLIENT_WARPZONE for the initial byte of WarpZone entities -const float ENT_CLIENT_WARPZONE; -const float ENT_CLIENT_WARPZONE_CAMERA; +//const float ENT_CLIENT_WARPZONE; +//const float ENT_CLIENT_WARPZONE_CAMERA; void WarpZone_PlayerPhysics_FixVAngle(void);