From: Rudolf Polzer Date: Sat, 4 Dec 2010 14:20:04 +0000 (+0100) Subject: import more changes from the autocvars branch X-Git-Tag: xonotic-v0.1.0preview~65^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a90a9ae929176fd102b08f651872c702defccc0;p=xonotic%2Fxonotic-data.pk3dir.git import more changes from the autocvars branch --- diff --git a/qcsrc/server/accuracy.qh b/qcsrc/server/accuracy.qh index f68387648..84488fc77 100644 --- a/qcsrc/server/accuracy.qh +++ b/qcsrc/server/accuracy.qh @@ -1,5 +1,4 @@ .float cvar_cl_accuracy_data_share; -var float autocvar_sv_accuracy_data_share = 1; // init/free void accuracy_init(entity e); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index a9c523353..53b6f133f 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -2,3 +2,27 @@ float autocvar_sv_cheats; float autocvar_g_bastet; float autocvar_teamplay_mode; var float autocvar_g_movement_highspeed = 1; +var float autocvar_sv_accuracy_data_share = 1; + +float autocvar_sv_accelerate; +float autocvar_sv_friction; +float autocvar_sv_maxspeed; +float autocvar_sv_airaccelerate; +float autocvar_sv_maxairspeed; +float autocvar_sv_stopspeed; +float autocvar_sv_gravity; +float autocvar_sv_airaccel_sideways_friction; +float autocvar_sv_airaccel_qw; +float autocvar_sv_airstopaccelerate; +float autocvar_sv_airstrafeaccelerate; +float autocvar_sv_maxairstrafespeed; +float autocvar_sv_airstrafeaccel_qw; +float autocvar_sv_aircontrol; +float autocvar_sv_aircontrol_power; +float autocvar_sv_aircontrol_penalty; +float autocvar_sv_warsowbunny_airforwardaccel; +float autocvar_sv_warsowbunny_accel; +float autocvar_sv_warsowbunny_topspeed; +float autocvar_sv_warsowbunny_turnaccel; +float autocvar_sv_warsowbunny_backtosideratio; +float autocvar_sv_airspeedlimit_nonqw; diff --git a/qcsrc/server/bot/bot.qh b/qcsrc/server/bot/bot.qh index 2f56a4801..9e6d447e6 100644 --- a/qcsrc/server/bot/bot.qh +++ b/qcsrc/server/bot/bot.qh @@ -108,8 +108,6 @@ void bot_serverframe(); * Imports */ -float autocvar_sv_maxspeed; - void() havocbot_setupbot; float c1, c2, c3, c4; diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 77003999a..56c519108 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -1,29 +1,6 @@ .float race_penalty; .float restart_jump; -float autocvar_sv_accelerate; -float autocvar_sv_friction; -float autocvar_sv_maxspeed; -float autocvar_sv_airaccelerate; -float autocvar_sv_maxairspeed; -float autocvar_sv_stopspeed; -float autocvar_sv_gravity; -float sv_airaccel_sideways_friction; -float autocvar_sv_airaccel_qw; -float autocvar_sv_airstopaccelerate; -float autocvar_sv_airstrafeaccelerate; -float sv_maxairstrafespeed; -float autocvar_sv_airstrafeaccel_qw; -float autocvar_sv_aircontrol; -float autocvar_sv_aircontrol_power; -float autocvar_sv_aircontrol_penalty; -float autocvar_sv_warsowbunny_airforwardaccel; -float autocvar_sv_warsowbunny_accel; -float autocvar_sv_warsowbunny_topspeed; -float autocvar_sv_warsowbunny_turnaccel; -float autocvar_sv_warsowbunny_backtosideratio; -float autocvar_sv_airspeedlimit_nonqw; - .float ladder_time; .entity ladder_entity; .float gravity; @@ -522,7 +499,7 @@ float AdjustAirAccelQW(float accelqw, float factor) } // example config for alternate speed clamping: -// autocvar_sv_airaccel_qw 0.8 +// sv_airaccel_qw 0.8 // sv_airaccel_sideways_friction 0 // prvm_globalset server speedclamp_mode 1 // (or 2) @@ -1268,8 +1245,8 @@ void SV_PlayerPhysics() // log dv/dt = logaccel + logmaxspeed (when slow) // log dv/dt = logaccel + logmaxspeed + log(1 - accelqw) (when fast) strafity = IsMoveInDirection(self.movement, -90) + IsMoveInDirection(self.movement, +90); // if one is nonzero, other is always zero - if(sv_maxairstrafespeed) - wishspeed = min(wishspeed, GeomLerp(autocvar_sv_maxairspeed*maxspd_mod, strafity, sv_maxairstrafespeed*maxspd_mod)); + if(autocvar_sv_maxairstrafespeed) + wishspeed = min(wishspeed, GeomLerp(autocvar_sv_maxairspeed*maxspd_mod, strafity, autocvar_sv_maxairstrafespeed*maxspd_mod)); if(autocvar_sv_airstrafeaccelerate) airaccel = GeomLerp(airaccel, strafity, autocvar_sv_airstrafeaccelerate*maxspd_mod); if(self.stat_sv_airstrafeaccel_qw) @@ -1279,7 +1256,7 @@ void SV_PlayerPhysics() if(autocvar_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement_x != 0) PM_AirAccelerate(wishdir, wishspeed); else - PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw); + PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, autocvar_sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw); if(autocvar_sv_aircontrol) CPM_PM_Aircontrol(wishdir, wishspeed2); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index fa054c1f9..5d55c2258 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1157,8 +1157,6 @@ float sv_pitch_min; float sv_pitch_max; float sv_pitch_fixyaw; -float sv_accuracy_data_share; - void readlevelcvars(void) { // first load all the mutators @@ -1309,8 +1307,6 @@ void readlevelcvars(void) sv_pitch_max = cvar("sv_pitch_max"); sv_pitch_fixyaw = cvar("sv_pitch_fixyaw"); - sv_accuracy_data_share = boolean(cvar("sv_accuracy_data_share")); - readplayerstartcvars(); }