mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-28 23:13:02 +00:00
Attempt to fix crash that mentions get_mario_spawn_type()
This commit is contained in:
parent
2cee62f45e
commit
38b2c81189
2 changed files with 9 additions and 5 deletions
|
@ -15,4 +15,4 @@ if [ ! -f "$FILE" ]; then
|
|||
WINPTY=
|
||||
fi
|
||||
|
||||
$WINPTY cgdb $FILE -ex 'break debug_breakpoint_here'
|
||||
$WINPTY cgdb $FILE -ex 'r'
|
||||
|
|
|
@ -397,7 +397,7 @@ void init_mario_after_warp(void) {
|
|||
if (spawnNode == NULL || spawnNode->object == NULL) { return; }
|
||||
u32 marioSpawnType = get_mario_spawn_type(spawnNode->object);
|
||||
|
||||
if (gMarioState->action != ACT_UNINITIALIZED) {
|
||||
if (gMarioState && gMarioState->action != ACT_UNINITIALIZED) {
|
||||
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
||||
gPlayerSpawnInfos[i].startPos[0] = (s16) spawnNode->object->oPosX;
|
||||
gPlayerSpawnInfos[i].startPos[1] = (s16) spawnNode->object->oPosY;
|
||||
|
@ -454,7 +454,9 @@ void init_mario_after_warp(void) {
|
|||
gMarioState->usedObj = spawnNode->object;
|
||||
}
|
||||
|
||||
if (gCurrentArea) {
|
||||
reset_camera(gCurrentArea->camera);
|
||||
}
|
||||
sWarpDest.type = WARP_TYPE_NOT_WARPING;
|
||||
sDelayedWarpOp = WARP_OP_NONE;
|
||||
|
||||
|
@ -482,8 +484,10 @@ void init_mario_after_warp(void) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (gCurrDemoInput == NULL) {
|
||||
if (gCurrDemoInput == NULL && gMarioState) {
|
||||
if (gCurrentArea) {
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
}
|
||||
|
||||
if (gMarioState->flags & MARIO_METAL_CAP) {
|
||||
play_cap_music(SEQUENCE_ARGS(4, SEQ_EVENT_METAL_CAP));
|
||||
|
|
Loading…
Reference in a new issue