From: TimePath Date: Tue, 15 Mar 2016 07:23:17 +0000 (+1100) Subject: server: pass compilation units test X-Git-Tag: xonotic-v0.8.2~1078 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db2efd7cabe9d2eb3e09f330d9e5c8f951fbf194;p=xonotic%2Fxonotic-data.pk3dir.git server: pass compilation units test --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64863d87c..273b93b81 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,11 @@ before_script: - ln -s $PWD data/xonotic-data.pk3dir +test_compilation_units: + stage: test + script: + - ./qcsrc/tools/compilationunits.sh + test_sv_unit: stage: test script: diff --git a/qcsrc/client/credit.txt b/qcsrc/client/credit.txt deleted file mode 100644 index b07ec4a09..000000000 --- a/qcsrc/client/credit.txt +++ /dev/null @@ -1,3 +0,0 @@ -Credits go to Dresk for putting this CSQC scratch source together. - -and Urre :o diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index a4cac531c..a4e831835 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -12,8 +12,7 @@ #include #include #include -// TODO: remove -#include +#include // TODO: remove /* diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 07703ee37..40b2b3547 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -243,7 +243,7 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame) it.solid_prev = it.solid; it.solid = SOLID_BBOX; }); - vector forward; vector right; vector up; + vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0'; MAKEVECTORS(makevectors, it.v_angle, forward, right, up); vector pos = it.origin + it.view_ofs; traceline(pos, pos + forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, it); diff --git a/qcsrc/common/effects/qc/gibs.qc b/qcsrc/common/effects/qc/gibs.qc index aec664035..45a28a9b4 100644 --- a/qcsrc/common/effects/qc/gibs.qc +++ b/qcsrc/common/effects/qc/gibs.qc @@ -1,3 +1,5 @@ +#include "gibs.qh" + #ifdef IMPLEMENTATION REGISTER_NET_TEMP(net_gibsplash) diff --git a/qcsrc/common/effects/qc/gibs.qh b/qcsrc/common/effects/qc/gibs.qh new file mode 100644 index 000000000..40e083455 --- /dev/null +++ b/qcsrc/common/effects/qc/gibs.qh @@ -0,0 +1,6 @@ +#pragma once + +#ifdef SVQC +void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker); +void Violence_GibSplash(entity source, float type, float amount, entity attacker); +#endif diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index ae1ec7485..68edd6f7e 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -22,7 +22,7 @@ * @param gs the global sound def * @param r a random number in 0..1 */ - void globalsound(int channel, entity from, entity gs, float r, int chan, float vol, float atten) + void globalsound(int channel, entity from, entity gs, float r, int chan, float _vol, float _atten) { assert(IS_PLAYER(from), eprint(from)); if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return; @@ -30,10 +30,10 @@ string sample = GlobalSound_sample(gs.m_globalsoundstr, r); switch (channel) { case MSG_ONE: - soundto(channel, from, chan, sample, vol, atten); + soundto(channel, from, chan, sample, _vol, _atten); break; case MSG_ALL: - _sound(from, chan, sample, vol, atten); + _sound(from, chan, sample, _vol, _atten); break; } return; @@ -43,8 +43,8 @@ WriteByte(channel, r * 255); WriteByte(channel, etof(from)); WriteByte(channel, chan); - WriteByte(channel, floor(vol * 255)); - WriteByte(channel, floor(atten * 64)); + WriteByte(channel, floor(_vol * 255)); + WriteByte(channel, floor(_atten * 64)); entcs_force_origin(from); vector o = from.origin + 0.5 * (from.mins + from.maxs); WriteCoord(channel, o.x); @@ -57,7 +57,7 @@ * @param ps the player sound def * @param r a random number in 0..1 */ - void playersound(int channel, entity from, entity ps, float r, int chan, float vol, float atten) + void playersound(int channel, entity from, entity ps, float r, int chan, float _vol, float _atten) { assert(IS_PLAYER(from), eprint(from)); if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return; @@ -67,10 +67,10 @@ string sample = GlobalSound_sample(s, r); switch (channel) { case MSG_ONE: - soundto(channel, from, chan, sample, vol, atten); + soundto(channel, from, chan, sample, _vol, _atten); break; case MSG_ALL: - _sound(from, chan, sample, vol, atten); + _sound(from, chan, sample, _vol, _atten); break; } return; @@ -80,8 +80,8 @@ WriteByte(channel, r * 255); WriteByte(channel, etof(from)); WriteByte(channel, chan); - WriteByte(channel, floor(vol * 255)); - WriteByte(channel, floor(atten * 64)); + WriteByte(channel, floor(_vol * 255)); + WriteByte(channel, floor(_atten * 64)); entcs_force_origin(from); vector o = from.origin + 0.5 * (from.mins + from.maxs); WriteCoord(channel, o.x); @@ -202,13 +202,6 @@ return NULL; } - string allvoicesamples; - STATIC_INIT(allvoicesamples) - { - FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr)); - allvoicesamples = strzone(substring(allvoicesamples, 1, -1)); - } - .string _GetPlayerSoundSampleField(string type, bool voice) { GetPlayerSoundSampleField_notFound = false; diff --git a/qcsrc/common/effects/qc/globalsound.qh b/qcsrc/common/effects/qc/globalsound.qh index 64ef524ec..306d71988 100644 --- a/qcsrc/common/effects/qc/globalsound.qh +++ b/qcsrc/common/effects/qc/globalsound.qh @@ -113,6 +113,7 @@ void PrecachePlayerSounds(string f); float LoadPlayerSounds(entity this, string f, bool strict); void UpdatePlayerSounds(entity this); //#endif +entity GetVoiceMessage(string type); #ifdef SVQC @@ -136,4 +137,11 @@ void PrecachePlayerSounds(string f); #endif +string allvoicesamples; +STATIC_INIT(allvoicesamples) +{ + FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr)); + allvoicesamples = strzone(substring(allvoicesamples, 1, -1)); +} + #endif diff --git a/qcsrc/common/effects/qc/lightningarc.qc b/qcsrc/common/effects/qc/lightningarc.qc index 5c6b60e0d..8a16a1dc3 100644 --- a/qcsrc/common/effects/qc/lightningarc.qc +++ b/qcsrc/common/effects/qc/lightningarc.qc @@ -1,3 +1,5 @@ +#include "lightningarc.qh" + #ifdef IMPLEMENTATION REGISTER_NET_TEMP(TE_CSQC_ARC) diff --git a/qcsrc/common/effects/qc/lightningarc.qh b/qcsrc/common/effects/qc/lightningarc.qh new file mode 100644 index 000000000..219097540 --- /dev/null +++ b/qcsrc/common/effects/qc/lightningarc.qh @@ -0,0 +1,5 @@ +#pragma once + +#ifdef SVQC +void te_csqc_lightningarc(vector from, vector to); +#endif diff --git a/qcsrc/common/effects/qc/modeleffects.qc b/qcsrc/common/effects/qc/modeleffects.qc index 99272f8cc..84b083b95 100644 --- a/qcsrc/common/effects/qc/modeleffects.qc +++ b/qcsrc/common/effects/qc/modeleffects.qc @@ -1,3 +1,5 @@ +#include "modeleffects.qh" + #ifdef IMPLEMENTATION REGISTER_NET_LINKED(ENT_CLIENT_MODELEFFECT) diff --git a/qcsrc/common/effects/qc/modeleffects.qh b/qcsrc/common/effects/qc/modeleffects.qh new file mode 100644 index 000000000..afa353fae --- /dev/null +++ b/qcsrc/common/effects/qc/modeleffects.qh @@ -0,0 +1,5 @@ +#pragma once + +#ifdef SVQC +void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2); +#endif diff --git a/qcsrc/common/monsters/all.inc b/qcsrc/common/monsters/all.inc index f44cabc5d..778e2a18f 100644 --- a/qcsrc/common/monsters/all.inc +++ b/qcsrc/common/monsters/all.inc @@ -1,5 +1,6 @@ #ifndef MENUQC #include "../animdecide.qh" +#include "../anim.qh" vector animfixfps(entity e, vector a, vector b); #endif diff --git a/qcsrc/common/mutators/mutator/instagib/items.qc b/qcsrc/common/mutators/mutator/instagib/items.qc index 46bda6b69..269ec2d24 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qc +++ b/qcsrc/common/mutators/mutator/instagib/items.qc @@ -1,3 +1,5 @@ +#pragma once + #include #include #include diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index 67057181b..7202547fc 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -2,6 +2,9 @@ #include "bot.qh" +#include +#include + #include "../weapons/weaponsystem.qh" #include "../mutators/all.qh" diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 72ebfcb2e..37079a33c 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -23,6 +23,7 @@ #include "../weapons/accuracy.qh" +#include #include #include #include diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 260e8e661..68ff899ea 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -7,6 +7,8 @@ #include "../waypoints.qh" #include +#include +#include #include #include diff --git a/qcsrc/server/bot/scripting.qc b/qcsrc/server/bot/scripting.qc index 7b349f479..4e867b05b 100644 --- a/qcsrc/server/bot/scripting.qc +++ b/qcsrc/server/bot/scripting.qc @@ -1,5 +1,8 @@ #include "scripting.qh" +#include +#include + #include "bot.qh" .int state; diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 92ee18c1a..a19b2a095 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -3,6 +3,8 @@ #include "bot.qh" #include "navigation.qh" +#include + #include "../antilag.qh" #include diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 555019969..d984c3c38 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -25,6 +25,8 @@ #include "../common/ent_cs.qh" #include +#include + #include "../common/triggers/teleporters.qh" #include "../common/vehicles/all.qh" diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index a525c58f7..bfd24892e 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -11,6 +11,8 @@ #include "weapons/tracing.qh" #include "weapons/weaponsystem.qh" +#include + #include "../common/minigames/sv_minigames.qh" #include "../common/weapons/all.qh" diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 46743ce2e..979e6d860 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -9,6 +9,7 @@ #include "teamplay.qh" #include "weapons/throwing.qh" #include "command/common.qh" +#include "../common/state.qh" #include "../common/anim.qh" #include "../common/animdecide.qh" #include "../common/csqcmodel_settings.qh" @@ -19,6 +20,8 @@ #include "../common/minigames/sv_minigames.qh" +#include "../common/physics/player.qh" +#include "../common/effects/qc/all.qh" #include "../common/mutators/mutator/waypoints/waypointsprites.qh" #include "../common/triggers/include.qh" diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 173a38401..23c57ea6e 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -1,6 +1,5 @@ #include "cmd.qh" #include -#include "cmd.qh" #include "common.qh" #include "vote.qh" @@ -21,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 37ccf37eb..9570f359c 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -5,6 +5,8 @@ #include "mutators/all.qh" #include "scores.qh" #include "spawnpoints.qh" +#include "../common/state.qh" +#include "../common/physics/player.qh" #include "../common/t_items.qh" #include "../common/vehicles/all.qh" #include "../common/items/all.qc" diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index c0509a3f6..86fb14b29 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -8,6 +8,8 @@ #include "cl_player.qh" #include "command/common.qh" #include "round_handler.qh" +#include "../common/state.qh" +#include "../common/physics/player.qh" #include "../common/vehicles/all.qh" #include "../common/constants.qh" #include "../common/util.qh" diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index c9e6921f5..97450cd4c 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -2,6 +2,7 @@ #include "antilag.qh" #include "command/common.qh" +#include "../common/state.qh" #include "../lib/warpzone/common.qh" #include "../common/triggers/subs.qh" diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7a606c3af..6398cbe93 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -34,6 +34,7 @@ #include "../common/util.qh" #include "../common/items/all.qh" #include "../common/weapons/all.qh" +#include "../common/state.qh" const float LATENCY_THINKRATE = 10; .float latency_sum; diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index 3703abad2..cd1cafd36 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -5,11 +5,13 @@ float checkrules_suddendeathwarning; float checkrules_suddendeathend; float checkrules_overtimesadded; //how many overtimes have been already added -const float WINNING_NO = 0; // no winner, but time limits may terminate the game -const float WINNING_YES = 1; // winner found -const float WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached -const float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW +const int WINNING_NO = 0; // no winner, but time limits may terminate the game +const int WINNING_YES = 1; // winner found +const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached +const int WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW +float WinningCondition_Scores(float limit, float leadlimit); +void SetWinners(.float field, float value); void CheckRules_Player(); void IntermissionThink(); void GotoNextMap(float reinit); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 9e40e9d59..77239e7b1 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -23,6 +23,8 @@ #include "../common/vehicles/sv_vehicles.qh" #include "../common/vehicles/vehicle.qh" #include "../common/items/all.qc" +#include "../common/state.qh" +#include "../common/effects/qc/globalsound.qh" #include "../lib/csqcmodel/sv_model.qh" #include "../lib/warpzone/anglestransform.qh" #include "../lib/warpzone/server.qh" @@ -1406,7 +1408,8 @@ float LostMovetypeFollow(entity ent) return 0; } -float isPushable(entity e) +.bool pushable; +bool isPushable(entity e) { if(e.pushable) return true; diff --git a/qcsrc/server/mutators/gamemode.qh b/qcsrc/server/mutators/gamemode.qh index bec3ca98c..ee80b44b0 100644 --- a/qcsrc/server/mutators/gamemode.qh +++ b/qcsrc/server/mutators/gamemode.qh @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,8 @@ #include #include +#include +#include #include #include #include diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index 2f0d89903..e9c31f326 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -3,6 +3,7 @@ #define GAMEMODE_ASSAULT_H void assault_ScoreRules(); +void ActivateTeamplay(); REGISTER_MUTATOR(as, false) { diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qh b/qcsrc/server/mutators/mutator/gamemode_assault.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qh +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc index 23bee3af7..c90f7d178 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -21,6 +21,8 @@ bool CA_CheckWinner(); void CA_RoundStart(); bool ca_isEliminated(entity e); +void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override); + REGISTER_MUTATOR(ca, false) { MUTATOR_ONADD @@ -113,6 +115,8 @@ float CA_GetWinnerTeam() return -1; // no player left } +void nades_Clear(entity player); + #define CA_ALIVE_TEAMS() ((redalive > 0) + (bluealive > 0) + (yellowalive > 0) + (pinkalive > 0)) #define CA_ALIVE_TEAMS_OK() (CA_ALIVE_TEAMS() == ca_teams) float CA_CheckWinner() diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qh b/qcsrc/server/mutators/mutator/gamemode_ca.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qh +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 78d84e244..8cdad3255 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -511,6 +511,8 @@ void shockwave_spawn(string m, vector org, float sz, float t1, float t2) // Event Handlers // ============== +void nades_GiveBonus(entity player, float score); + void ctf_Handle_Capture(entity flag, entity toucher, int capturetype) { entity enemy_flag = ((capturetype == CAPTURE_NORMAL) ? toucher.flagcarried : toucher); @@ -1182,6 +1184,8 @@ void ctf_DelayedFlagSetup() // called after a flag is placed on a map by ctf_Fla ctf_CaptureShield_Spawn(self); } +.bool pushable; + void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc {SELFPARAM(); // declarations diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qh b/qcsrc/server/mutators/mutator/gamemode_ctf.qh index c323cb567..c44dfc374 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qh +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qh @@ -1,6 +1,8 @@ #pragma once #ifdef SVQC + +#include "../gamemode.qh" // used in cheats.qc void ctf_RespawnFlag(entity flag); diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index ff5abeb9d..75c8b5dfe 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -96,6 +96,7 @@ void cts_EventLog(string mode, entity actor) // use an alias for easy changing a GameLogEcho(strcat(":cts:", mode, ":", ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); } +void KillIndicator_Think(); void CTS_ClientKill(entity e) // silent version of ClientKill, used when player finishes a CTS run. Useful to prevent cheating by running back to the start line and starting out with more speed { e.killindicator = spawn(); @@ -384,6 +385,7 @@ MUTATOR_HOOKFUNCTION(cts, GetRecords) return false; } +void ClientKill_Now(); MUTATOR_HOOKFUNCTION(cts, ClientKill) { ret_float = 0; diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qh b/qcsrc/server/mutators/mutator/gamemode_cts.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qh +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_deathmatch.qh b/qcsrc/server/mutators/mutator/gamemode_deathmatch.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_deathmatch.qh +++ b/qcsrc/server/mutators/mutator/gamemode_deathmatch.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_domination.qh b/qcsrc/server/mutators/mutator/gamemode_domination.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qh +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qh b/qcsrc/server/mutators/mutator/gamemode_freezetag.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qh +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qh b/qcsrc/server/mutators/mutator/gamemode_invasion.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qh +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_keepaway.qh b/qcsrc/server/mutators/mutator/gamemode_keepaway.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keepaway.qh +++ b/qcsrc/server/mutators/mutator/gamemode_keepaway.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index 4496b49ea..40e9f6132 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -45,6 +45,7 @@ float LMS_NewPlayerLives(); #ifdef IMPLEMENTATION +#include #include #include @@ -72,6 +73,8 @@ float LMS_NewPlayerLives() return bound(1, lms_lowest_lives, fl); } +void ClearWinners(); + // LMS winning condition: game terminates if and only if there's at most one // one player who's living lives. Top two scores being equal cancels the time // limit. diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qh b/qcsrc/server/mutators/mutator/gamemode_lms.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qh +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_race.qc b/qcsrc/server/mutators/mutator/gamemode_race.qc index 7db3cde96..ce86e50a7 100644 --- a/qcsrc/server/mutators/mutator/gamemode_race.qc +++ b/qcsrc/server/mutators/mutator/gamemode_race.qc @@ -1,4 +1,5 @@ #include "gamemode_race.qh" + #ifndef GAMEMODE_RACE_H #define GAMEMODE_RACE_H @@ -32,13 +33,6 @@ REGISTER_MUTATOR(rc, false) return 0; } -float race_teams; - -// scores -const float ST_RACE_LAPS = 1; -const float SP_RACE_LAPS = 4; -const float SP_RACE_TIME = 5; -const float SP_RACE_FASTEST = 6; #endif #ifdef IMPLEMENTATION diff --git a/qcsrc/server/mutators/mutator/gamemode_race.qh b/qcsrc/server/mutators/mutator/gamemode_race.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_race.qh +++ b/qcsrc/server/mutators/mutator/gamemode_race.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qh b/qcsrc/server/mutators/mutator/gamemode_tdm.qh index 6f70f09be..399830dad 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qh +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qh @@ -1 +1,3 @@ #pragma once + +#include "../gamemode.qh" diff --git a/qcsrc/server/progdefs.h b/qcsrc/server/progdefs.h deleted file mode 100644 index eb15c45c6..000000000 --- a/qcsrc/server/progdefs.h +++ /dev/null @@ -1,143 +0,0 @@ - -/* file generated by qcc, do not modify */ - -typedef struct -{ int pad[28]; - int self; - int other; - int world; - float time; - float frametime; - float force_retouch; - string_t mapname; - float deathmatch; - float coop; - float teamplay; - float serverflags; - float total_secrets; - float total_monsters; - float found_secrets; - float killed_monsters; - float parm1; - float parm2; - float parm3; - float parm4; - float parm5; - float parm6; - float parm7; - float parm8; - float parm9; - float parm10; - float parm11; - float parm12; - float parm13; - float parm14; - float parm15; - float parm16; - vec3_t v_forward; - vec3_t v_up; - vec3_t v_right; - float trace_allsolid; - float trace_startsolid; - float trace_fraction; - vec3_t trace_endpos; - vec3_t trace_plane_normal; - float trace_plane_dist; - int trace_ent; - float trace_inopen; - float trace_inwater; - int msg_entity; - func_t main; - func_t StartFrame; - func_t PlayerPreThink; - func_t PlayerPostThink; - func_t ClientKill; - func_t ClientConnect; - func_t PutClientInServer; - func_t ClientDisconnect; - func_t SetNewParms; - func_t SetChangeParms; -} globalvars_t; - -typedef struct -{ - float modelindex; - vec3_t absmin; - vec3_t absmax; - float ltime; - float movetype; - float solid; - vec3_t origin; - vec3_t oldorigin; - vec3_t velocity; - vec3_t angles; - vec3_t avelocity; - vec3_t punchangle; - string_t classname; - string_t model; - float frame; - float skin; - float effects; - vec3_t mins; - vec3_t maxs; - vec3_t size; - func_t touch; - func_t use; - func_t think; - func_t blocked; - float nextthink; - int groundentity; - float health; - float frags; - float weapon; - string_t weaponmodel; - float weaponframe; - float currentammo; - float ammo_shells; - float ammo_nails; - float ammo_rockets; - float ammo_cells; - float items; - float takedamage; - int chain; - float deadflag; - vec3_t view_ofs; - float button0; - float button1; - float button2; - float impulse; - float fixangle; - vec3_t v_angle; - float idealpitch; - string_t netname; - int enemy; - float flags; - float colormap; - float team; - float max_health; - float teleport_time; - float armortype; - float armorvalue; - float waterlevel; - float watertype; - float ideal_yaw; - float yaw_speed; - int aiment; - int goalentity; - float spawnflags; - string_t target; - string_t targetname; - float dmg_take; - float dmg_save; - int dmg_inflictor; - int owner; - vec3_t movedir; - string_t message; - float sounds; - string_t noise; - string_t noise1; - string_t noise2; - string_t noise3; -} entvars_t; - -#define PROGHEADER_CRC 5927 diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index 51b2aa889..51ec45900 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,5 +1,13 @@ #pragma once +float race_teams; + +// scores +const float ST_RACE_LAPS = 1; +const float SP_RACE_LAPS = 4; +const float SP_RACE_TIME = 5; +const float SP_RACE_FASTEST = 6; + bool g_race_qualifying; float speedaward_lastsent; diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index 9549fc5ed..ec1fd089b 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -3,6 +3,7 @@ #include "../antilag.qh" #include "../g_subs.qh" #include +#include vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v) { diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index d0cb0a827..eeeb3c916 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -6,6 +6,7 @@ #include #include #include +#include #include // switch between weapons diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 7ffc68105..c06b08c08 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -10,6 +10,7 @@ #include #include #include +#include void thrown_wep_think() {SELFPARAM(); diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 87d77fe5b..ac4752b3d 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -13,6 +13,7 @@ #include #include +#include #include diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index f65060e88..12dcb4514 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -12,6 +12,7 @@ #include #include #include +#include #include .int state; diff --git a/qcsrc/tools/compilationunits.sh b/qcsrc/tools/compilationunits.sh index 8f9491d5c..658fe8682 100755 --- a/qcsrc/tools/compilationunits.sh +++ b/qcsrc/tools/compilationunits.sh @@ -5,11 +5,12 @@ cd "$(dirname "$0")" WORKDIR=../.tmp CPP="cc -xc -E" -QCC=../../../../gmqcc/gmqcc +: ${QCC:=$PWD/../../../../gmqcc/gmqcc} declare -a QCCDEFS=( -DNDEBUG=1 -DWATERMARK="\"$(git describe --tags --dirty='*')\"" + -DDEBUGPATHING=0 ) QCCDEFS="${QCCDEFS[@]}"