Fixed bug with whirlpools

This commit is contained in:
MysterD 2020-10-02 23:35:06 -07:00
parent 60580602a6
commit 161506431d
2 changed files with 10 additions and 0 deletions

View File

@ -1130,6 +1130,7 @@
/* Whirlpool */
#define /*0x0F4*/ oWhirlpoolInitFacePitch OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oWhirlpoolInitFaceRoll OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oWhirlpoolTimeout OBJECT_FIELD_S32(0x1D)
/* White Puff Explode */
#define /*0x0F4*/ oWhitePuffUnkF4 OBJECT_FIELD_F32(0x1B)

View File

@ -35,6 +35,15 @@ void whirpool_orient_graph(void) {
}
void bhv_whirlpool_loop(void) {
if (o->oWhirlpoolTimeout > 0) {
o->oWhirlpoolTimeout--;
if (o->oWhirlpoolTimeout <= 0) {
o->oInteractStatus = 0;
}
} else if (o->oInteractStatus == INT_STATUS_INTERACTED) {
o->oWhirlpoolTimeout = 30;
}
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario < 5000.0f) {
#endif