From 70cd14a8af78f497323ec266b48425b82c142809 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 7 Jan 2024 18:54:10 +0100 Subject: [PATCH] Fix players not considered eliminated if they joined a team without spawning; also fix "you were frozen by X" shown if you get eliminated --- qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, -- 2.39.2