From: FruitieX Date: Tue, 16 Nov 2010 07:30:38 +0000 (+0200) Subject: fix code for checking if player killed himself, also print a message to someone spawn... X-Git-Tag: xonotic-v0.1.0preview~86^2~2^2~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c23ff882d8450885a7453c29071c913316ee8649;p=xonotic%2Fxonotic-data.pk3dir.git fix code for checking if player killed himself, also print a message to someone spawning after the round notifying them of why they are frozen --- diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 21602b474..4f1d69eaa 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -103,15 +103,15 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies) freezetag_Freeze(); centerprint(frag_attacker, strcat("^2You froze ^7", frag_target.netname, ".\n")); - if(frag_target.netname != "") + if(frag_attacker == frag_target || frag_attacker == world) { - centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n")); - bprint("^7", frag_target.netname, "^1 was frozen by ^7", frag_attacker.netname, ".\n"); + centerprint(frag_target, strcat("^1You froze yourself.\n")); + bprint("^7", frag_target.netname, "^1 froze himself.\n"); } else { - centerprint(frag_target, strcat("^1You froze yourself.\n")); - bprint("^7", frag_target.netname, "^1 froze himself.\n"); + centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n")); + bprint("^7", frag_target.netname, "^1 was frozen by ^7", frag_attacker.netname, ".\n"); } frag_target.health = cvar("g_balance_health_start"); // "respawn" the player :P @@ -128,6 +128,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn) if(time > warmup) // spawn too late, freeze player { + centerprint(self, strcat("^1You spawned after the round started, you'll spawn as frozen.\n")); freezetag_Freeze(); } else // we are still in the delay period before the round starts