set g_cts_respawn_waves 0
set g_cts_respawn_delay 0
set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
+set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible"
// overtime
seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
ClientKill_TeamChange(0);
}
+void CTS_ClientKill_Think (void)
+{
+ self = self.owner; // set self to the player to be killed
+ sprint(self, "^1You were killed in order to prevent cheating!");
+ ClientKill_Now();
+}
+
+void CTS_ClientKill (float t) // silent version of ClientKill
+{
+ entity e;
+ spawn(e);
+ e.owner = self;
+ e.think = CTS_ClientKill_Think;
+ e.nextthink = t;
+}
+
void DoTeamChange(float destteam)
{
float t, c0;
if(t != 0) {
if(cp == race_timed_checkpoint)
+ {
race_SetTime(e, t, recordtime);
+ if(g_cts && cvar("g_cts_finish_kill_delay"))
+ {
+ CTS_ClientKill(cvar("g_cts_finish_kill_delay"));
+ }
if(t < recordtime || recordtime == 0)
{