From: terencehill Date: Tue, 18 Dec 2012 23:58:23 +0000 (+0100) Subject: Some1 created ITEM_DAMAGE_NEEDKILL, why not use it? Also remove DEATH_FALL (shouldn... X-Git-Tag: xonotic-v0.7.0~61^2~79 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e34db72847444accc024869f80eba19662c25887;p=xonotic%2Fxonotic-data.pk3dir.git Some1 created ITEM_DAMAGE_NEEDKILL, why not use it? Also remove DEATH_FALL (shouldn't have been added) and DEATH_DROWN (could be fun to revive a player under water) --- diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index abb21b02f..ca06458b0 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -328,28 +328,21 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies) return 1; // let the player die so that he can respawn whenever he wants } - switch(frag_deathtype) + // Cases DEATH_TEAMCHANGE and DEATH_AUTOTEAMCHANGE are needed to fix a bug whe + // you succeed changing team through the menu: you both really die (gibbing) and get frozen + if(ITEM_DAMAGE_NEEDKILL(frag_deathtype) + || frag_deathtype == DEATH_TEAMCHANGE || frag_deathtype == DEATH_AUTOTEAMCHANGE) { - case DEATH_HURTTRIGGER: - case DEATH_FALL: - case DEATH_DROWN: - case DEATH_LAVA: - case DEATH_SLIME: - case DEATH_SWAMP: - case DEATH_TEAMCHANGE: - case DEATH_AUTOTEAMCHANGE: + // let the player die, he will be automatically frozen when he respawns + if(!self.freezetag_frozen) { - // let the player die, he will be automatically frozen when he respawns - if(!self.freezetag_frozen) - { - freezetag_Add_Score(frag_attacker); - freezetag_count_alive_players(); - } - else - freezetag_Unfreeze(world); // remove ice - self.freezetag_frozen_timeout = -2; // freeze on respawn - return 1; + freezetag_Add_Score(frag_attacker); + freezetag_count_alive_players(); } + else + freezetag_Unfreeze(world); // remove ice + self.freezetag_frozen_timeout = -2; // freeze on respawn + return 1; } if(self.freezetag_frozen)