#endif
}
-float PM_check_keepaway(void)
-{
-#ifdef SVQC
- return (self.ballcarried && g_keepaway) ? autocvar_g_keepaway_ballcarrier_highspeed : 1;
-#else
- return 1;
-#endif
-}
-
void PM_check_race_movetime(void)
{
#ifdef SVQC
WarpZone_PlayerPhysics_FixVAngle();
#endif
float maxspeed_mod = 1;
- maxspeed_mod *= PM_check_keepaway();
maxspeed_mod *= PHYS_HIGHSPEED;
#ifdef SVQC
return 0;
}
+MUTATOR_HOOKFUNCTION(ka_PlayerPhysics)
+{
+ if(self.ballcarried)
+ {
+ self.stat_sv_airspeedlimit_nonqw *= autocvar_g_keepaway_ballcarrier_highspeed;
+ self.stat_sv_maxspeed *= autocvar_g_keepaway_ballcarrier_highspeed;
+ }
+ return false;
+}
+
MUTATOR_HOOKFUNCTION(ka_BotShouldAttack)
{
// if neither player has ball then don't attack unless the ball is on the ground
MUTATOR_HOOK(PlayerDamage_Calculate, ka_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPowerups, ka_PlayerPowerups, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerUseKey, ka_PlayerUseKey, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerPhysics, ka_PlayerPhysics, CBC_ORDER_ANY);
MUTATOR_HOOK(BotShouldAttack, ka_BotShouldAttack, CBC_ORDER_ANY);
MUTATOR_HOOK(HavocBot_ChooseRole, ka_BotRoles, CBC_ORDER_ANY);