From: FruitieX Date: Tue, 26 Oct 2010 15:42:55 +0000 (+0300) Subject: Merge remote branch 'origin/master' into fruitiex/racefixes X-Git-Tag: xonotic-v0.1.0preview~202^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4c1fcf7b3bdaee8fd10d48d2ac5b21c3a9371de1;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/master' into fruitiex/racefixes --- 4c1fcf7b3bdaee8fd10d48d2ac5b21c3a9371de1 diff --cc qcsrc/server/cl_client.qc index a5ec05c02,bb2b753b8..76f81c8d7 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@@ -1305,25 -1305,14 +1305,30 @@@ void ClientKill_TeamChange (float targe void ClientKill (void) { - ClientKill_TeamChange(0); + if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either + { + // do nothing + } + else + 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; + e = spawn(); + e.owner = self; + e.think = CTS_ClientKill_Think; + e.nextthink = t; +} + void DoTeamChange(float destteam) { float t, c0;