From 124f6dad2a87ca3512ef83b558e056222cdb5fde Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Sun, 25 Feb 2024 22:00:14 -0800 Subject: [PATCH] auroooga --- dGame/Entity.cpp | 4 ++-- dGame/dComponents/MovementAIComponent.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index f125b29d..57615d89 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -734,7 +734,7 @@ void Entity::Initialize() { if (path->pathType == PathType::MovingPlatform) { AddComponent(pathName); } else if (path->pathType == PathType::Movement) { - AddComponent(MovementAIInfo())->SetupPath(pathName); + AddComponent(MovementAIInfo{})->SetupPath(pathName); } } else { // else we still need to setup moving platform if it has a moving platform comp but no path @@ -2192,4 +2192,4 @@ void Entity::SetScale(const float scale) { if (scale == m_Scale) return; m_Scale = scale; Game::entityManager->SerializeEntity(this); -} \ No newline at end of file +} diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index 711bc0af..ad89e9b1 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -68,7 +68,7 @@ float MovementAIComponent::GetCurrentPathWaypointSpeed() const { if (!m_Path || m_CurrentPathWaypointIndex >= m_CurrentPath.size() || m_CurrentPathWaypointIndex < 0) { 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) {