]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
Merge branch 'Mario/playerdemo_removal'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / onslaught / sv_onslaught.qc
index 12475bb7327ea84d1d72900bfd781c1d1d0f260b..fd050df0a0f541cc0137303fe86ad15ab26ba60b 100644 (file)
@@ -449,7 +449,7 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker
 
 bool ons_ControlPoint_Icon_Heal(entity targ, entity inflictor, float amount, float limit)
 {
-       float true_limit = ((limit) ? 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;
 
@@ -963,7 +963,7 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d
 
 bool ons_GeneratorHeal(entity targ, entity inflictor, float amount, float limit)
 {
-       float true_limit = ((limit) ? 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;