also change maxspeed with highspeed; tune minstagib for it
authorRudolf Polzer <divverent@alientrap.org>
Thu, 18 Nov 2010 06:11:52 +0000 (07:11 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 18 Nov 2010 06:11:52 +0000 (07:11 +0100)
defaultXonotic.cfg
qcsrc/client/csqc_constants.qc
qcsrc/common/constants.qh
qcsrc/server/cl_physics.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc

index ece2a62..247acb0 100644 (file)
@@ -484,7 +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_highspeed 1.25 "speed-multiplier that applies while you carry the invincibility powerup"
+set g_minstagib_speed_highspeed 1.5 "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)"
@@ -710,12 +710,9 @@ set g_balance_rune_regen_combo_limitmod                    1
 set g_balance_rune_speed_atkrate                               0.66
 set g_balance_curse_slow_atkrate                               1.5
 set g_balance_rune_speed_combo_atkrate                 1.2
-set g_balance_rune_speed_moverate                      1.25
-set g_balance_curse_slow_moverate                      0.8
-set g_balance_rune_speed_combo_moverate                        0.9
-set g_balance_rune_speed_jumpheight                    1.4
-set g_balance_curse_slow_jumpheight                    1.0
-set g_balance_rune_speed_combo_jumpheight              1.0
+set g_balance_rune_speed_highspeed                     1.5
+set g_balance_curse_slow_highspeed                     0.6
+set g_balance_rune_speed_combo_highspeed                       0.9
 
 // domination
 set g_domination                       0 "Domination: capture and hold control points to gain points"
@@ -811,7 +808,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_highspeed         0.9  "speed multiplier for the ballcarrier"
+set g_nexball_basketball_carrier_highspeed         0.8  "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 2b2e674..93051cc 100644 (file)
@@ -63,7 +63,6 @@ const float           STAT_MOVEVARS_TIMESCALE         = 241;
 const float            STAT_FRAGLIMIT                                  = 235;
 const float            STAT_TIMELIMIT                                  = 236;
 const float     STAT_MOVEVARS_GRAVITY           = 242;
-const float     STAT_MOVEVARS_MAXSPEED          = 244;
 
 // Sound Constants
 //const float          CHAN_AUTO                                               = 0;
index 4acf797..bd7047f 100644 (file)
@@ -316,6 +316,7 @@ const float STAT_HUD = 51;
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
 const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
+const float STAT_MOVEVARS_MAXSPEED = 244;
 const float STAT_MOVEVARS_AIRACCEL_QW = 254;
 
 const float CTF_STATE_ATTACK = 1;
index 962289e..e9d1932 100644 (file)
@@ -130,21 +130,6 @@ void PlayerJump (void)
        if(self.health <= g_bloodloss)
                return;
 
-       if(g_runematch)
-       {
-               if(self.runes & RUNE_SPEED)
-               {
-                       if(self.runes & CURSE_SLOW)
-                               mjumpheight = mjumpheight * cvar("g_balance_rune_speed_combo_jumpheight");
-                       else
-                               mjumpheight = mjumpheight * cvar("g_balance_rune_speed_jumpheight");
-               }
-               else if(self.runes & CURSE_SLOW)
-               {
-                       mjumpheight = mjumpheight * cvar("g_balance_curse_slow_jumpheight");
-               }
-       }
-
        // sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline
        // velocity bounds.  Final velocity is bound between (jumpheight *
        // min + jumpheight) and (jumpheight * max + jumpheight);
@@ -265,8 +250,8 @@ void RaceCarPhysics()
        vector angles_save, rigvel;
 
        angles_save = self.angles;
-       accel = bound(-1, self.movement_x / sv_maxspeed, 1);
-       steer = bound(-1, self.movement_y / sv_maxspeed, 1);
+       accel = bound(-1, self.movement_x / self.stat_sv_maxspeed, 1);
+       steer = bound(-1, self.movement_y / self.stat_sv_maxspeed, 1);
 
        if(g_bugrigs_reverse_speeding)
        {
@@ -620,19 +605,19 @@ void PM_AirAccelerate(vector wishdir, float wishspeed)
 
        if(wishspeed > curspeed * 1.01)
        {
-               wishspeed = min(wishspeed, curspeed + sv_warsowbunny_airforwardaccel * sv_maxspeed * frametime);
+               wishspeed = min(wishspeed, curspeed + sv_warsowbunny_airforwardaccel * self.stat_sv_maxspeed * frametime);
        }
        else
        {
-               f = max(0, (sv_warsowbunny_topspeed - curspeed) / (sv_warsowbunny_topspeed - sv_maxspeed));
-               wishspeed = max(curspeed, sv_maxspeed) + sv_warsowbunny_accel * f * sv_maxspeed * frametime;
+               f = max(0, (sv_warsowbunny_topspeed - curspeed) / (sv_warsowbunny_topspeed - self.stat_sv_maxspeed));
+               wishspeed = max(curspeed, self.stat_sv_maxspeed) + sv_warsowbunny_accel * f * self.stat_sv_maxspeed * frametime;
        }
        wishvel = wishdir * wishspeed;
        acceldir = wishvel - curvel;
        addspeed = vlen(acceldir);
        acceldir = normalize(acceldir);
 
-       accelspeed = min(addspeed, sv_warsowbunny_turnaccel * sv_maxspeed * frametime);
+       accelspeed = min(addspeed, sv_warsowbunny_turnaccel * self.stat_sv_maxspeed * frametime);
 
        if(sv_warsowbunny_backtosideratio < 1)
        {
@@ -707,16 +692,30 @@ void SV_PlayerPhysics()
                maxspd_mod *= cvar("g_minstagib_speed_highspeed");
        if(g_nexball && self.ballcarried)
                maxspd_mod *= cvar("g_nexball_basketball_carrier_highspeed");
+       if(g_runematch)
+       {
+               if(self.runes & RUNE_SPEED)
+               {
+                       if(self.runes & CURSE_SLOW)
+                               maxspd_mod *= cvar("g_balance_rune_speed_combo_highspeed");
+                       else
+                               maxspd_mod *= cvar("g_balance_rune_speed_highspeed");
+               }
+               else if(self.runes & CURSE_SLOW)
+               {
+                       maxspd_mod *= cvar("g_balance_curse_slow_highspeed");
+               }
+       }
+       maxspd_mod *= autocvar_g_movement_highspeed;
 
        // fix physics stats for g_movement_highspeed
-       self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, autocvar_g_movement_highspeed * maxspd_mod);
-
+       self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, maxspd_mod);
        if(sv_airstrafeaccel_qw)
-               self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, autocvar_g_movement_highspeed * maxspd_mod);
+               self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, maxspd_mod);
        else
                self.stat_sv_airstrafeaccel_qw = 0;
