From 81e9441218b26889791f78a832eb7f9d0c75009b Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Mon, 22 Jul 2024 21:51:33 -0700 Subject: [PATCH] WIP: Overdrive polish 2 --- src/info.c | 1 + src/info.h | 1 + src/k_kart.c | 11 ----------- src/objects/block.c | 33 ++++++++++++++++++++++++++------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/info.c b/src/info.c index 9d7b91e82..3aaefbcda 100644 --- a/src/info.c +++ b/src/info.c @@ -578,6 +578,7 @@ char sprnames[NUMSPRITES + 1][5] = "EGOO", "AMPA", + "AMPB", "WTRL", // Water Trail diff --git a/src/info.h b/src/info.h index fa8e3fc1b..2631ccc19 100644 --- a/src/info.h +++ b/src/info.h @@ -1117,6 +1117,7 @@ typedef enum sprite SPR_EGOO, SPR_AMPA, + SPR_AMPB, SPR_WTRL, // Water Trail diff --git a/src/k_kart.c b/src/k_kart.c index 28eacac7c..c29f658f1 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2012,12 +2012,6 @@ static void K_SpawnGenericSpeedLines(player_t *player, boolean top) fast->color = SKINCOLOR_WHITE; fast->colorized = true; } - else if (player->overdrive) - { - fast->color = player->skincolor; - fast->renderflags |= RF_ADD; - fast->scale *= 2; - } else if (player->ringboost) { UINT8 ringboostcolors[] = {SKINCOLOR_AQUAMARINE, SKINCOLOR_EMERALD, SKINCOLOR_GARDEN, SKINCOLOR_CROCODILE, SKINCOLOR_BANANA}; @@ -12026,11 +12020,6 @@ static void K_KartSpindash(player_t *player) K_KartSpindashWind(player->mo); } - if ((player->overdrive > 0) && (spawnWind == true)) - { - K_KartSpindashWind(player->mo); - } - if (player->spindashboost > (TICRATE/2)) { K_KartSpindashDust(player->mo); diff --git a/src/objects/block.c b/src/objects/block.c index 91f542525..c30f18dc4 100644 --- a/src/objects/block.c +++ b/src/objects/block.c @@ -17,6 +17,8 @@ #include "../k_kart.h" #include "../k_powerup.h" +static UINT8 interlacedfuckingthing[] = {6,1,7,2,8,3,9,2,1,1,1,2,1,3,1,2,10,1,11,2,4,3,5,2,1,1,1,2,1,3,1,2}; + void Obj_BlockRingThink (mobj_t *ring) { if (P_MobjWasRemoved(ring->target) || !ring->target->player) @@ -32,23 +34,42 @@ void Obj_BlockRingThink (mobj_t *ring) ring->flags &= ~(MF_NOCLIPTHING); P_MoveOrigin(ring, mo->x, mo->y, mo->z + mo->height/2); ring->flags |= MF_NOCLIPTHING; - ring->color = mo->color; + ring->color = mo->player->skincolor; fixed_t baseScale = mo->scale / 2; baseScale += (mo->scale / 30) * player->spheres; + if (player->overdrive) + { baseScale += mo->scale; + ring->sprite = SPR_AMPB; + ring->frame = interlacedfuckingthing[(leveltime/1)%32]-1; + ring->colorized = true; + } + else + { + ring->colorized = false; + ring->frame = 0; + } + P_SetScale(ring, baseScale); // Twirl - ring->angle = ring->target->angle + (ANG15 * leveltime); + ring->angle = ring->target->angle + (ANG15/2 * leveltime); // Visuals ring->renderflags |= RF_ADD|RF_PAPERSPRITE; - if (leveltime%2) + if (player->overdrive > 35) + { ring->renderflags &= ~RF_DONTDRAW; + } else - ring->renderflags |= RF_DONTDRAW; + { + if (leveltime%2) + ring->renderflags &= ~RF_DONTDRAW; + else + ring->renderflags |= RF_DONTDRAW; + } if (K_PowerUpRemaining(player, POWERUP_BARRIER) || !(K_PlayerGuard(player) || player->overdrive)) ring->renderflags |= RF_DONTDRAW; @@ -71,8 +92,6 @@ void Obj_BlockBodyThink (mobj_t *body) fixed_t baseScale = mo->scale / 2; baseScale += (mo->scale / 30) * player->spheres; - if (player->overdrive) - baseScale += mo->scale; P_SetScale(body, baseScale); P_MoveOrigin(body, mo->x, mo->y, mo->z + mo->height/2); @@ -87,7 +106,7 @@ void Obj_BlockBodyThink (mobj_t *body) else body->renderflags |= RF_DONTDRAW; - if (K_PowerUpRemaining(player, POWERUP_BARRIER) || !(K_PlayerGuard(player) || player->overdrive)) + if (K_PowerUpRemaining(player, POWERUP_BARRIER) || !K_PlayerGuard(player)) body->renderflags |= RF_DONTDRAW; } }