1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-15 11:30:30 +00:00

[Doc] name function func_8002DBD0 to Actor_WorldToActorCoords (#2029)

* name function Actor_WorldToActorCoords

* clean up some misleading usages
This commit is contained in:
krm01 2024-08-11 11:30:41 -07:00 committed by GitHub
parent fc79632df8
commit 8df87038a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 52 additions and 53 deletions

View file

@ -152,13 +152,13 @@ u8 ObjTimeblock_PlayerIsInRange(ObjTimeblock* this, PlayState* play) {
}
if (this->dyna.actor.xzDistToPlayer <= sRanges[(this->dyna.actor.params >> 11) & 7]) {
Vec3f distance;
Vec3f playerRelativePos;
f32 blockSize;
func_8002DBD0(&this->dyna.actor, &distance, &GET_PLAYER(play)->actor.world.pos);
Actor_WorldToActorCoords(&this->dyna.actor, &playerRelativePos, &GET_PLAYER(play)->actor.world.pos);
blockSize = this->dyna.actor.scale.x * 50.0f + 6.0f;
// Return true if player's xz position is not inside the block
if (blockSize < fabsf(distance.x) || blockSize < fabsf(distance.z)) {
if (blockSize < fabsf(playerRelativePos.x) || blockSize < fabsf(playerRelativePos.z)) {
return true;
}
}