return false;
}
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(nb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nb, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.ballcarried)
- {
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nexball_basketball_carrier_highspeed;
- player.stat_sv_maxspeed *= autocvar_g_nexball_basketball_carrier_highspeed;
- }
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nexball_basketball_carrier_highspeed;
}
MUTATOR_HOOKFUNCTION(nb, ForbidThrowCurrentWeapon)
}
}
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.items & ITEM_Speed.m_itemid)
- player.stat_sv_maxspeed = player.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed;
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_instagib_speed_highspeed;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_SplitHealthArmor)
}
}
-MUTATOR_HOOKFUNCTION(nades, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nades, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
- if (STAT(ENTRAP_ORB, player) > time)
- {
- player.stat_sv_maxspeed *= autocvar_g_nades_entrap_speed;
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nades_entrap_speed;
- }
+ if(STAT(ENTRAP_ORB, player) > time)
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nades_entrap_speed;
}
MUTATOR_HOOKFUNCTION(nades, MonsterMove)
void PM_UpdateButtons(entity this, entity store);
- // TODO: modify maxspeed_mod and get rid of these!
- .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW);
- .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);
-
/** Not real stats */
.string jumpspeedcap_min;
.string jumpspeedcap_max;
player.effects |= autocvar_g_keepaway_ballcarrier_effects;
}
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
-MUTATOR_HOOKFUNCTION(ka, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(ka, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.ballcarried)
- {
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_keepaway_ballcarrier_highspeed;
- player.stat_sv_maxspeed *= autocvar_g_keepaway_ballcarrier_highspeed;
- }
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_keepaway_ballcarrier_highspeed;
}
MUTATOR_HOOKFUNCTION(ka, BotShouldAttack)