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

Commit 4c2cf7f

Browse files
committed
Fix automover controller bug in pre5-patch. It's been fixed separately in pre6
1 parent 0d07ccf commit 4c2cf7f

File tree

1 file changed

+1
-1
lines changed
  • Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/Automovers/Controller

1 file changed

+1
-1
lines changed

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/Automovers/Controller/Controller.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ automoverActorFunctions.handleActorThatHasReachedItsEndNode = function(self, act
13281328
actorData.direction = getDirectionForDistanceLargerAxis(distanceFromActorToFirstExitPathPosition, 0);
13291329

13301330
local endNodeData = teamNodeTable[waypointData.endNode];
1331-
if not endNodeData.zoneBox:IsWithinBox(waypointData.exitPath[1]) and (endNodeData.connectedNodeData[actorData.direction] == nil or not endNodeData.connectingAreas[actorData.direction]:IsInside(waypointData.exitPath[1])) then
1331+
if #waypointData.exitPath > 0 and not endNodeData.zoneBox:IsWithinBox(waypointData.exitPath[1]) and (endNodeData.connectedNodeData[actorData.direction] == nil or not endNodeData.connectingAreas[actorData.direction]:IsInside(waypointData.exitPath[1])) then
13321332
local velocityToAddToActor = distanceFromActorToFirstExitPathPosition.Normalized:FlipX(true):FlipY(true) * self.movementAcceleration * 10;
13331333
if math.abs(velocityToAddToActor.X) < 1 and velocityToAddToActor.Y < 0 and SceneMan.GlobalAcc.Y > 0 then
13341334
velocityToAddToActor.Y = velocityToAddToActor.Y * 2;

0 commit comments

Comments
 (0)