const float STAT_SHOTORG = 46; // compressShotOrigin
const float STAT_LEADLIMIT = 47;
const float STAT_BULLETS_LOADED = 48;
+
+// see DP source, quakedef.h
+const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
+const float STAT_MOVEVARS_AIRACCEL_QW = 254;
+
const float CTF_STATE_ATTACK = 1;
const float CTF_STATE_DEFEND = 2;
const float CTF_STATE_COMMANDER = 3;
float speedaward_lastupdate;
float speedaward_lastsent;
.float jumppadusetime;
+var float autocvar_g_movement_highspeed = 1;
void SV_PlayerPhysics()
{
local vector wishvel, wishdir, v;
float not_allowed_to_move;
string c;
+ // fix physics stats for g_movement_highspeed
+ self.stat_sv_airaccel_qw = copysign(bound(0, 1-(1-fabs(sv_airaccel_qw))*autocvar_g_movement_highspeed, 1), sv_airaccel_qw);
+ if(sv_airstrafeaccel_qw)
+ self.stat_sv_airstrafeaccel_qw = copysign(bound(0.001, 1-(1-fabs(sv_airstrafeaccel_qw))*autocvar_g_movement_highspeed, 1), sv_airstrafeaccel_qw);
+ else
+ self.stat_sv_airstrafeaccel_qw = 0;
+
if(self.PlayerPhysplug)
if(self.PlayerPhysplug())
return;
float airaccelqw;
float strafity;
- airaccelqw = sv_airaccel_qw;
+ airaccelqw = self.stat_sv_airaccel_qw;
accelerating = (self.velocity * wishdir > 0);
wishspeed2 = wishspeed;
wishspeed = min(wishspeed, GeomLerp(sv_maxairspeed*maxspd_mod, strafity, sv_maxairstrafespeed*maxspd_mod));
if(sv_airstrafeaccelerate)
airaccel = GeomLerp(airaccel, strafity, sv_airstrafeaccelerate*maxspd_mod);
- if(sv_airstrafeaccel_qw)
- airaccelqw = copysign(1-GeomLerp(1-fabs(sv_airaccel_qw), strafity, 1-fabs(sv_airstrafeaccel_qw)), ((strafity > 0.5) ? sv_airstrafeaccel_qw : sv_airaccel_qw));
+ if(self.stat_sv_airstrafeaccel_qw)
+ airaccelqw = copysign(1-GeomLerp(1-fabs(self.stat_sv_airaccel_qw), strafity, 1-fabs(self.stat_sv_airstrafeaccel_qw)), ((strafity > 0.5) ? self.stat_sv_airstrafeaccel_qw : self.stat_sv_airaccel_qw));
// !CPM
if(sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement_x != 0)
float game_starttime; //point in time when the countdown is over
.float stat_game_starttime;
+.float stat_sv_airaccel_qw;
+.float stat_sv_airstrafeaccel_qw;
+
void W_Porto_Remove (entity p);
.float projectiledeathtype;
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+ // g_movementspeed hack
+ addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
+ addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
+
next_pingtime = time + 5;
InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS);