From edd5a4a0669f9f24cb6264d49946719842208054 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 23:39:00 +0000 Subject: [PATCH] Decompile fn_17678 (WorldScene::FindActorInCell) Batch #1912 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_17678 WorldScene::FindActorInCell: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/World/WorldProximity.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/Contents/World/WorldProximity.cpp b/Source/Contents/World/WorldProximity.cpp index fe6366e..451c9b1 100644 --- a/Source/Contents/World/WorldProximity.cpp +++ b/Source/Contents/World/WorldProximity.cpp @@ -34,6 +34,18 @@ void UpdateWorldProximityNotification( } // OFFSET: 0x00AC8A40 +// FUNCTION: fn_17678 +bool WorldScene::FindActorInCell(const float* position, std::function predicate) const { + const float key = static_cast(this->terrain->width) * position[1] + position[0]; + const auto found = this->actorCells.find(key); + + if (found == this->actorCells.end()) { + return false; + } + + const std::list& ids = found->second; + return std::find_if(ids.begin(), ids.end(), predicate) != ids.end(); +} // OFFSET: 0x00ACA180 // FUNCTION: fn_17689