Decompile 2 functions in Source/Contents/World/WorldProximity.cpp
Batch #7544 by Toshiro: 0 byte-identical, 2 confirmed by peer review. - fn_17686 CWorld::PcApproachToPlayer: logic confirmed by peer review - fn_17687 CWorld::PlayerMove: logic confirmed by peer review Peer-reviewed-by: eAthena, secret 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
46a799336a
commit
ae7cb57b3f
1 changed files with 18 additions and 0 deletions
|
|
@ -262,8 +262,26 @@ bool WorldProximityRangeCallback::Invoke() {
|
|||
|
||||
|
||||
// OFFSET: 0x00AC9D50
|
||||
// FUNCTION: fn_17686
|
||||
__declspec(noinline) void CWorld::PcApproachToPlayer(std::uint32_t aid, const CellFloatPos& pos) {
|
||||
if (this->player && this->player->Slot50() > 0 && this->IsGuildMaster(aid)) {
|
||||
const float playerX = this->player->render.position.x;
|
||||
const float playerZ = this->player->render.position.z;
|
||||
const int range = this->nearbyRange;
|
||||
CallWorldProximityUpdate(this, [playerX, playerZ, pos, range]() {
|
||||
return std::fabs(pos.x - playerX) <= static_cast<float>(range) &&
|
||||
std::fabs(pos.z - playerZ) <= static_cast<float>(range);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AC9E70
|
||||
// FUNCTION: fn_17687
|
||||
void CWorld::PlayerMove(const float& x, const float& z) {
|
||||
CallWorldProximityUpdate(this, [this, x, z]() {
|
||||
return this->IsExistGuildMasterNearby(x, z);
|
||||
});
|
||||
}
|
||||
|
||||
// OFFSET: 0x00ACA9F0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue