Browse Source

Fix PatrolComponent field name and update comment

- Use correct field name: patrol_comp->patrolling (not is_patrolling)
- Update comment for attack mode mesh creation (remove incorrect note)

Co-authored-by: djeada <[email protected]>
copilot-swe-agent[bot] 19 hours ago
parent
commit
2f147c0b8f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      render/geom/mode_indicator.cpp
  2. 1 1
      render/scene_renderer.cpp

+ 1 - 1
render/geom/mode_indicator.cpp

@@ -17,7 +17,7 @@ std::unique_ptr<Render::GL::Mesh> ModeIndicator::s_guard_mesh;
 std::unique_ptr<Render::GL::Mesh> ModeIndicator::s_hold_mesh;
 std::unique_ptr<Render::GL::Mesh> ModeIndicator::s_patrol_mesh;
 
-// Attack mode: crossed swords (reusing existing create_hold_mode_mesh)
+// Attack mode: crossed swords
 auto ModeIndicator::create_attack_mode_mesh()
     -> std::unique_ptr<Render::GL::Mesh> {
   using namespace Render::GL;

+ 1 - 1
render/scene_renderer.cpp

@@ -460,7 +460,7 @@ void Renderer::enqueue_mode_indicator(
   bool const has_hold_mode = (hold_mode != nullptr) && hold_mode->active;
 
   auto *patrol_comp = entity->get_component<Engine::Core::PatrolComponent>();
-  bool const has_patrol = (patrol_comp != nullptr) && patrol_comp->is_patrolling;
+  bool const has_patrol = (patrol_comp != nullptr) && patrol_comp->patrolling;
 
   // Only render if unit has an active mode
   if (!has_attack && !has_guard_mode && !has_hold_mode && !has_patrol) {