Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 5f68f28

Browse files
committed
Followup to review changes
1 parent e2e8be7 commit 5f68f28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Base.rte/Devices/Shared/Scripts/TrajectoryGuide.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ function Update(self)
5555
end
5656
actor = ToAHuman(actor);
5757
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);
5959
local minVel = self.projectileVelMin or maxVel * 0.2;
6060
--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);
6262
local projectileVel = self.throwTimer and minVel + (maxVel - minVel) * math.min(self.throwTimer.ElapsedSimTimeMS, actor.ThrowPrepTime)/actor.ThrowPrepTime or maxVel;
6363
guideParVel = Vector(projectileVel, 0):RadRotate(actor.RotAngle + actor:GetAimAngle(true) + rotationThisFrame);
6464
else

0 commit comments

Comments
 (0)