Prevented bubbled players from triggering level warps

Fixes #41
This commit is contained in:
MysterD 2020-09-11 22:58:34 -07:00
parent 5abe3577ae
commit c0a31ab06c
2 changed files with 7 additions and 0 deletions

View File

@ -718,6 +718,7 @@ void initiate_painting_warp(void) {
s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
// only allow for local player
if (m != &gMarioStates[0]) { return 0; }
if (!is_player_active(m)) { return 0; }
s32 val04 = TRUE;

View File

@ -7,6 +7,7 @@
static u8 warpToLevel = LEVEL_BITDW;
#define SCANCODE_0 0x0B
#define SCANCODE_3 0x04
#define SCANCODE_6 0x07
#define SCANCODE_7 0x08
@ -89,12 +90,17 @@ static void debug_warp_area() {
}
}
static void debug_suicide(void) {
gMarioStates[0].hurtCounter = 31;
}
void debug_keyboard_on_key_down(int scancode) {
scancode = scancode;
switch (scancode) {
case SCANCODE_3: debug_breakpoint_here(); break;
case SCANCODE_6: debug_warp_level(warpToLevel); break;
case SCANCODE_7: debug_warp_area(); break;
case SCANCODE_0: debug_suicide(); break;
}
}