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
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 @@ -55,10 +55,10 @@ function Update(self)
55
55
end
56
56
actor = ToAHuman (actor );
57
57
local rotationThisFrame = actor .AngularVel * TimerMan .DeltaTimeSecs ;
58
- local maxVel = self .projectileVelMax or (actor .FGArm .ThrowStrength + math.abs (actor .AngularVel * 0.5 ) * math.cos ( actor . RotAngle + rotationThisFrame ) )/ math.sqrt (math.abs (self .Mass ) + 1 );
58
+ local maxVel = self .projectileVelMax or (actor .FGArm .ThrowStrength + math.abs (actor .AngularVel * 0.5 ))/ math.sqrt (math.abs (self .Mass ) + 1 );
59
59
local minVel = self .projectileVelMin or maxVel * 0.2 ;
60
60
-- The following offset is as found in the source code (To-do: expose and utilize EndThrowOffset properly instead)
61
- guideParPos = actor .Pos + actor .Vel * rte .PxTravelledPerFrame + Vector ((actor .FGArm .ParentOffset .X + actor .FGArm .MaxLength ) * actor .FlipFactor , actor .FGArm .ParentOffset .Y - 6 ):RadRotate (actor :GetAimAngle (false ) * actor .FlipFactor );
61
+ 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 );
62
62
local projectileVel = self .throwTimer and minVel + (maxVel - minVel ) * math.min (self .throwTimer .ElapsedSimTimeMS , actor .ThrowPrepTime )/ actor .ThrowPrepTime or maxVel ;
63
63
guideParVel = Vector (projectileVel , 0 ):RadRotate (actor .RotAngle + actor :GetAimAngle (true ) + rotationThisFrame );
64
64
else
You can’t perform that action at this time.
0 commit comments