@@ -7,10 +7,8 @@ function Update(self)
7
7
if parent and IsActor (parent ) then
8
8
parent = ToActor (parent );
9
9
local target ;
10
- local extend = 0 ;
11
- if parent :GetController ():IsState (Controller .AIM_SHARP ) then
12
- extend = self .Radius ; -- Reach out further
13
- end
10
+ local extend = parent :GetController ():IsState (Controller .AIM_SHARP ) and self .Radius or 0 ;
11
+
14
12
for actor in MovableMan .Actors do
15
13
local dist = SceneMan :ShortestDistance (self .MuzzlePos , actor .Pos , SceneMan .SceneWrapsX );
16
14
if dist .Magnitude < (actor .Radius + extend ) and actor .Team == self .Team and actor .ID ~= parent .ID then
@@ -31,11 +29,11 @@ function Update(self)
31
29
target :FlashWhite (50 );
32
30
AudioMan :PlaySound (" Base.rte/Sounds/GUIs/SlicePicked.wav" , SceneMan :TargetDistanceScalar (self .Pos ), false , true , - 1 );
33
31
34
- local radist = math.ceil (5 + target .Radius / 2 );
35
- for i = 1 , radist do
32
+ local targetSize = math.ceil (5 + target .Radius / 2 );
33
+ for i = 1 , targetSize do
36
34
local part = CreateMOPixel (" Heal Glow" , " Base.rte" );
37
- local vec = Vector (radist * 2 , 0 ):RadRotate (6.28 / radist * i );
38
- part .Pos = target .Pos + Vector (0 , - radist / 3 ):RadRotate (target .RotAngle ) + vec ;
35
+ local vec = Vector (targetSize * 2 , 0 ):RadRotate (6.28 / targetSize * i );
36
+ part .Pos = target .Pos + Vector (0 , - targetSize / 3 ):RadRotate (target .RotAngle ) + vec ;
39
37
part .Vel = target .Vel * 0.5 - Vector (vec .X , vec .Y ) / 4 ;
40
38
MovableMan :AddParticle (part );
41
39
end
0 commit comments