mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-28 01:26:32 +00:00
Patch divide by zero when advancing waypoints (#1020)
This commit is contained in:
parent
137a5e5c3d
commit
c3723371cf
@ -93,7 +93,7 @@ void MovementAIComponent::Update(const float deltaTime) {
|
|||||||
|
|
||||||
NiPoint3 velocity = NiPoint3::ZERO;
|
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();
|
m_NextWaypoint = GetCurrentWaypoint();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user