]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/assault/assault.qc
Use the new unlimited resource constant
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / assault / assault.qc
index b9b5c361ce737596a410bf66c02d89419f57211d..9a2d6af1d86f4efbfb300b774d22f0ed6b9dae06 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 >= 0) ? limit : targ.max_health);
+       float true_limit = ((limit != RESOURCE_LIMIT_NONE) ? limit : targ.max_health);
        if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
                return false;