diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index f13ba0c8..824078dd 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -127,6 +127,7 @@ void MovementAIComponent::Update(const float deltaTime) { SetRotation(NiQuaternion::LookAt(source, m_NextWaypoint)); } else { // Check if there are more waypoints in the queue, if so set our next destination to the next waypoint + HandleWaypointArrived(); if (!AdvancePathWaypointIndex()) { Stop(); return; @@ -247,6 +248,7 @@ void MovementAIComponent::Stop() { m_TimeTravelled = 0; m_AtFinalWaypoint = true; + m_IsPaused = true; m_InterpolatedWaypoints.clear(); m_CurrentPath.clear(); @@ -404,3 +406,7 @@ void MovementAIComponent::SetMaxSpeed(const float value) { m_MaxSpeed = value; m_Acceleration = value / 5; } + +void MovementAIComponent::HandleWaypointArrived() { + +} diff --git a/dGame/dComponents/MovementAIComponent.h b/dGame/dComponents/MovementAIComponent.h index 00143ccf..69919769 100644 --- a/dGame/dComponents/MovementAIComponent.h +++ b/dGame/dComponents/MovementAIComponent.h @@ -193,6 +193,8 @@ public: void ReversePath(); + void HandleWaypointArrived(); + /** * Stops the current movement and moves the entity to a certain point. Will continue until it's close enough, * after which its AI is enabled again.