]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert to the old method in hopes to catch a command spam issue
authorMario <mario@smbclan.net>
Thu, 3 Dec 2015 14:26:19 +0000 (00:26 +1000)
committerMario <mario@smbclan.net>
Thu, 3 Dec 2015 14:26:19 +0000 (00:26 +1000)
qcsrc/common/physics.qh
qcsrc/server/cl_client.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/race.qc
qcsrc/server/race.qh

index 01a8770a591f75000eadcb590baeae8f175daf49..2cf5a124ce91acf9c9656700f1277e0df198b2b1 100644 (file)
@@ -91,6 +91,9 @@ bool IsFlying(entity a);
 
 #ifdef CSQC
 
+       string autocvar_cl_jumpspeedcap_min;
+       string autocvar_cl_jumpspeedcap_max;
+
        noref float pmove_waterjumptime;
 
        const int FL_WATERJUMP = 2048;  // player jumping out of water
@@ -163,8 +166,8 @@ bool IsFlying(entity a);
 
        #define ITEMS_STAT(s)                                           (s).items
 
-       #define PHYS_JUMPSPEEDCAP_MIN                           cvar_string("cl_jumpspeedcap_min")
-       #define PHYS_JUMPSPEEDCAP_MAX                           cvar_string("cl_jumpspeedcap_max")
+       #define PHYS_JUMPSPEEDCAP_MIN                           autocvar_cl_jumpspeedcap_min
+       #define PHYS_JUMPSPEEDCAP_MAX                           autocvar_cl_jumpspeedcap_max
 
        #define PHYS_CL_TRACK_CANJUMP(s)            STAT(MOVEVARS_CL_TRACK_CANJUMP, s)
        // FIXME: 0 doesn't mean zero gravity
index e63a9afbc7d9d8a0652b4f440918fb87fe1ee84c..06d5f05ec73124345db15fb32ef925be9dc4f769 100644 (file)
@@ -2491,6 +2491,8 @@ void PlayerPreThink ()
        if(self.spectatee_status != oldspectatee_status)
        {
                ClientData_Touch(self);
+               if(g_race || g_cts)
+                       race_InitSpectator();
        }
 
        if(self.teamkill_soundtime)
index e72d898ce09b7dd0b86e5230a17cbeac27ae5aad..d6dc0f318a2ee715b54121d733d52284fccb720d 100644 (file)
@@ -217,16 +217,6 @@ MUTATOR_HOOKFUNCTION(cts, reset_map_global)
        return false;
 }
 
-MUTATOR_HOOKFUNCTION(cts, PlayerPreThink)
-{SELFPARAM();
-       if(IS_SPEC(self) || IS_OBSERVER(self))
-       if(g_race_qualifying)
-       if(msg_entity.enemy.race_laptime)
-               race_SendNextCheckpoint(msg_entity.enemy, 1);
-
-       return false;
-}
-
 MUTATOR_HOOKFUNCTION(cts, ClientConnect)
 {SELFPARAM();
        race_PreparePlayer();
index b3075910cb31dd4f8c15baf663410c42edd21544..124bc653a769053f775ef0ed059c9173dd54431c 100644 (file)
@@ -253,16 +253,6 @@ MUTATOR_HOOKFUNCTION(rc, reset_map_global)
        return false;
 }
 
-MUTATOR_HOOKFUNCTION(rc, PlayerPreThink)
-{SELFPARAM();
-       if(IS_SPEC(self) || IS_OBSERVER(self))
-       if(g_race_qualifying)
-       if(msg_entity.enemy.race_laptime)
-               race_SendNextCheckpoint(msg_entity.enemy, 1);
-
-       return false;
-}
-
 MUTATOR_HOOKFUNCTION(rc, ClientConnect)
 {SELFPARAM();
        race_PreparePlayer();
index 093946d97e7fbb7ec96d709231925a5d41ccc5a4..304022f8e9ef60794b1729df2b2debecef6287d9 100644 (file)
 #include "../lib/warpzone/common.qh"
 #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
 
+void race_InitSpectator()
+{
+       if(g_race_qualifying)
+               if(msg_entity.enemy.race_laptime)
+                       race_SendNextCheckpoint(msg_entity.enemy, 1);
+}
+
 void W_Porto_Fail(float failhard);
 
 float race_readTime(string map, float pos)
index 03e8a54aba2747e2f04f6f0914d7e23a2717fccb..c78c7765bb40a4d5f81a1aeed5212ec8bbe0217a 100644 (file)
@@ -57,4 +57,6 @@ void race_SendRankings(float pos, float prevpos, float del, float msg);
 
 void race_RetractPlayer();
 
+void race_InitSpectator();
+
 #endif