Fix wiggler glitching when being jumped on when small. (#287)

This commit is contained in:
Prince Frizzy 2023-02-21 02:46:59 -05:00 committed by GitHub
parent f6fcf65ed2
commit 48d1f28d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -411,6 +411,11 @@ static void wiggler_act_fall_through_floor(void) {
*/
void wiggler_jumped_on_attack_handler(void) {
cur_obj_play_sound_2(SOUND_OBJ_WIGGLER_ATTACKED);
// Check for if we've already defeated the Wiggler.
if (o->header.gfx.scale[0] == 1.0f) {
o->oAction = WIGGLER_ACT_KNOCKBACK;
return;
}
o->oAction = WIGGLER_ACT_JUMPED_ON;
o->oForwardVel = o->oVelY = 0.0f;
o->oWigglerSquishSpeed = 0.4f;