From: terencehill Date: Sun, 7 Jan 2024 17:54:10 +0000 (+0100) Subject: Fix players not considered eliminated if they joined a team without spawning; also... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F1257%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Fix players not considered eliminated if they joined a team without spawning; also fix "you were frozen by X" shown if you get eliminated --- diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index 812b1081e..6d9edbb6d 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -224,6 +224,8 @@ bool freezetag_isEliminated(entity e) return true; if(INGAME_JOINED(e) && e.frags == FRAGS_PLAYER_OUT_OF_GAME) return true; + if(INGAME_JOINING(e)) + return true; return false; } @@ -977,8 +979,9 @@ MUTATOR_HOOKFUNCTION(ft, FragCenterMessage) int kill_count_to_attacker = M_ARGV(3, int); int kill_count_to_target = M_ARGV(4, int); - if(STAT(FROZEN, frag_target) == FROZEN_NORMAL) - return; // target was already frozen, so this is just pushing them off the cliff + // here number of lives has not yet been decreased so we check == 0 instead of -1 + if(STAT(FROZEN, frag_target) == FROZEN_NORMAL || frag_target.lives == 0) + return; Send_Notification(NOTIF_ONE, frag_attacker, MSG_CHOICE, CHOICE_FRAG_FREEZE, frag_target.netname, kill_count_to_attacker, (IS_BOT_CLIENT(frag_target) ? -1 : CS(frag_target).ping)); Send_Notification(NOTIF_ONE, frag_target, MSG_CHOICE, CHOICE_FRAGGED_FREEZE, frag_attacker.netname, kill_count_to_target,