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

@ -102,7 +102,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, GlobalContext* globalCtx)
player = PLAYER;
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
yawDiff = this->actor.rotTowardsLinkY - this->actor.shape.rot.y;
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
yawDiffNew = ABS(yawDiff);
if (yawDiffNew < 0x4300) {
if (gSaveContext.nightFlag == 0) {
@ -117,7 +117,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, GlobalContext* globalCtx)
sightRange = 100.0f;
}
}
if ((this->actor.xzDistanceFromLink < sightRange) &&
if ((this->actor.xzDistFromLink < sightRange) &&
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) < 100.0f) && (sPlayerCaught == 0)) {
sPlayerCaught = 1;
func_8010B680(globalCtx, 0x702D, &this->actor); // "Hey you! Stop! You, kid, over there!"
@ -174,7 +174,7 @@ void func_80A55BD4(EnHeishi3* this, GlobalContext* globalCtx) {
this->actionFunc = EnHeishi3_ResetAnimationToIdle;
this->actor.speedXZ = 0.0f;
} else {
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, this->actor.rotTowardsLinkY, 5, 3000, 0);
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, this->actor.yawTowardsLink, 5, 3000, 0);
}
}