]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/sv_monsters.qc
Merge branch 'master' into Mario/event_heal
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qc
index c208e779ac59506df3a616598bbbb3a7477f5b2e..810732b10ac62a4b55da2efbe40371eeec4df0ff 100644 (file)
@@ -1061,7 +1061,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
 
 bool Monster_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;