mirror of https://github.com/zeldaret/oot.git
Rename carry timer as suggested
This commit is contained in:
parent
230abfdddd
commit
02acd64ff6
|
@ -1658,7 +1658,7 @@ s32 func_80AEE6D0(EnRu1* this, PlayState* play) {
|
||||||
void EnRu1_UpdateCarriedBehavior(EnRu1* this, PlayState* play) {
|
void EnRu1_UpdateCarriedBehavior(EnRu1* this, PlayState* play) {
|
||||||
s32 pad[9];
|
s32 pad[9];
|
||||||
Player* player;
|
Player* player;
|
||||||
f32* carryTimer = &this->carryTimer;
|
f32* carryIdleTimer = &this->carryIdleTimer;
|
||||||
|
|
||||||
if (Actor_HasNoParent(&this->actor, play)) {
|
if (Actor_HasNoParent(&this->actor, play)) {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
||||||
|
@ -1671,17 +1671,17 @@ void EnRu1_UpdateCarriedBehavior(EnRu1* this, PlayState* play) {
|
||||||
this->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
|
this->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
|
||||||
func_80AED57C(this);
|
func_80AED57C(this);
|
||||||
this->action = 28;
|
this->action = 28;
|
||||||
*carryTimer = 0.0f;
|
*carryIdleTimer = 0.0f;
|
||||||
} else if (func_80AEE6D0(this, play)) {
|
} else if (func_80AEE6D0(this, play)) {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
*carryTimer = 0.0f;
|
*carryIdleTimer = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
player = GET_PLAYER(play);
|
player = GET_PLAYER(play);
|
||||||
if (player->stateFlags2 & PLAYER_STATE2_IDLE_FIDGET) {
|
if (player->stateFlags2 & PLAYER_STATE2_IDLE_FIDGET) {
|
||||||
this->carryTimer += 1.0f;
|
this->carryIdleTimer += 1.0f;
|
||||||
if (this->action != 32) {
|
if (this->action != 32) {
|
||||||
if (*carryTimer > 30.0f) {
|
if (*carryIdleTimer > 30.0f) {
|
||||||
if (Rand_S16Offset(0, 3) == 0) {
|
if (Rand_S16Offset(0, 3) == 0) {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gRutoChildSquirmAnim);
|
f32 frameCount = Animation_GetLastFrame(&gRutoChildSquirmAnim);
|
||||||
|
|
||||||
|
@ -1690,23 +1690,23 @@ void EnRu1_UpdateCarriedBehavior(EnRu1* this, PlayState* play) {
|
||||||
func_80AED5DC(this);
|
func_80AED5DC(this);
|
||||||
this->action = 32;
|
this->action = 32;
|
||||||
}
|
}
|
||||||
*carryTimer = 0.0f;
|
*carryIdleTimer = 0.0f;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (*carryTimer > 50.0f) {
|
if (*carryIdleTimer > 50.0f) {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
||||||
|
|
||||||
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
|
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
|
||||||
-8.0f);
|
-8.0f);
|
||||||
this->action = 31;
|
this->action = 31;
|
||||||
*carryTimer = 0.0f;
|
*carryIdleTimer = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
|
||||||
|
|
||||||
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
|
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
|
||||||
*carryTimer = 0.0f;
|
*carryIdleTimer = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef struct EnRu1 {
|
||||||
/* 0x035C */ s16 unk_35C;
|
/* 0x035C */ s16 unk_35C;
|
||||||
/* 0x0360 */ f32 unk_360;
|
/* 0x0360 */ f32 unk_360;
|
||||||
/* 0x0364 */ Vec3f unk_364;
|
/* 0x0364 */ Vec3f unk_364;
|
||||||
/* 0x0370 */ f32 carryTimer;
|
/* 0x0370 */ f32 carryIdleTimer;
|
||||||
/* 0x0374 */ NpcInteractInfo interactInfo;
|
/* 0x0374 */ NpcInteractInfo interactInfo;
|
||||||
} EnRu1; // size = 0x039C
|
} EnRu1; // size = 0x039C
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue