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

Commit f86f430

Browse files
committed
Tweaks to scuttle scripts
1 parent cb6388b commit f86f430

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Data/Base.rte/Craft/Shared/ScuttleExplosions.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ function Create(self)
88
end
99

1010
function Update(self)
11-
if self.Status > Actor.INACTIVE or self.AIMode == Actor.AIMODE_SCUTTLE then
12-
if self.explosionTimer:IsPastSimMS(self.explosionDelay) then
13-
self.explosionTimer:Reset();
14-
local explosion = CreateAEmitter("Scuttle Explosion");
15-
explosion.Pos = self.Pos + Vector(self.width * 0.5 * RangeRand(-0.9, 0.9), self.height * 0.5 * RangeRand(-0.9, 0.9)):RadRotate(self.RotAngle);
16-
explosion.Vel = self.Vel;
17-
MovableMan:AddParticle(explosion);
18-
end
11+
if self.Status == Actor.DYING and self.explosionTimer:IsPastSimMS(self.explosionDelay) then
12+
self.explosionTimer:Reset();
13+
local explosion = CreateAEmitter("Scuttle Explosion", "Base.rte");
14+
explosion.Pos = self.Pos + Vector(self.width * 0.5 * RangeRand(-0.9, 0.9), self.height * 0.5 * RangeRand(-0.9, 0.9)):RadRotate(self.RotAngle);
15+
explosion.Vel = self.Vel;
16+
MovableMan:AddParticle(explosion);
1917
end
2018
end

Data/Base.rte/Scripts/Global/NoScuttle.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ function NoScuttleScript:UpdateScript()
22
for actor in MovableMan.AddedActors do
33
if IsACDropShip(actor) or IsACRocket(actor) then
44
ToACraft(actor).ScuttleOnDeath = false;
5-
actor:DisableScript("Base.rte/Craft/Shared/ScuttleExplosions.lua");
65
end
76
end
87
end

0 commit comments

Comments
 (0)