Skip to content

Commit 68e8474

Browse files
authored
Merge branch 'development' into misc-sound-additions
2 parents 4280ba1 + b87e2ad commit 68e8474

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3131

3232
- Reverted a change to pathfinding, that although was technically accurate, caused issues with the AI being too eager to path up-and-over obstacles instead of through them. In the future this will likely be revisited when we get jump-aware pathfinding.
3333

34+
- Fixed nucleo shots breaking if saving and loading them mid explosion sequence.
35+
3436
- Fixed Dummy Assault resetting funds to their initial value upon loading a saved game.
3537

3638
</details>

Data/Techion.rte/Devices/Weapons/Nucleo/NucleoShot.lua

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Explode(self)
1919
melter.Pos = self.Pos;
2020
melter.Team = self.Team;
2121
melter.Sharpness = ToActor(parent).ID;
22-
melter.PinStrength = self.disintegrationStrength * math.sqrt(math.max(1, #self.connectableParticles));
22+
melter.PinStrength = self.disintegrationStrength * math.sqrt(math.max(1, (self.connectableParticles and #self.connectableParticles or 1)));
2323
MovableMan:AddMO(melter);
2424
end
2525
end
@@ -54,6 +54,7 @@ end
5454

5555
function Create(self)
5656
self.detTimer = Timer();
57+
self.detDelay = 1000;
5758
self.boom = false;
5859

5960
self.speed = 15;
@@ -117,10 +118,12 @@ function ThreadedUpdate(self)
117118
end
118119

119120
function SyncedUpdate(self)
120-
for k, particle in pairs(self.connectableParticles) do
121-
if MovableMan:ValidMO(particle) then
122-
particle.Pos = self.Pos + Vector(math.random() * 5, 0):RadRotate(math.random() * math.pi * 2);
123-
particle:SendMessage("Nucleo_Explode");
121+
if self.connectableParticles then
122+
for k, particle in pairs(self.connectableParticles) do
123+
if MovableMan:ValidMO(particle) then
124+
particle.Pos = self.Pos + Vector(math.random() * 5, 0):RadRotate(math.random() * math.pi * 2);
125+
particle:SendMessage("Nucleo_Explode");
126+
end
124127
end
125128
end
126129

0 commit comments

Comments
 (0)