mostly fix prediction in minstagib speed powerup
authorRudolf Polzer <divverent@alientrap.org>
Thu, 18 Nov 2010 05:53:02 +0000 (06:53 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 18 Nov 2010 05:53:02 +0000 (06:53 +0100)
defaultXonotic.cfg
qcsrc/server/cl_physics.qc

index 8ae5539..ece2a62 100644 (file)
@@ -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"
index efc9118..962289e 100644 (file)
@@ -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");