mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fix red coin, secret, caps, WF platforms and goomba bhv overrides being broken
This commit is contained in:
parent
9168b3a1f8
commit
e48670a2ef
4 changed files with 9 additions and 9 deletions
|
|
@ -132,9 +132,9 @@ static void area_check_red_coin_or_secret(void *arg, bool isMacroObject) {
|
||||||
} else {
|
} else {
|
||||||
bhv = (const BehaviorScript *) arg;
|
bhv = (const BehaviorScript *) arg;
|
||||||
}
|
}
|
||||||
if (bhv == bhvRedCoin) {
|
if (bhv == smlua_override_behavior(bhvRedCoin)) {
|
||||||
gAreas[sCurrAreaIndex].numRedCoins++;
|
gAreas[sCurrAreaIndex].numRedCoins++;
|
||||||
} else if (bhv == bhvHiddenStarTrigger) {
|
} else if (bhv == smlua_override_behavior(bhvHiddenStarTrigger)) {
|
||||||
gAreas[sCurrAreaIndex].numSecrets++;
|
gAreas[sCurrAreaIndex].numSecrets++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void spawn_and_init_wf_platforms(s16 a, const BehaviorScript *bhv) {
|
||||||
o->oPlatformSpawnerUnkF4++;
|
o->oPlatformSpawnerUnkF4++;
|
||||||
|
|
||||||
if (platform != NULL) {
|
if (platform != NULL) {
|
||||||
if (bhv == bhvWfSolidTowerPlatform || bhv == bhvWfSlidingTowerPlatform) {
|
if (bhv == smlua_override_behavior(bhvWfSolidTowerPlatform) || bhv == smlua_override_behavior(bhvWfSlidingTowerPlatform)) {
|
||||||
u32 loopTime = 1 + (platform->oPlatformUnk110 / platform->oPlatformUnk10C);
|
u32 loopTime = 1 + (platform->oPlatformUnk110 / platform->oPlatformUnk10C);
|
||||||
loopTime *= 2;
|
loopTime *= 2;
|
||||||
loopTime += 1;
|
loopTime += 1;
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,13 @@ u32 get_mario_cap_flag(struct Object *capObject) {
|
||||||
if (!capObject) { return 0; }
|
if (!capObject) { return 0; }
|
||||||
const BehaviorScript *script = virtual_to_segmented(0x13, capObject->behavior);
|
const BehaviorScript *script = virtual_to_segmented(0x13, capObject->behavior);
|
||||||
|
|
||||||
if (script == bhvNormalCap) {
|
if (script == smlua_override_behavior(bhvNormalCap)) {
|
||||||
return MARIO_NORMAL_CAP;
|
return MARIO_NORMAL_CAP;
|
||||||
} else if (script == bhvMetalCap) {
|
} else if (script == smlua_override_behavior(bhvMetalCap)) {
|
||||||
return MARIO_METAL_CAP;
|
return MARIO_METAL_CAP;
|
||||||
} else if (script == bhvWingCap) {
|
} else if (script == smlua_override_behavior(bhvWingCap)) {
|
||||||
return MARIO_WING_CAP;
|
return MARIO_WING_CAP;
|
||||||
} else if (script == bhvVanishCap) {
|
} else if (script == smlua_override_behavior(bhvVanishCap)) {
|
||||||
return MARIO_VANISH_CAP;
|
return MARIO_VANISH_CAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -914,7 +914,7 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O
|
||||||
|
|
||||||
u8 stayInLevelCommon = !(gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2 || gCurrLevelNum == LEVEL_BOWSER_3);
|
u8 stayInLevelCommon = !(gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2 || gCurrLevelNum == LEVEL_BOWSER_3);
|
||||||
if (stayInLevelCommon && gServerSettings.stayInLevelAfterStar) { noExit = TRUE; }
|
if (stayInLevelCommon && gServerSettings.stayInLevelAfterStar) { noExit = TRUE; }
|
||||||
gLastCollectedStarOrKey = o->behavior == bhvBowserKey;
|
gLastCollectedStarOrKey = o->behavior == smlua_override_behavior(bhvBowserKey);
|
||||||
|
|
||||||
if (m->health >= 0x100) {
|
if (m->health >= 0x100) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ void network_receive_level_macro(struct Packet* p) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_INFO("rx macro special: coin formation");
|
LOG_INFO("rx macro special: coin formation");
|
||||||
} else if (behavior == bhvGoombaTripletSpawner) {
|
} else if (behavior == smlua_override_behavior(bhvGoombaTripletSpawner)) {
|
||||||
for (s32 i = 0; i < OBJECT_POOL_CAPACITY; i++) {
|
for (s32 i = 0; i < OBJECT_POOL_CAPACITY; i++) {
|
||||||
struct Object* o2 = &gObjectPool[i];
|
struct Object* o2 = &gObjectPool[i];
|
||||||
if (o2->parentObj != o) { continue; }
|
if (o2->parentObj != o) { continue; }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue