Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit f138c76

Browse files
committed
Fix self-heal script giving extra health when damage multiplier is <1
1 parent 2932e94 commit f138c76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Data/Base.rte/Actors/Shared/Scripts/SelfHeal.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ function Update(self)
1111
if self.healing.wound then
1212
if self.healing.timer:IsPastSimMS(self.healing.delay) then
1313
self.healing.timer:Reset();
14-
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * math.sqrt(self.healing.part.DamageMultiplier), self.MaxHealth);
14+
if self.healing.part.DamageMultiplier > 1 then
15+
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * math.sqrt(self.healing.part.DamageMultiplier), self.MaxHealth);
16+
else
17+
self.Health = math.min(self.Health + self.healing.wound.BurstDamage * self.healing.part.DamageMultiplier, self.MaxHealth);
18+
end
1519
self.healing.wound.ToDelete = true;
1620
self.healing.wound = nil;
1721
for wound in self.healing.part.Wounds do

0 commit comments

Comments
 (0)