Fix impossibility of joining an LMS game introduced by b609dc6 "Don't log frags and...
authorterencehill <piuntn@gmail.com>
Mon, 25 May 2020 21:55:37 +0000 (23:55 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 May 2020 21:55:37 +0000 (23:55 +0200)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/server/scores.qc

index 408a14e..73d127b 100644 (file)
@@ -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);
index 69b18ba..12175bb 100644 (file)
@@ -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;
        }