mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-15 04:38:21 +00:00
fix path starting waypoint
This commit is contained in:
parent
92e2ab55d9
commit
5168404567
@ -48,7 +48,7 @@ MovementAIComponent::MovementAIComponent(Entity* parent, MovementAIInfo info) :
|
||||
m_TimeTravelled = 0;
|
||||
m_CurrentSpeed = 0;
|
||||
m_MaxSpeed = 0;
|
||||
m_StartingWaypointIndex = 0;
|
||||
m_StartingWaypointIndex = -1;
|
||||
m_CurrentPathWaypointIndex = 0;
|
||||
m_LockRotation = false;
|
||||
m_IsInReverse = false;
|
||||
|
@ -228,10 +228,6 @@ public:
|
||||
static float GetBaseSpeed(LOT lot);
|
||||
|
||||
private:
|
||||
|
||||
// TODO: Advance properly
|
||||
void SetCurrentPathWaypointIndex(uint32_t value) { };
|
||||
void SetNextPathWaypointIndex(uint32_t value) { };
|
||||
float HandleWaypointCommandGroupEmote(const std::string& data);
|
||||
void HandleWaypointCommandSetVariable(const std::string& data);
|
||||
void HandleWaypointCommandCastSkill(const std::string& data);
|
||||
|
@ -83,8 +83,7 @@ void MovementAIComponent::HandleWaypointArrived(uint32_t commandIndex) {
|
||||
}
|
||||
|
||||
m_Parent->AddCallbackTimer(delay, [this, commandIndex](){
|
||||
auto newCommandIndex = commandIndex + 1;
|
||||
this->HandleWaypointArrived(newCommandIndex);
|
||||
this->HandleWaypointArrived(commandIndex + 1);
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -205,10 +204,8 @@ void MovementAIComponent::HandleWaypointCommandChangeWaypoint(const std::string&
|
||||
} else path_string = data;
|
||||
|
||||
if (path_string != "") {
|
||||
SetPathStartingWaypointIndex(index);
|
||||
SetupPath(path_string);
|
||||
// TODO: do better? talk to emo
|
||||
SetCurrentPathWaypointIndex(index);
|
||||
SetNextPathWaypointIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user