Index: source/simulation2/components/CCmpUnitMotion.cpp =================================================================== --- source/simulation2/components/CCmpUnitMotion.cpp +++ source/simulation2/components/CCmpUnitMotion.cpp @@ -985,6 +985,13 @@ fixed angleDiff = angle - atan2_approx(offset.X, offset.Y); if (angleDiff != zero) { + // In case the way to the next waypoint is obstructed, + // it makes no sense rotating there. So we claim to have + // an obstructed move. This is bad since we might have been + // able to move a bit at least. + if (!cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, target.X, target.Y, m_Clearance, m_PassClass)) + return true; + fixed absoluteAngleDiff = angleDiff.Absolute(); if (absoluteAngleDiff > entity_angle_t::Pi()) absoluteAngleDiff = entity_angle_t::Pi() * 2 - absoluteAngleDiff;