Skip to content

Commit

Permalink
add missing creg. fix issue where current waypoint didn't get update …
Browse files Browse the repository at this point in the history
…as soon as it should have.
  • Loading branch information
marcushutchings committed Nov 5, 2023
1 parent 4f6701e commit b25fc8a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rts/Sim/MoveTypes/GroundMoveType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ CR_REG_METADATA(CGroundMoveType, (
CR_MEMBER(pathingArrived),
CR_MEMBER(positionStuck),
CR_MEMBER(forceStaticObjectCheck),
CR_MEMBER(avoidingUnits),
CR_MEMBER(setHeading),
CR_MEMBER(setHeadingDir),
CR_MEMBER(collidedFeatures),
Expand Down Expand Up @@ -2133,10 +2134,10 @@ void CGroundMoveType::SetNextWayPoint(int thread)
pathController.SetTempGoalPosition(pathID, earlyNextWayPoint);

int32_t update = 1;
if (update-- > 0) {
while (update-- > 0) {
earlyCurrWayPoint = earlyNextWayPoint;
earlyNextWayPoint = pathManager->NextWayPoint(owner, pathID, 0, earlyCurrWayPoint, std::max(WAYPOINT_RADIUS, currentSpeed * 1.05f), true);
update += (earlyCurrWayPoint.y == (-1.f) & earlyNextWayPoint.y != (-1.f));
update += (earlyCurrWayPoint.y == (-1.f) && earlyNextWayPoint.y != (-1.f));
}

if (limitSpeedForTurning > 0)
Expand Down

0 comments on commit b25fc8a

Please sign in to comment.