From 2f80129dce3d2fcb1f6ad97bf62920e0c39d835d Mon Sep 17 00:00:00 2001 From: Jan Mrna Date: Fri, 10 Oct 2025 07:49:30 +0200 Subject: [PATCH] Name refactor --- cpp/src/pathfindingdemo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/src/pathfindingdemo.cpp b/cpp/src/pathfindingdemo.cpp index eef2382..a467c91 100644 --- a/cpp/src/pathfindingdemo.cpp +++ b/cpp/src/pathfindingdemo.cpp @@ -67,17 +67,17 @@ WorldPos PathFindingDemo::GetRandomPosition() const { } std::optional PathFindingDemo::GetMoveTarget() { - WorldPos current_player_pos = GetPlayer()->GetPosition(); + WorldPos player_current_pos = GetPlayer()->GetPosition(); if (m_Path.empty()) { return {}; } - WorldPos next_player_pos = m_Path.front(); + WorldPos player_next_pos = m_Path.front(); - if (current_player_pos.DistanceTo(next_player_pos) > 1.0) { + if (player_current_pos.DistanceTo(player_next_pos) > 1.0) { // target not reached yet - return next_player_pos; + return player_next_pos; } // target reached, pop it //m_MoveQueue.pop();