Patch divide by zero when advancing waypoints (#1020)

This commit is contained in:
David Markowitz 2023-03-14 04:12:26 -07:00 committed by GitHub
parent 137a5e5c3d
commit c3723371cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ void MovementAIComponent::Update(const float deltaTime) {
NiPoint3 velocity = NiPoint3::ZERO;
if (AdvanceWaypointIndex()) // Do we have another waypoint to seek?
if (m_Acceleration > 0 && m_BaseSpeed > 0 && AdvanceWaypointIndex()) // Do we have another waypoint to seek?
{
m_NextWaypoint = GetCurrentWaypoint();