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

Commit 40366ad

Browse files
committed
Review changes
1 parent 1b27354 commit 40366ad

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Base.rte/Craft/Shared/ScuttleExplosions.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ function Create(self)
44
self.height = ToMOSprite(self):GetSpriteHeight();
55
self.width = ToMOSprite(self):GetSpriteWidth();
66

7-
if self:NumberValueExists("ScuttleExplosionDelay") then
8-
self.explosionDelay = self:GetNumberValue("ScuttleExplosionDelay");
9-
else
10-
self.explosionDelay = 5000/math.sqrt(self.width + self.height);
11-
end
7+
self.explosionDelay = self:NumberValueExists("ScuttleExplosionDelay") and self:GetNumberValue("ScuttleExplosionDelay") or 5000/math.sqrt(self.width + self.height);
128
end
139
function Update(self)
1410
if self.Status > Actor.INACTIVE or self.AIMode == Actor.AIMODE_SCUTTLE then
1511
if self.explosionTimer:IsPastSimMS(self.explosionDelay) then
1612
self.explosionTimer:Reset();
1713
local explosion = CreateAEmitter("Scuttle Explosion");
18-
explosion.Pos = self.Pos + Vector(self.width/2 * RangeRand(-0.9, 0.9), self.height * 0.5 * RangeRand(-0.9, 0.9)):RadRotate(self.RotAngle);
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);
1915
explosion.Vel = self.Vel;
2016
MovableMan:AddParticle(explosion);
2117
end

Browncoats.rte/Devices/Explosives/FuelBomb/FuelBomb.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Create(self)
1212
for i = 1, self.numOfParticles do
1313
self.partList[i] = CreateMOPixel("Browncoat Fuel Bomb Fuel");
1414
self.partList[i].Pos = self.Pos;
15-
self.partList[i].Vel = Vector(math.random(20), 0):RadRotate(6.283 * math.random()) + self.Vel;
15+
self.partList[i].Vel = Vector(math.random(20), 0):RadRotate(math.pi * 2 * math.random()) + self.Vel;
1616
MovableMan:AddParticle(self.partList[i]);
1717
self.partList[i].queue = math.abs(self.partList[i].Vel.X - self.Vel.X) * TimerMan.DeltaTimeMS;
1818

@@ -62,7 +62,7 @@ function Update(self)
6262
firePar.Vel = self.Vel + Vector(RangeRand(-20, 20), -math.random(-10, 30));
6363
else
6464
firePar = CreateMOSParticle("Flame Smoke 2");
65-
firePar.Vel = self.Vel + Vector(math.random() * j, 0):RadRotate(math.random() * 6.28);
65+
firePar.Vel = self.Vel + Vector(math.random() * j, 0):RadRotate(math.random() * math.pi * 2);
6666
firePar.Lifetime = math.random(500, 1000);
6767
firePar.GlobalAccScalar = RangeRand(-0.6, -0.1);
6868
end

0 commit comments

Comments
 (0)