]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable bloodloss when the match has ended, fixes cases where players instantly die...
authorMario <mario.mario@y7mail.com>
Mon, 6 Jan 2020 11:56:25 +0000 (21:56 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 6 Jan 2020 11:56:25 +0000 (21:56 +1000)
qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc

index a89691d2016a3591c572df9c93a7956a39cf8af3..95356bb4f7f746934d961f9d4b7571c13c3ef581 100644 (file)
@@ -9,6 +9,9 @@ MUTATOR_HOOKFUNCTION(bloodloss, PlayerPreThink)
 {
        entity player = M_ARGV(0, entity);
 
+       if(game_stopped)
+               return; // during intermission, the player's health changes to strange values for the engine, let's not cause damage during this phase!
+
        if(IS_PLAYER(player))
        if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss && !IS_DEAD(player))
        {