Prevent bubble softlock by halting bubble popping for half a second after being bubbled
This commit is contained in:
parent
b5762c2446
commit
511e7c5028
|
@ -18,10 +18,10 @@ fi
|
||||||
#exit
|
#exit
|
||||||
|
|
||||||
# no debug, direct
|
# no debug, direct
|
||||||
#$FILE --server 27015 --configfile sm64config_server.txt &
|
$FILE --server 27015 --configfile sm64config_server.txt &
|
||||||
#sleep 7
|
sleep 7
|
||||||
#$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
|
$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
|
||||||
#exit
|
exit
|
||||||
|
|
||||||
# debug on server
|
# debug on server
|
||||||
#$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
|
#$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
|
|
||||||
u32 unused80339F10;
|
u32 unused80339F10;
|
||||||
s8 filler80339F1C[20];
|
s8 filler80339F1C[20];
|
||||||
|
u16 gLocalBubbleCounter = 0;
|
||||||
|
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
* ANIMATIONS *
|
* ANIMATIONS *
|
||||||
|
@ -391,6 +393,9 @@ void play_mario_sound(struct MarioState *m, s32 actionSound, s32 marioSound) {
|
||||||
void mario_set_bubbled(struct MarioState* m) {
|
void mario_set_bubbled(struct MarioState* m) {
|
||||||
if (m->playerIndex != 0) { return; }
|
if (m->playerIndex != 0) { return; }
|
||||||
if (m->action == ACT_BUBBLED) { return; }
|
if (m->action == ACT_BUBBLED) { return; }
|
||||||
|
|
||||||
|
gLocalBubbleCounter = 20;
|
||||||
|
|
||||||
set_mario_action(m, ACT_BUBBLED, 0);
|
set_mario_action(m, ACT_BUBBLED, 0);
|
||||||
if (m->numLives != -1) {
|
if (m->numLives != -1) {
|
||||||
m->numLives--;
|
m->numLives--;
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
extern u16 gLocalBubbleCounter;
|
||||||
|
|
||||||
s32 is_anim_at_end(struct MarioState *m);
|
s32 is_anim_at_end(struct MarioState *m);
|
||||||
s32 is_anim_past_end(struct MarioState *m);
|
s32 is_anim_past_end(struct MarioState *m);
|
||||||
s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);
|
s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);
|
||||||
|
|
|
@ -1008,8 +1008,10 @@ s32 act_bubbled(struct MarioState* m) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gLocalBubbleCounter > 0) { gLocalBubbleCounter--; }
|
||||||
|
|
||||||
// pop bubble
|
// pop bubble
|
||||||
if (m->playerIndex == 0 && distanceToPlayer < 120 && is_player_active(targetMarioState) && m->numLives != -1) {
|
if (m->playerIndex == 0 && distanceToPlayer < 120 && is_player_active(targetMarioState) && m->numLives != -1 && gLocalBubbleCounter <= 0) {
|
||||||
m->marioObj->activeFlags &= ~ACTIVE_FLAG_MOVE_THROUGH_GRATE;
|
m->marioObj->activeFlags &= ~ACTIVE_FLAG_MOVE_THROUGH_GRATE;
|
||||||
m->hurtCounter = 0;
|
m->hurtCounter = 0;
|
||||||
m->healCounter = 31;
|
m->healCounter = 31;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static u8 warpToLevel = LEVEL_RR;
|
static u8 warpToLevel = LEVEL_SSL;
|
||||||
static u8 warpToArea = 27;
|
static u8 warpToArea = 27;
|
||||||
// warpToArea: 26 = basement
|
// warpToArea: 26 = basement
|
||||||
// warpToArea: 27 = upstairs
|
// warpToArea: 27 = upstairs
|
||||||
|
|
Loading…
Reference in New Issue