From b63a47f64ab94f85269fecc83142875a156eabd7 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 5 Oct 2020 20:20:49 -0700 Subject: [PATCH] Fix strange behavior when being caught in a whirlpool while an instant warp occurs --- src/pc/controller/controller_keyboard_debug.c | 2 +- src/pc/network/packets/packet_instant_warp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pc/controller/controller_keyboard_debug.c b/src/pc/controller/controller_keyboard_debug.c index bd279c76..80edf1ec 100644 --- a/src/pc/controller/controller_keyboard_debug.c +++ b/src/pc/controller/controller_keyboard_debug.c @@ -7,7 +7,7 @@ #ifdef DEBUG -static u8 warpToLevel = LEVEL_LLL; +static u8 warpToLevel = LEVEL_DDD; #define SCANCODE_0 0x0B #define SCANCODE_1 0x02 diff --git a/src/pc/network/packets/packet_instant_warp.c b/src/pc/network/packets/packet_instant_warp.c index f0753913..9672aceb 100644 --- a/src/pc/network/packets/packet_instant_warp.c +++ b/src/pc/network/packets/packet_instant_warp.c @@ -5,6 +5,7 @@ #include "game/level_update.h" #include "game/area.h" #include "game/ingame_menu.h" +#include "game/mario.h" #define DISABLE_MODULE_LOG #include "pc/debuglog.h" @@ -81,6 +82,7 @@ void network_receive_instant_warp(struct Packet* p) { for (int i = 0; i < MAX_PLAYERS; i++) { gMarioStates[i].marioObj->oIntangibleTimer = 30; + force_idle_state(&gMarioStates[i]); } //s16 cameraAngle = gMarioStates[0].area->camera->yaw;