server: pass compilation units test
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 15 Mar 2016 07:23:17 +0000 (18:23 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 15 Mar 2016 07:51:58 +0000 (18:51 +1100)
57 files changed:
.gitlab-ci.yml
qcsrc/client/credit.txt [deleted file]
qcsrc/client/hud/hud.qc
qcsrc/common/debug.qh
qcsrc/common/effects/qc/gibs.qc
qcsrc/common/effects/qc/gibs.qh [new file with mode: 0644]
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/effects/qc/lightningarc.qc
qcsrc/common/effects/qc/lightningarc.qh [new file with mode: 0644]
qcsrc/common/effects/qc/modeleffects.qc
qcsrc/common/effects/qc/modeleffects.qh [new file with mode: 0644]
qcsrc/common/monsters/all.inc
qcsrc/common/mutators/mutator/instagib/items.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/cmd.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_world.qc
qcsrc/server/g_world.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_assault.qh
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ca.qh
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qh
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_cts.qh
qcsrc/server/mutators/mutator/gamemode_deathmatch.qh
qcsrc/server/mutators/mutator/gamemode_domination.qh
qcsrc/server/mutators/mutator/gamemode_freezetag.qh
qcsrc/server/mutators/mutator/gamemode_invasion.qh
qcsrc/server/mutators/mutator/gamemode_keepaway.qh
qcsrc/server/mutators/mutator/gamemode_keyhunt.qh
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/mutators/mutator/gamemode_lms.qh
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/mutators/mutator/gamemode_race.qh
qcsrc/server/mutators/mutator/gamemode_tdm.qh
qcsrc/server/progdefs.h [deleted file]
qcsrc/server/race.qh
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/tools/compilationunits.sh

index 64863d8..273b93b 100644 (file)
@@ -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 (file)
index b07ec4a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Credits go to Dresk for putting this CSQC scratch source together.
-
-and Urre :o
index a4cac53..a4e8318 100644 (file)
@@ -12,8 +12,7 @@
 #include <common/mutators/mutator/waypoints/all.qh>
 #include <common/stats.qh>
 #include <lib/csqcmodel/cl_player.qh>
-// TODO: remove
-#include <server/mutators/mutator/gamemode_ctf.qc>
+#include <server/mutators/mutator/gamemode_ctf.qh> // TODO: remove
 
 
 /*
index 07703ee..40b2b35 100644 (file)
@@ -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);
index aec6640..45a28a9 100644 (file)
@@ -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 (file)
index 0000000..40e0834
--- /dev/null
@@ -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
index ae1ec74..68edd6f 100644 (file)
@@ -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;
                                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;
                                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);
                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;
index 64ef524..306d719 100644 (file)
@@ -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
index 5c6b60e..8a16a1d 100644 (file)
@@ -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 (file)
index 0000000..2190975
--- /dev/null
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifdef SVQC
+void te_csqc_lightningarc(vector from, vector to);
+#endif
index 99272f8..84b083b 100644 (file)
@@ -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 (file)
index 0000000..afa353f
--- /dev/null
@@ -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
index f44cabc..778e2a1 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef MENUQC
 #include "../animdecide.qh"
+#include "../anim.qh"
 vector animfixfps(entity e, vector a, vector b);
 #endif
 
index 46bda6b..269ec2d 100644 (file)
@@ -1,3 +1,5 @@
+#pragma once
+
 #include <common/items/all.qh>
 #include <common/items/item/ammo.qh>
 #include <common/items/item/powerup.qh>
index 6705718..7202547 100644 (file)
@@ -2,6 +2,9 @@
 
 #include "bot.qh"
 
+#include <common/physics/player.qh>
+#include <common/state.qh>
+
 #include "../weapons/weaponsystem.qh"
 
 #include "../mutators/all.qh"
index 72ebfcb..37079a3 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "../weapons/accuracy.qh"
 
+#include <common/physics/player.qh>
 #include <common/constants.qh>
 #include <common/mapinfo.qh>
 #include <common/teams.qh>
index 260e8e6..68ff899 100644 (file)
@@ -7,6 +7,8 @@
 #include "../waypoints.qh"
 
 #include <common/constants.qh>
+#include <common/physics/player.qh>
+#include <common/state.qh>
 #include <common/items/all.qh>
 
 #include <common/triggers/trigger/jumppads.qh>
index 7b349f4..4e867b0 100644 (file)
@@ -1,5 +1,8 @@
 #include "scripting.qh"
 
+#include <common/state.qh>
+#include <common/physics/player.qh>
+
 #include "bot.qh"
 
 .int state;
index 92ee18c..a19b2a0 100644 (file)
@@ -3,6 +3,8 @@
 #include "bot.qh"
 #include "navigation.qh"
 
+#include <common/state.qh>
+
 #include "../antilag.qh"
 
 #include <common/constants.qh>
index 5550199..d984c3c 100644 (file)
@@ -25,6 +25,8 @@
 #include "../common/ent_cs.qh"
 #include <common/state.qh>
 
+#include <common/effects/qc/globalsound.qh>
+
 #include "../common/triggers/teleporters.qh"
 
 #include "../common/vehicles/all.qh"
index a525c58..bfd2489 100644 (file)
@@ -11,6 +11,8 @@
 #include "weapons/tracing.qh"
 #include "weapons/weaponsystem.qh"
 
+#include <common/state.qh>
+
 #include "../common/minigames/sv_minigames.qh"
 
 #include "../common/weapons/all.qh"
index 46743ce..979e6d8 100644 (file)
@@ -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"
 
index 173a384..23c57ea 100644 (file)
@@ -1,6 +1,5 @@
 #include "cmd.qh"
 #include <common/command/command.qh>
-#include "cmd.qh"
 
 #include "common.qh"
 #include "vote.qh"
@@ -21,6 +20,7 @@
 
 #include <common/constants.qh>
 #include <common/deathtypes/all.qh>
+#include <common/effects/all.qh>
 #include <common/mapinfo.qh>
 #include <common/notifications/all.qh>
 #include <common/physics/player.qh>
index 37ccf37..9570f35 100644 (file)
@@ -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"
index c0509a3..86fb14b 100644 (file)
@@ -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"
index c9e6921..97450cd 100644 (file)
@@ -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"
 
index 7a606c3..6398cbe 100644 (file)
@@ -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;
index 3703aba..cd1cafd 100644 (file)
@@ -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);
index 9e40e9d..77239e7 100644 (file)
@@ -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;
index bec3ca9..ee80b44 100644 (file)
@@ -5,6 +5,7 @@
 #include <server/cl_impulse.qh>
 #include <server/cheats.qh>
 #include <server/g_damage.qh>
+#include <server/g_world.qh>
 #include <server/round_handler.qh>
 #include <server/scores.qh>
 #include <server/scores_rules.qh>
@@ -26,6 +27,8 @@
 #include <server/weapons/tracing.qh>
 #include <server/weapons/weaponsystem.qh>
 
+#include <common/physics/player.qh>
+#include <common/effects/qc/all.qh>
 #include <common/deathtypes/all.qh>
 #include <common/notifications/all.qh>
 #include <common/triggers/teleporters.qh>
index 2f0d899..e9c31f3 100644 (file)
@@ -3,6 +3,7 @@
 #define GAMEMODE_ASSAULT_H
 
 void assault_ScoreRules();
+void ActivateTeamplay();
 
 REGISTER_MUTATOR(as, false)
 {
index 23bee3a..c90f7d1 100644 (file)
@@ -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()
index 78d84e2..8cdad32 100644 (file)
@@ -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
index c323cb5..c44dfc3 100644 (file)
@@ -1,6 +1,8 @@
 #pragma once
 
 #ifdef SVQC
+
+#include "../gamemode.qh"
 // used in cheats.qc
 void ctf_RespawnFlag(entity flag);
 
index ff5abeb..75c8b5d 100644 (file)
@@ -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;
index 4496b49..40e9f61 100644 (file)
@@ -45,6 +45,7 @@ float LMS_NewPlayerLives();
 
 #ifdef IMPLEMENTATION
 
+#include <common/mutators/mutator/instagib/items.qc>
 #include <server/campaign.qh>
 #include <server/command/cmd.qh>
 
@@ -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.
index 7db3cde..ce86e50 100644 (file)
@@ -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/progdefs.h b/qcsrc/server/progdefs.h
deleted file mode 100644 (file)
index eb15c45..0000000
+++ /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
index 51b2aa8..51ec459 100644 (file)
@@ -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;
index 9549fc5..ec1fd08 100644 (file)
@@ -3,6 +3,7 @@
 #include "../antilag.qh"
 #include "../g_subs.qh"
 #include <common/weapons/all.qh>
+#include <common/state.qh>
 
 vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v)
 {
index d0cb0a8..eeeb3c9 100644 (file)
@@ -6,6 +6,7 @@
 #include <common/util.qh>
 #include <common/items/item.qh>
 #include <common/weapons/all.qh>
+#include <common/state.qh>
 #include <common/mutators/mutator/waypoints/waypointsprites.qh>
 
 // switch between weapons
index 7ffc681..c06b08c 100644 (file)
@@ -10,6 +10,7 @@
 #include <common/triggers/subs.qh>
 #include <common/util.qh>
 #include <common/weapons/all.qh>
+#include <common/state.qh>
 
 void thrown_wep_think()
 {SELFPARAM();
index 87d77fe..ac4752b 100644 (file)
@@ -13,6 +13,7 @@
 #include <common/util.qh>
 
 #include <common/weapons/all.qh>
+#include <common/state.qh>
 
 #include <lib/warpzone/common.qh>
 
index f65060e..12dcb45 100644 (file)
@@ -12,6 +12,7 @@
 #include <common/notifications/all.qh>
 #include <common/util.qh>
 #include <common/weapons/all.qh>
+#include <common/state.qh>
 #include <lib/csqcmodel/sv_model.qh>
 
 .int state;
index 8f9491d..658fe86 100755 (executable)
@@ -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[@]}"