#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
#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
if(self.spectatee_status != oldspectatee_status)
{
ClientData_Touch(self);
+ if(g_race || g_cts)
+ race_InitSpectator();
}
if(self.teamkill_soundtime)
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();
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();
#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)
void race_RetractPlayer();
+void race_InitSpectator();
+
#endif