From 8cb847db5d3043e59a7a3e4571068ffd48599f9c Mon Sep 17 00:00:00 2001 From: Keleborn <22352763+Celandriel@users.noreply.github.com> Date: Sat, 9 May 2026 00:48:59 -0700 Subject: [PATCH] Fix location cache. (#2374) ## Pull Request Description Bot locations were not correctly registered, so they werent picking it as often as they should. In part related to #2369 ## Feature Evaluation - Describe the **minimum logic** required to achieve the intended behavior. - Describe the **processing cost** when this logic executes across many bots. ## How to Test the Changes ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [ ] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [ ] No - - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - - [ ] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [ ] No - - [ ] Yes (**explain below**) ## Final Checklist - - [ ] Stability is not compromised. - - [ ] Performance impact is understood, tested, and acceptable. - - [ ] Added logic complexity is justified and explained. - - [ ] Any new bot dialogue lines are translated. - - [ ] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers --- src/Mgr/Travel/TravelMgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mgr/Travel/TravelMgr.cpp b/src/Mgr/Travel/TravelMgr.cpp index adc1e4a3e..24ebf3ee1 100644 --- a/src/Mgr/Travel/TravelMgr.cpp +++ b/src/Mgr/Travel/TravelMgr.cpp @@ -4821,7 +4821,10 @@ void TravelMgr::PrepareDestinationCache() if (l < 1 || l > maxLevel) continue; - locsPerLevelCache[(uint8)l].push_back(WorldLocation(std::get<0>(gridTuple))); + locsPerLevelCache[(uint8)l].push_back(WorldLocation(std::get<0>(gridTuple), + static_cast(std::get<1>(gridTuple)) * 50.0f, + static_cast(std::get<2>(gridTuple)) * 50.0f, + static_cast(std::get<3>(gridTuple)) * 50.0f)); } } }