This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Data/Base.rte/Devices/Shared/Scripts Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 34
34
35
35
function Update (self )
36
36
local actor = self :GetRootParent ();
37
- if MovableMan :IsActor (actor ) and ToActor (actor ):IsPlayerControlled () and not self :IsReloading () then
37
+ if IsActor ( actor ) and MovableMan :ValidMO (actor ) and ToActor (actor ):IsPlayerControlled () and not self :IsReloading () then
38
38
local actor = ToActor (actor );
39
39
local controller = actor :GetController ();
40
40
if not self .isThrownDevice and (self :DoneReloading () or self .FiredFrame ) and self .Magazine and self .Magazine .RoundCount ~= 0 then
@@ -58,7 +58,7 @@ function Update(self)
58
58
-- The following offset is as found in the source code (TODO: utilize EndThrowOffset properly instead)
59
59
guideParPos = actor .Pos + actor .Vel * rte .PxTravelledPerFrame + Vector ((actor .FGArm .ParentOffset .X + actor .FGArm .MaxLength ) * actor .FlipFactor , actor .FGArm .ParentOffset .Y - actor .FGArm .MaxLength * 0.5 ):RadRotate (actor :GetAimAngle (false ) * actor .FlipFactor );
60
60
guideParVel = Vector (minVel + (maxVel - minVel ) * throwProgress , 0 ):RadRotate (actor :GetAimAngle (true ));
61
- else
61
+ elseif not self . isThrownDevice then
62
62
guideParPos = self .MuzzlePos ;
63
63
guideParVel = Vector (self .projectileVel , 0 ):RadRotate (actor :GetAimAngle (true ));
64
64
end
You can’t perform that action at this time.
0 commit comments