Skip to content

Commit 0c61207

Browse files
committed
Medikit "tweak"
1 parent b223b83 commit 0c61207

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Data/Base.rte/Devices/Special/Medikit/Medikit.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ function OnFire(self)
3939
local cross = CreateMOSParticle("Particle Heal Effect", "Base.rte");
4040
cross.Pos = target.AboveHUDPos + Vector(0, 5);
4141
MovableMan:AddParticle(cross);
42+
43+
if target.Status == Actor.DEAD and target.Health == target.MaxHealth and target.WoundCount == 0 then
44+
local newActor = target:Clone();
45+
target.ToDelete = true;
46+
newActor:SetControllerMode(Controller.CIM_AI, -1);
47+
newActor.Status = Actor.STABLE;
48+
MovableMan:AddActor(newActor);
49+
newActor:FlashWhite(50);
50+
ActivityMan:GetActivity():ReportDeath(target.Team, -1);
51+
end
4252
else
4353
self.errorSound:Play(self.Pos);
4454
if self.Magazine then

0 commit comments

Comments
 (0)