void PM_ClientMovement_UpdateStatus(entity this, bool ground)
{
#ifdef CSQC
+ if(!IS_PLAYER(this))
+ return;
// make sure player is not stuck
if(autocvar_cl_movement != 3)
PM_ClientMovement_Unstick(this);
this.movement = PHYS_INPUT_MOVEVALUES(this);
+ this.spectatorspeed = STAT(SPECTATORSPEED);
+
vector oldv_angle = this.v_angle;
vector oldangles = this.angles; // we need to save these, as they're abused by other code
this.v_angle = PHYS_INPUT_ANGLES(this);
MUTATOR_CALLHOOK(PlayerPhysics, this);
-#ifdef SVQC
if (!IS_PLAYER(this))
{
+#ifdef SVQC
maxspeed_mod = autocvar_sv_spectator_speed_multiplier;
if (!this.spectatorspeed)
this.spectatorspeed = maxspeed_mod;
} // otherwise just clear
this.impulse = 0;
}
+#endif
maxspeed_mod = this.spectatorspeed;
}
+#ifdef SVQC
float spd = max(PHYS_MAXSPEED(this), PHYS_MAXAIRSPEED(this)) * maxspeed_mod;
if(this.speed != spd)
REGISTER_STAT(TELEPORT_MAXSPEED, float, autocvar_g_teleport_maxspeed)
REGISTER_STAT(TELEPORT_TELEFRAG_AVOID, int, autocvar_g_telefrags_avoid)
+REGISTER_STAT(SPECTATORSPEED, float)
+
#ifdef SVQC
#include "movetypes/movetypes.qh"
#endif
void CSQCPlayer_SetMinsMaxs(entity this)
{
- if (this.flags & FL_DUCKED)
+ if ((this.flags & FL_DUCKED) || !this.isplayermodel)
{
this.mins = PL_CROUCH_MIN;
this.maxs = PL_CROUCH_MAX;