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).
This commit is contained in:
parent
2ae8a409c7
commit
edd5a4a066
1 changed files with 12 additions and 0 deletions
|
|
@ -34,6 +34,18 @@ void UpdateWorldProximityNotification(
|
|||
}
|
||||
|
||||
// OFFSET: 0x00AC8A40
|
||||
// FUNCTION: fn_17678
|
||||
bool WorldScene::FindActorInCell(const float* position, std::function<bool(std::uint32_t)> predicate) const {
|
||||
const float key = static_cast<float>(this->terrain->width) * position[1] + position[0];
|
||||
const auto found = this->actorCells.find(key);
|
||||
|
||||
if (found == this->actorCells.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::list<std::uint32_t>& ids = found->second;
|
||||
return std::find_if(ids.begin(), ids.end(), predicate) != ids.end();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00ACA180
|
||||
// FUNCTION: fn_17689
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue