mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-15 04:38:21 +00:00
add arrived handler
This commit is contained in:
parent
b546c96193
commit
d372278b25
@ -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() {
|
||||
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user