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:
parent
fc79632df8
commit
8df87038a0
19 changed files with 52 additions and 53 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue