File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Data/Techion.rte/Devices/Weapons/Nucleo Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function Explode(self)
19
19
melter .Pos = self .Pos ;
20
20
melter .Team = self .Team ;
21
21
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 ) ));
23
23
MovableMan :AddMO (melter );
24
24
end
25
25
end
@@ -118,10 +118,12 @@ function ThreadedUpdate(self)
118
118
end
119
119
120
120
function SyncedUpdate (self )
121
- for k , particle in pairs (self .connectableParticles ) do
122
- if MovableMan :ValidMO (particle ) then
123
- particle .Pos = self .Pos + Vector (math.random () * 5 , 0 ):RadRotate (math.random () * math.pi * 2 );
124
- 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
125
127
end
126
128
end
127
129
You can’t perform that action at this time.
0 commit comments