From 14a11ac6cef107c11eb9de131526189fc995aef0 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Thu, 1 Oct 2026 08:12:32 -0500 Subject: [PATCH] refactor(component): movement AI reads its attached path in LoadConfigData Co-Authored-By: Claude Opus 5.5 --- dGame/dComponents/MovementAIComponent.cpp | 3 +++ dGame/dComponents/MovementAIComponent.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index 2718b490c..4bac3562e 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -70,7 +70,10 @@ MovementAIComponent::MovementAIComponent(Entity* parent, const int32_t component m_IsBounced = false; RegisterMsg(&MovementAIComponent::OnGetObjectReportInfo); +} +// The level config: the attached path +void MovementAIComponent::LoadConfigData() { SetPath(m_Parent->GetVarAsString(u"attached_path")); } diff --git a/dGame/dComponents/MovementAIComponent.h b/dGame/dComponents/MovementAIComponent.h index a97c412a9..910e241b0 100644 --- a/dGame/dComponents/MovementAIComponent.h +++ b/dGame/dComponents/MovementAIComponent.h @@ -66,6 +66,8 @@ public: MovementAIComponent(Entity* parentEntity, const int32_t componentID, MovementAIInfo info); + void LoadConfigData() override; + void SetPath(const std::string pathName); void Run(float deltaTime) override;