From: terencehill Date: Mon, 25 May 2020 21:55:37 +0000 (+0200) Subject: Fix impossibility of joining an LMS game introduced by b609dc6 "Don't log frags and... X-Git-Tag: xonotic-v0.8.5~1028 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d0e30ec97abee8b2da5ce1ec18da5bed3babb31d;p=xonotic%2Fxonotic-data.pk3dir.git Fix impossibility of joining an LMS game introduced by b609dc6 "Don't log frags and damage while round hasn't started yet (telefrags, lava, trigger_hurt)". This new implementation of b609dc6 restores the logging of frags --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index 408a14e0d..73d127bd4 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -377,6 +377,9 @@ MUTATOR_HOOKFUNCTION(ca, FilterItem) MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor) { + if (time < game_starttime || (round_handler_IsActive() && !round_handler_IsRoundStarted())) + return; + entity frag_attacker = M_ARGV(1, entity); entity frag_target = M_ARGV(2, entity); float frag_damage = M_ARGV(7, float); diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 69b18ba2a..12175bb76 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -108,8 +108,7 @@ float TeamScore_AddToTeam(int t, float scorefield, float score) { entity s; - if(game_stopped || time < game_starttime - || (round_handler_IsActive() && !round_handler_IsRoundStarted())) + if(game_stopped) { score = 0; } @@ -338,8 +337,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score) bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score, player); score = M_ARGV(1, float); - if((!mutator_returnvalue && game_stopped) || time < game_starttime - || (round_handler_IsActive() && !round_handler_IsRoundStarted())) + if(!mutator_returnvalue && game_stopped) { score = 0; }