]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc
Reduce name space of resource constants and variables (RESOURCE_* --> RES_*, resour...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / domination / sv_domination.qc
index 78ff64e5146b4e2a75cdc5670c8ba3ab01bf5316..e8c75d6d0f1cac24a0ce0aa0a0f65f381ccf5198 100644 (file)
@@ -69,10 +69,12 @@ void dompoint_captured(entity this)
                this.enemy = NULL;
 
        if (head.noise != "")
+       {
                if(this.enemy)
                        _sound(this.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
                else
                        _sound(this, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
+       }
        if (head.noise1 != "")
                play2all(head.noise1);
 
@@ -188,7 +190,7 @@ void dompointtouch(entity this, entity toucher)
 {
        if(!IS_PLAYER(toucher))
                return;
-       if(GetResourceAmount(toucher, RESOURCE_HEALTH) < 1)
+       if(GetResourceAmount(toucher, RES_HEALTH) < 1)
                return;
 
        if(round_handler_IsActive() && !round_handler_IsRoundStarted())
@@ -466,10 +468,7 @@ MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
        entity player = M_ARGV(0, entity);
 
        if(domination_roundbased)
-       if(!round_handler_IsRoundStarted())
-               player.player_blocked = 1;
-       else
-               player.player_blocked = 0;
+               player.player_blocked = !round_handler_IsRoundStarted();
 }
 
 MUTATOR_HOOKFUNCTION(dom, ClientConnect)