float autocvar_snd_soundradius;
float autocvar_spawn_debug;
float autocvar_speedmeter;
- var float autocvar_sv_accuracy_data_share = 1;
-float autocvar_sv_accelerate;
+ float autocvar_sv_accuracy_data_share = 1;
string autocvar_sv_adminnick;
-float autocvar_sv_airaccel_qw;
-float autocvar_sv_airaccel_qw_stretchfactor;
-float autocvar_sv_airaccel_sideways_friction;
-float autocvar_sv_airaccelerate;
-float autocvar_sv_aircontrol;
-float autocvar_sv_aircontrol_penalty;
-float autocvar_sv_aircontrol_power;
-float autocvar_sv_airspeedlimit_nonqw;
-float autocvar_sv_airstopaccelerate;
-float autocvar_sv_airstrafeaccel_qw;
-float autocvar_sv_airstrafeaccelerate;
float autocvar_sv_autoscreenshot;
float autocvar_sv_cheats;
float autocvar_sv_clientcommand_antispam_time;
float autocvar_g_buffs_invisible_alpha;
float autocvar_g_buffs_flight_gravity;
float autocvar_g_buffs_jump_height;
++
+ #endif
float PlayerJump (void)
{
if(self.frozen)
- return TRUE; // no jumping in freezetag when frozen
+ return true; // no jumping in freezetag when frozen
if(self.player_blocked)
- return TRUE; // no jumping while blocked
+ return true; // no jumping while blocked
- float doublejump = FALSE;
- float doublejump = false;
- float mjumpheight = autocvar_sv_jumpvelocity;
++ bool doublejump = false;
+ float mjumpheight = self.stat_sv_jumpvelocity;
player_multijump = doublejump;
player_jumpheight = mjumpheight;
return;
#endif
- k *= bound(0, wishspeed / autocvar_sv_maxairspeed, 1);
+ k *= bound(0, wishspeed / self.stat_sv_maxairspeed, 1);
- zspeed = self.velocity_z;
+ zspeed = self.velocity.z;
self.velocity_z = 0;
xyspeed = vlen(self.velocity); self.velocity = normalize(self.velocity);
// noclipping or flying
self.flags &= ~FL_ONGROUND;
- self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
+ self.velocity = self.velocity * (1 - frametime * self.stat_sv_friction);
makevectors(self.v_angle);
//wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
- wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
+ wishvel = v_forward * self.movement.x + v_right * self.movement.y + '0 0 1' * self.movement.z;
// acceleration
wishdir = normalize(wishvel);
wishspeed = vlen(wishvel);
self.velocity_z += g;
}
- self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
+ self.velocity = self.velocity * (1 - frametime * self.stat_sv_friction);
makevectors(self.v_angle);
//wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
- wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
+ wishvel = v_forward * self.movement.x + v_right * self.movement.y + '0 0 1' * self.movement.z;
self.velocity_z += g;
if (self.ladder_entity.classname == "func_water")
{
{
//makevectors(self.v_angle_y * '0 1 0');
makevectors(self.v_angle);
- wishvel = v_forward * self.movement_x + v_right * self.movement_y;
+ wishvel = v_forward * self.movement.x + v_right * self.movement.y;
// add remaining speed as Z component
- maxairspd = autocvar_sv_maxairspeed*max(1, maxspd_mod);
+ maxairspd = self.stat_sv_maxairspeed*max(1, maxspd_mod);
// fix speedhacks :P
wishvel = normalize(wishvel) * min(vlen(wishvel) / maxairspd, 1);
// add the unused velocity as up component
}
else
{
- maxairspd = autocvar_sv_maxairspeed;
- airaccel = autocvar_sv_airaccelerate;
+ maxairspd = self.stat_sv_maxairspeed;
+ airaccel = self.stat_sv_airaccelerate;
}
// airborn
- makevectors(self.v_angle_y * '0 1 0');
- wishvel = v_forward * self.movement_x + v_right * self.movement_y;
+ makevectors(self.v_angle.y * '0 1 0');
+ wishvel = v_forward * self.movement.x + v_right * self.movement.y;
// acceleration
wishdir = normalize(wishvel);
wishspeed = wishspeed0 = vlen(wishvel);
{
vector curdir;
curdir = self.velocity;
- curdir_z = 0;
+ curdir.z = 0;
curdir = normalize(curdir);
- airaccel = airaccel + (autocvar_sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir));
+ airaccel = airaccel + (self.stat_sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir));
}
// note that for straight forward jumping:
// step = accel * frametime * wishspeed0;
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(self.stat_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement_x != 0)
- if(autocvar_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement.x != 0)
++ if(self.stat_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement.x != 0)
PM_AirAccelerate(wishdir, wishspeed);
else
- PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, autocvar_sv_airaccel_qw_stretchfactor, autocvar_sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw);
+ PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, self.stat_sv_airaccel_qw_stretchfactor, self.stat_sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw);
- if(autocvar_sv_aircontrol)
+ if(self.stat_sv_aircontrol)
CPM_PM_Aircontrol(wishdir, wishspeed2);
}
}
.float stat_sv_airspeedlimit_nonqw;
.float stat_sv_maxspeed;
+// new properties
+.float stat_sv_jumpvelocity;
+.float stat_sv_airaccel_qw_stretchfactor;
+.float stat_sv_maxairstrafespeed;
+.float stat_sv_maxairspeed;
+.float stat_sv_airstrafeaccelerate;
+.float stat_sv_warsowbunny_turnaccel;
+.float stat_sv_airaccel_sideways_friction;
+.float stat_sv_aircontrol;
+.float stat_sv_aircontrol_power;
+.float stat_sv_aircontrol_penalty;
+.float stat_sv_warsowbunny_airforwardaccel;
+.float stat_sv_warsowbunny_topspeed;
+.float stat_sv_warsowbunny_accel;
+.float stat_sv_warsowbunny_backtosideratio;
+.float stat_sv_friction;
+.float stat_sv_accelerate;
+.float stat_sv_stopspeed;
+.float stat_sv_airaccelerate;
+.float stat_sv_airstopaccelerate;
+
+.string cvar_cl_physics;
+
void W_Porto_Remove (entity p);
- .float projectiledeathtype;
+ .int projectiledeathtype;
.string message2;