From: Rudolf Polzer Date: Thu, 18 Nov 2010 05:53:02 +0000 (+0100) Subject: mostly fix prediction in minstagib speed powerup X-Git-Tag: xonotic-v0.1.0preview~122^2~5 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=11c6695a18daf486e320c034cc9d2a42717d74b2;hp=b347ad694dd2d1f62772c4082b57c5d7afe58403;ds=sidebyside mostly fix prediction in minstagib speed powerup --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 8ae553921f..ece2a62220 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -484,8 +484,7 @@ set g_minstagib_extralives 2 "how many extra lives you will get per powerup" set g_minstagib_ammo_start 10 "starting ammo" set g_minstagib_ammo_drop 5 "how much ammo you'll get for weapons or cells" set g_minstagib_invis_alpha 0.15 -set g_minstagib_speed_jumpheight 1.8 "jump height multiplier that applies while you carry the invincibility powerup" -set g_minstagib_speed_moverate 1.25 "speed-multiplier that applies while you carry the invincibility powerup" +set g_minstagib_speed_highspeed 1.25 "speed-multiplier that applies while you carry the invincibility powerup" set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health" set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\"" set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)" @@ -812,7 +811,7 @@ set g_nexball_basketball_delay_hold 20 "time before a player who ca set g_nexball_basketball_delay_hold_forteam 60 "time before a ball reset when a team holds the ball for too long" set g_nexball_basketball_teamsteal 1 "1 to allow players to steal from teammates, 0 to disallow" -set g_nexball_basketball_carrier_speed 0.9 "speed multiplier for the ballcarrier" +set g_nexball_basketball_carrier_highspeed 0.9 "speed multiplier for the ballcarrier" set g_nexball_meter_period 1 "time to make a full cycle on the power meter" set g_nexball_basketball_meter 1 "use the power meter for basketball" diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index efc9118ea8..962289e91a 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -145,11 +145,6 @@ void PlayerJump (void) } } - if(g_minstagib && (self.items & IT_INVINCIBLE)) - { - mjumpheight = mjumpheight * cvar("g_minstagib_speed_jumpheight"); - } - // sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline // velocity bounds. Final velocity is bound between (jumpheight * // min + jumpheight) and (jumpheight * max + jumpheight); @@ -707,13 +702,21 @@ void SV_PlayerPhysics() float not_allowed_to_move; string c; + maxspd_mod = 1; + if(g_minstagib && (self.items & IT_INVINCIBLE)) + maxspd_mod *= cvar("g_minstagib_speed_highspeed"); + if(g_nexball && self.ballcarried) + maxspd_mod *= cvar("g_nexball_basketball_carrier_highspeed"); + // fix physics stats for g_movement_highspeed - self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, autocvar_g_movement_highspeed); + self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, autocvar_g_movement_highspeed * maxspd_mod); + if(sv_airstrafeaccel_qw) - self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, autocvar_g_movement_highspeed); + self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, autocvar_g_movement_highspeed * maxspd_mod); else self.stat_sv_airstrafeaccel_qw = 0; - self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * autocvar_g_movement_highspeed; + + self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * autocvar_g_movement_highspeed * maxspd_mod; if(self.PlayerPhysplug) if(self.PlayerPhysplug()) @@ -861,16 +864,6 @@ void SV_PlayerPhysics() } } - if(g_minstagib && (self.items & IT_INVINCIBLE)) - { - maxspd_mod = cvar("g_minstagib_speed_moverate"); - } - - if(g_nexball && self.ballcarried) - { - maxspd_mod = cvar("g_nexball_basketball_carrier_speed"); - } - swampspd_mod = 1; if(self.in_swamp) { swampspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate");