1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 06:10:21 +00:00

Actor struct cleanup (#208)

* cleanup a few things

* fix mistake

* yawTowardsLink

* run format

* pr suggestion
This commit is contained in:
fig02 2020-06-14 00:09:51 -04:00 committed by GitHub
parent 06fc61c83d
commit 1c98ac27eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 292 additions and 303 deletions

View file

@ -110,9 +110,9 @@ s32 func_80A1D94C(EnFu* this, GlobalContext* globalCtx, u16 textID, EnFuActionFu
return true;
}
this->actor.textId = textID;
yawDiff = this->actor.rotTowardsLinkY - this->actor.shape.rot.y;
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
if ((ABS(yawDiff) < 0x2301) && (this->actor.xzDistanceFromLink < 100.0f)) {
if ((ABS(yawDiff) < 0x2301) && (this->actor.xzDistFromLink < 100.0f)) {
func_8002F2CC(&this->actor, globalCtx, 100.0f);
} else {
this->behaviorFlags |= FU_RESET_LOOK_ANGLE;
@ -217,7 +217,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
static s16 yawDiff;
Player* player = PLAYER;
yawDiff = this->actor.rotTowardsLinkY - this->actor.shape.rot.y;
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
if ((gSaveContext.eventChkInf[5] & 0x800)) {
func_80A1D94C(this, globalCtx, 0x508E, func_80A1DBA0);
} else if (player->stateFlags2 & 0x1000000) {
@ -228,7 +228,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
} else if (func_8002F194(&this->actor, globalCtx) != 0) {
this->actionFunc = func_80A1DBA0;
} else if (ABS(yawDiff) < 0x2301) {
if (this->actor.xzDistanceFromLink < 100.0f) {
if (this->actor.xzDistFromLink < 100.0f) {
this->actor.textId = 0x5034;
func_8002F2CC(&this->actor, globalCtx, 100.0f);
player->stateFlags2 |= 0x800000;