+#include "gamemode_race.qh"
+#include "../_all.qh"
+
+#include "gamemode.qh"
+
+#include "../race.qh"
+
// legacy bot roles
.float race_checkpoint;
void havocbot_role_race()
// ensure nothing EVIL is being done (i.e. div0_evade)
// this hinders joystick users though
// but it still gives SOME analog control
- wishvel_x = fabs(self.movement.x);
- wishvel_y = fabs(self.movement.y);
+ wishvel.x = fabs(self.movement.x);
+ wishvel.y = fabs(self.movement.y);
if(wishvel.x != 0 && wishvel.y != 0 && wishvel.x != wishvel.y)
{
- wishvel_z = 0;
+ wishvel.z = 0;
wishspeed = vlen(wishvel);
if(wishvel.x >= 2 * wishvel.y)
{
self.movement_y = -M_SQRT1_2 * wishspeed;
}
}
-
+
return false;
}
cvar_set("timelimit", ftos(race_timelimit));
race_ScoreRules();
}
-
+
return false;
}
self.race_respawn_spotref = spawn_spot;
self.race_place = 0;
-
+
return false;
}
return false;
}
+MUTATOR_HOOKFUNCTION(race_CountFrags)
+{
+ // announce remaining frags if not in qualifying mode
+ if(!g_race_qualifying)
+ return true;
+
+ return false;
+}
+
void race_Initialize()
{
race_ScoreRules();
MUTATOR_HOOK(GetPressedKeys, race_PlayerPostThink, CBC_ORDER_ANY);
MUTATOR_HOOK(ForbidPlayerScore_Clear, race_ForbidClearPlayerScore, CBC_ORDER_ANY);
MUTATOR_HOOK(GetTeamCount, race_GetTeamCount, CBC_ORDER_ANY);
+ MUTATOR_HOOK(Scores_CountFragsRemaining, race_CountFrags, CBC_ORDER_ANY);
MUTATOR_ONADD
{
MUTATOR_ONREMOVE
{
- print("This is a game type and it cannot be removed at runtime.");
+ LOG_INFO("This is a game type and it cannot be removed at runtime.");
return -1;
}