diff --git a/src/deh_tables.c b/src/deh_tables.c index cc4369665..2796b23dc 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -2544,6 +2544,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi // Orange Spring (Pogo) "S_POGOSPRING1", "S_POGOSPRING2", + "S_POGOSPRING2B", "S_POGOSPRING3", "S_POGOSPRING4", diff --git a/src/info.c b/src/info.c index 2ab293c11..378a7ddd8 100644 --- a/src/info.c +++ b/src/info.c @@ -3075,6 +3075,7 @@ state_t states[NUMSTATES] = // Orange Spring (Pogo) {SPR_SPVB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_POGOSPRING1 {SPR_SPVB, 1, 1, {A_Pain}, 0, 0, S_POGOSPRING3}, // S_POGOSPRING2 + {SPR_SPVB, 1, 1, {A_PlaySeeSound}, 0, 0, S_POGOSPRING3}, // S_POGOSPRING2B {SPR_SPVB, 0, 1, {NULL}, 0, 0, S_POGOSPRING4}, // S_POGOSPRING3 {SPR_SPVB, 2, 4, {NULL}, 0, 0, S_POGOSPRING1}, // S_POGOSPRING4 @@ -8246,9 +8247,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = -1, // doomednum S_POGOSPRING1, // spawnstate 1000, // spawnhealth - S_POGOSPRING2, // seestate - sfx_None, // seesound - 8, // reactiontime + S_POGOSPRING2B, // seestate + sfx_eggspr, // seesound + 0, // reactiontime sfx_None, // attacksound S_NULL, // painstate SKINCOLOR_SUNSLAM, // painchance diff --git a/src/info.h b/src/info.h index 232bfbc77..a0447fd03 100644 --- a/src/info.h +++ b/src/info.h @@ -3532,6 +3532,7 @@ typedef enum state // Orange Spring (Pogo) S_POGOSPRING1, S_POGOSPRING2, + S_POGOSPRING2B, S_POGOSPRING3, S_POGOSPRING4, diff --git a/src/k_kart.c b/src/k_kart.c index 52779a1d3..1f52f3f6d 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -402,7 +402,7 @@ static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][2] = /*Bubble Shield*/ { 1, 0 }, // Bubble Shield /*Flame Shield*/ { 1, 0 }, // Flame Shield /*Hyudoro*/ { 2, 0 }, // Hyudoro - /*Pogo Spring*/ { 0, 0 }, // Pogo Spring + /*Pogo Spring*/ { 1, 0 }, // Pogo Spring /*Super Ring*/ { 0, 0 }, // Super Ring /*Kitchen Sink*/ { 0, 0 }, // Kitchen Sink /*Drop Target*/ { 2, 0 }, // Drop Target @@ -10124,9 +10124,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO && player->trickpanel == 0) { K_PlayBoostTaunt(player->mo); - K_DoPogoSpring(player->mo, 32<trickpanel = 1; - player->pflags |= PF_TRICKDELAY; + //K_DoPogoSpring(player->mo, 32<mo, 0, 0, 0, MT_POGOSPRING); player->itemamount--; } break; diff --git a/src/p_map.c b/src/p_map.c index 473ded5fe..beb2b23d3 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -301,6 +301,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) UINT16 starcolor = (spring->info->painchance % numskincolors); fixed_t savemomx = 0; fixed_t savemomy = 0; + statenum_t raisestate = spring->info->raisestate; // Object was already sprung this tic if (object->eflags & MFE_SPRUNG) @@ -412,8 +413,6 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) // Re-solidify spring->flags |= (spring->info->flags & (MF_SPRING|MF_SPECIAL)); - P_SetMobjState(spring, spring->info->raisestate); - if (object->player) { if (spring->flags & MF_ENEMY) // Spring shells @@ -444,8 +443,37 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) { object->player->tiregrease = greasetics; } + + if (spring->type == MT_POGOSPRING) + { + if (spring->reactiontime == 0) + { + object->player->tricktime = 0; // Reset post-hitlag timer + // Setup the boost for potential upwards trick, at worse, make it your regular max speed. (boost = curr speed*1.25) + object->player->trickboostpower = max(FixedDiv(object->player->speed, K_GetKartSpeed(object->player, false, false)) - FRACUNIT, 0)*125/100; + //CONS_Printf("Got boost: %d%\n", mo->player->trickboostpower*100 / FRACUNIT); + object->player->trickpanel = 1; + object->player->pflags |= PF_TRICKDELAY; + } + else + { + raisestate = spring->info->seestate; + + object->player->tumbleBounces = 1; + object->player->pflags &= ~PF_TUMBLESOUND; + object->player->tumbleHeight = 50; + P_SetPlayerMobjState(object->player->mo, S_KART_SPINOUT); + + // FIXME: try to compensate tumbling gravity + object->momz = 3 * object->momz / 2; + } + + spring->reactiontime++; + } } + P_SetMobjState(spring, raisestate); + return true; }