mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
auroooga
This commit is contained in:
parent
15fc39f3bb
commit
124f6dad2a
@ -734,7 +734,7 @@ void Entity::Initialize() {
|
|||||||
if (path->pathType == PathType::MovingPlatform) {
|
if (path->pathType == PathType::MovingPlatform) {
|
||||||
AddComponent<MovingPlatformComponent>(pathName);
|
AddComponent<MovingPlatformComponent>(pathName);
|
||||||
} else if (path->pathType == PathType::Movement) {
|
} else if (path->pathType == PathType::Movement) {
|
||||||
AddComponent<MovementAIComponent>(MovementAIInfo())->SetupPath(pathName);
|
AddComponent<MovementAIComponent>(MovementAIInfo{})->SetupPath(pathName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// else we still need to setup moving platform if it has a moving platform comp but no path
|
// else we still need to setup moving platform if it has a moving platform comp but no path
|
||||||
|
@ -68,7 +68,7 @@ float MovementAIComponent::GetCurrentPathWaypointSpeed() const {
|
|||||||
if (!m_Path || m_CurrentPathWaypointIndex >= m_CurrentPath.size() || m_CurrentPathWaypointIndex < 0) {
|
if (!m_Path || m_CurrentPathWaypointIndex >= m_CurrentPath.size() || m_CurrentPathWaypointIndex < 0) {
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
}
|
}
|
||||||
return m_Path->pathWaypoints.at(m_CurrentPathWaypointIndex).speed;
|
return m_Path->pathWaypoints.at(m_CurrentPathWaypointIndex).movingPlatform.speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovementAIComponent::SetupPath(const std::string& pathname) {
|
void MovementAIComponent::SetupPath(const std::string& pathname) {
|
||||||
|
Loading…
Reference in New Issue
Block a user