From 247377e98c91da39f73bc60574ed5c192ff9219d Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 9 Sep 2022 15:01:00 +0200 Subject: [PATCH] #OPSGROUP * Fix for always teleporting --- Moose Development/Moose/Ops/OpsGroup.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index a8c556fd1..255c41e18 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -5701,7 +5701,7 @@ function OPSGROUP:RouteToMission(mission, delay) end -- Check if group is mobile. Note that some immobile units report a speed of 1 m/s = 3.6 km/h. - if self.speedMax<=3.6 or mission.teleport then + if (self.speedMax<=3.6 and mission.teleport) or mission.teleport then -- Teleport to waypoint coordinate. Mission will not be paused. self:Teleport(waypointcoord, nil, true) @@ -11778,7 +11778,7 @@ function OPSGROUP:_UpdatePosition() self.positionLast=self.position or self:GetVec3() self.headingLast=self.heading or self:GetHeading() self.orientXLast=self.orientX or self:GetOrientationX() - self.velocityLast=self.velocity or self.group:GetVelocityMPS() + self.velocityLast=self.velocity or self.group:GetVelocityMPS() -- Current state. self.position=self:GetVec3()