float autocvar_sv_track_canjump;
bool autocvar_sv_showspectators;
bool autocvar_g_weaponswitch_debug;
+bool autocvar_g_allow_checkpoints;
// this one just has to exist
}
-bool autocvar_g_allow_checkpoints;
float CheatImpulse(entity this, int imp)
{
BEGIN_CHEAT_FUNCTION();
{
delete(this.personal);
this.personal = NULL;
+
+ if((g_cts || g_race) && autocvar_g_allow_checkpoints)
+ ClientKill(this);
}
sprint(this, "personal waypoint cleared\n");
}
}
}
+MUTATOR_HOOKFUNCTION(cts, AbortSpeedrun)
+{
+ entity player = M_ARGV(0, entity);
+
+ if(autocvar_g_allow_checkpoints)
+ race_PreparePlayer(player); // nice try
+}
+
MUTATOR_HOOKFUNCTION(cts, MakePlayerObserver)
{
entity player = M_ARGV(0, entity);
return wc;
}
+MUTATOR_HOOKFUNCTION(rc, AbortSpeedrun)
+{
+ entity player = M_ARGV(0, entity);
+
+ if(autocvar_g_allow_checkpoints)
+ race_PreparePlayer(player); // nice try
+}
+
MUTATOR_HOOKFUNCTION(rc, PlayerPhysics)
{
entity player = M_ARGV(0, entity);
void checkpoint_passed(entity this, entity player)
{
+ if(player.personal && autocvar_g_allow_checkpoints)
+ return; // practice mode!
+
string oldmsg;
entity cp;