]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/assault/assault.qc
To match resource limit behaviour, set the 'unlimited' limit to -1 in event_heal...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / assault / assault.qc
index 8fb63a9ad5725b2a088d08cd904a06d991938fa2..b9b5c361ce737596a410bf66c02d89419f57211d 100644 (file)
@@ -333,7 +333,7 @@ spawnfunc(target_objective_decrease)
 // destructible walls that can be used to trigger target_objective_decrease
 bool destructible_heal(entity targ, entity inflictor, float amount, float limit)
 {
-       float true_limit = ((limit) ? limit : targ.max_health);
+       float true_limit = ((limit >= 0) ? limit : targ.max_health);
        if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
                return false;