Fixed bug with whirlpools

This commit is contained in:
MysterD 2020-10-02 23:35:06 -07:00
parent 327c735dba
commit fb775165ce
2 changed files with 10 additions and 0 deletions

View file

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

View file

@ -35,6 +35,15 @@ void whirpool_orient_graph(void) {
} }
void bhv_whirlpool_loop(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 #ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario < 5000.0f) { if (o->oDistanceToMario < 5000.0f) {
#endif #endif