Make warp surfaces use the force parameter if set (#525)
This commit is contained in:
1 parent
ab94fd7f63
commit
088dbbdd2b
3 files changed
+16
-11
No files matched your search
+12
-8
@@ -743,17 +743,21 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
||||
break;
|
||||
|
||||
case WARP_OP_WARP_FLOOR:
|
||||
sSourceWarpNodeId = WARP_NODE_WARP_FLOOR;
|
||||
if (area_get_warp_node(sSourceWarpNodeId) == NULL) {
|
||||
if ((m->floor) && (m->floor->force & 0xFF)) {
|
||||
sSourceWarpNodeId = m->floor->force & 0xFF;
|
||||
} else {
|
||||
sSourceWarpNodeId = WARP_NODE_WARP_FLOOR;
|
||||
if (area_get_warp_node(sSourceWarpNodeId) == NULL) {
|
||||
#ifdef ENABLE_LIVES
|
||||
if (m->numLives == 0) {
|
||||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
} else {
|
||||
sSourceWarpNodeId = WARP_NODE_DEATH;
|
||||
}
|
||||
if (m->numLives == 0) {
|
||||
sDelayedWarpOp = WARP_OP_GAME_OVER;
|
||||
} else {
|
||||
sSourceWarpNodeId = WARP_NODE_DEATH;
|
||||
}
|
||||
#else
|
||||
sSourceWarpNodeId = WARP_NODE_DEATH;
|
||||
sSourceWarpNodeId = WARP_NODE_DEATH;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
sDelayedWarpTimer = 20;
|
||||
|
||||
Reference in new issue
Block a user