-
-       self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * autocvar_g_movement_highspeed * maxspd_mod;
+       self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * maxspd_mod;
+       self.stat_sv_maxspeed = sv_maxspeed * maxspd_mod; // also slow walking
 
     if(self.PlayerPhysplug)
         if(self.PlayerPhysplug())
@@ -849,21 +848,6 @@ void SV_PlayerPhysics()
 
        maxspd_mod = 1;
 
-       if(g_runematch)
-       {
-               if(self.runes & RUNE_SPEED)
-               {
-                       if(self.runes & CURSE_SLOW)
-                               maxspd_mod = maxspd_mod * cvar("g_balance_rune_speed_combo_moverate");
-                       else
-                               maxspd_mod = maxspd_mod * cvar("g_balance_rune_speed_moverate");
-               }
-               else if(self.runes & CURSE_SLOW)
-               {
-                       maxspd_mod = maxspd_mod * cvar("g_balance_curse_slow_moverate");
-               }
-       }
-
        swampspd_mod = 1;
        if(self.in_swamp) {
                swampspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate");
@@ -892,7 +876,7 @@ void SV_PlayerPhysics()
                maxspd_mod = self.spectatorspeed;
        }
 
-       spd = max(sv_maxspeed, sv_maxairspeed) * maxspd_mod * swampspd_mod;
+       spd = max(self.stat_sv_maxspeed, sv_maxairspeed) * maxspd_mod * swampspd_mod;
        if(self.speed != spd)
        {
                self.speed = spd;
@@ -988,8 +972,8 @@ void SV_PlayerPhysics()
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = vlen(wishvel);
-               if (wishspeed > sv_maxspeed*maxspd_mod)
-                       wishspeed = sv_maxspeed*maxspd_mod;
+               if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+                       wishspeed = self.stat_sv_maxspeed*maxspd_mod;
                if (time >= self.teleport_time)
                        PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0);
        }
@@ -1006,8 +990,8 @@ void SV_PlayerPhysics()
 
                wishdir = normalize(wishvel);
                wishspeed = vlen(wishvel);
-               if (wishspeed > sv_maxspeed*maxspd_mod)
-                       wishspeed = sv_maxspeed*maxspd_mod;
+               if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+                       wishspeed = self.stat_sv_maxspeed*maxspd_mod;
                wishspeed = wishspeed * 0.7;
 
                // water friction
@@ -1052,8 +1036,8 @@ void SV_PlayerPhysics()
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = vlen(wishvel);
-               if (wishspeed > sv_maxspeed*maxspd_mod)
-                       wishspeed = sv_maxspeed*maxspd_mod;
+               if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+                       wishspeed = self.stat_sv_maxspeed*maxspd_mod;
                if (time >= self.teleport_time)
                {
                        // water acceleration
@@ -1212,8 +1196,8 @@ void SV_PlayerPhysics()
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = vlen(wishvel);
-               if (wishspeed > sv_maxspeed*maxspd_mod)
-                       wishspeed = sv_maxspeed*maxspd_mod;
+               if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+                       wishspeed = self.stat_sv_maxspeed*maxspd_mod;
                if (self.crouch)
                        wishspeed = wishspeed * 0.5;
                if (time >= self.teleport_time)
@@ -1242,8 +1226,8 @@ void SV_PlayerPhysics()
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = wishspeed0 = vlen(wishvel);
-               if (wishspeed0 > sv_maxspeed*maxspd_mod)
-                       wishspeed0 = sv_maxspeed*maxspd_mod;
+               if (wishspeed0 > self.stat_sv_maxspeed*maxspd_mod)
+                       wishspeed0 = self.stat_sv_maxspeed*maxspd_mod;
                if (wishspeed > maxairspd)
                        wishspeed = maxairspd;
                if (self.crouch)
index d369298..b445849 100644 (file)
@@ -531,6 +531,7 @@ float game_starttime; //point in time when the countdown is over
 .float stat_sv_airaccel_qw;
 .float stat_sv_airstrafeaccel_qw;
 .float stat_sv_airspeedlimit_nonqw;
+.float stat_sv_maxspeed;
 
 void W_Porto_Remove (entity p);
 
index f381612..c6fe74b 100644 (file)
@@ -816,6 +816,7 @@ void spawnfunc_worldspawn (void)
        }
        // g_movementspeed hack
        addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
+       addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
        addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
        addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);