From 7c793096f1aa5cde309fecd0af213a5aa14524e2 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 01:27:06 -0400 Subject: [PATCH 01/17] Modernize BallhogBoom animation states Cut down BallhogBoom states into 1 nice FF_ANIMATE because it's so old, changed all BALLHOGBOOM1s to just BALLHOGBOOM --- src/info.c | 17 +---------------- src/info.h | 17 +---------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/info.c b/src/info.c index 86f27594a..e5ff38dbb 100644 --- a/src/info.c +++ b/src/info.c @@ -2511,22 +2511,7 @@ state_t states[NUMSTATES] = {SPR_BHOG, 6, 1, {NULL}, 0, 0, S_BALLHOG8}, // S_BALLHOG7 {SPR_BHOG, 7, 1, {NULL}, 0, 0, S_BALLHOG1}, // S_BALLHOG8 {SPR_NULL, 0, 1, {A_BallhogExplode}, 0, 0, S_NULL}, // S_BALLHOG_DEAD - {SPR_BHBM, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_BALLHOGBOOM2}, // S_BALLHOGBOOM1 - {SPR_BHBM, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_BALLHOGBOOM3}, // S_BALLHOGBOOM2 - {SPR_BHBM, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_BALLHOGBOOM4}, // S_BALLHOGBOOM3 - {SPR_BHBM, FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_BALLHOGBOOM5}, // S_BALLHOGBOOM4 - {SPR_BHBM, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_BALLHOGBOOM6}, // S_BALLHOGBOOM5 - {SPR_BHBM, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_BALLHOGBOOM7}, // S_BALLHOGBOOM6 - {SPR_BHBM, FF_FULLBRIGHT|6, 1, {NULL}, 0, 0, S_BALLHOGBOOM8}, // S_BALLHOGBOOM7 - {SPR_BHBM, FF_FULLBRIGHT|7, 1, {NULL}, 0, 0, S_BALLHOGBOOM9}, // S_BALLHOGBOOM8 - {SPR_BHBM, FF_FULLBRIGHT|8, 1, {NULL}, 0, 0, S_BALLHOGBOOM10}, // S_BALLHOGBOOM9 - {SPR_BHBM, FF_FULLBRIGHT|9, 1, {NULL}, 0, 0, S_BALLHOGBOOM11}, // S_BALLHOGBOOM10 - {SPR_BHBM, FF_FULLBRIGHT|10, 1, {NULL}, 0, 0, S_BALLHOGBOOM12}, // S_BALLHOGBOOM11 - {SPR_BHBM, FF_FULLBRIGHT|11, 1, {NULL}, 0, 0, S_BALLHOGBOOM13}, // S_BALLHOGBOOM12 - {SPR_BHBM, FF_FULLBRIGHT|12, 1, {NULL}, 0, 0, S_BALLHOGBOOM14}, // S_BALLHOGBOOM13 - {SPR_BHBM, FF_FULLBRIGHT|13, 1, {NULL}, 0, 0, S_BALLHOGBOOM15}, // S_BALLHOGBOOM14 - {SPR_BHBM, FF_FULLBRIGHT|14, 1, {NULL}, 0, 0, S_BALLHOGBOOM16}, // S_BALLHOGBOOM15 - {SPR_BHBM, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_NULL}, // S_BALLHOGBOOM16 + {SPR_BHBM, FF_ANIMATE|FF_FULLBRIGHT, 27, {NULL}, 26, 1, S_NULL}, // S_BALLHOG_BOOM {SPR_BHGR, FF_ANIMATE|FF_FULLBRIGHT|0, 2*TICRATE, {NULL}, 5, 3, S_NULL}, // S_BALLHOG_RETICULE {SPR_SPBM, 0, 1, {NULL}, 0, 0, S_SPB2}, // S_SPB1 diff --git a/src/info.h b/src/info.h index dd99ca9c4..8399084c6 100644 --- a/src/info.h +++ b/src/info.h @@ -3001,22 +3001,7 @@ typedef enum state S_BALLHOG7, S_BALLHOG8, S_BALLHOG_DEAD, - S_BALLHOGBOOM1, - S_BALLHOGBOOM2, - S_BALLHOGBOOM3, - S_BALLHOGBOOM4, - S_BALLHOGBOOM5, - S_BALLHOGBOOM6, - S_BALLHOGBOOM7, - S_BALLHOGBOOM8, - S_BALLHOGBOOM9, - S_BALLHOGBOOM10, - S_BALLHOGBOOM11, - S_BALLHOGBOOM12, - S_BALLHOGBOOM13, - S_BALLHOGBOOM14, - S_BALLHOGBOOM15, - S_BALLHOGBOOM16, + S_BALLHOGBOOM, S_BALLHOG_RETICULE, // Self-Propelled Bomb From ed98af18b20aca8c739a2aaffafb4b58cedd66b0 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 01:30:02 -0400 Subject: [PATCH 02/17] This too needed renaming I forgot to hit ctrl+s lol --- src/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index e5ff38dbb..019cb0d17 100644 --- a/src/info.c +++ b/src/info.c @@ -2511,7 +2511,7 @@ state_t states[NUMSTATES] = {SPR_BHOG, 6, 1, {NULL}, 0, 0, S_BALLHOG8}, // S_BALLHOG7 {SPR_BHOG, 7, 1, {NULL}, 0, 0, S_BALLHOG1}, // S_BALLHOG8 {SPR_NULL, 0, 1, {A_BallhogExplode}, 0, 0, S_NULL}, // S_BALLHOG_DEAD - {SPR_BHBM, FF_ANIMATE|FF_FULLBRIGHT, 27, {NULL}, 26, 1, S_NULL}, // S_BALLHOG_BOOM + {SPR_BHBM, FF_ANIMATE|FF_FULLBRIGHT, 27, {NULL}, 26, 1, S_NULL}, // S_BALLHOGBOOM {SPR_BHGR, FF_ANIMATE|FF_FULLBRIGHT|0, 2*TICRATE, {NULL}, 5, 3, S_NULL}, // S_BALLHOG_RETICULE {SPR_SPBM, 0, 1, {NULL}, 0, 0, S_SPB2}, // S_SPB1 @@ -15385,7 +15385,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_BALLHOGBOOM -1, // doomednum - S_BALLHOGBOOM1, // spawnstate + S_BALLHOGBOOM, // spawnstate 1000, // spawnhealth S_NULL, // seestate sfx_None, // seesound From e7246b1fd552def704fa964216e21a274599d8db Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 01:31:05 -0400 Subject: [PATCH 03/17] Even more BALLHOGBOOM reduction I missed another ctrl+s huh --- src/deh_tables.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index eadb207f2..6a39d2e71 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1934,22 +1934,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_BALLHOG7", "S_BALLHOG8", "S_BALLHOG_DEAD", - "S_BALLHOGBOOM1", - "S_BALLHOGBOOM2", - "S_BALLHOGBOOM3", - "S_BALLHOGBOOM4", - "S_BALLHOGBOOM5", - "S_BALLHOGBOOM6", - "S_BALLHOGBOOM7", - "S_BALLHOGBOOM8", - "S_BALLHOGBOOM9", - "S_BALLHOGBOOM10", - "S_BALLHOGBOOM11", - "S_BALLHOGBOOM12", - "S_BALLHOGBOOM13", - "S_BALLHOGBOOM14", - "S_BALLHOGBOOM15", - "S_BALLHOGBOOM16", + "S_BALLHOGBOOM", "S_BALLHOG_RETICULE", // Self-Propelled Bomb - just an explosion for now... From aa0fb02f9a6321a8581a2e89fb0ee8ce8ca8de9e Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 03:11:16 -0400 Subject: [PATCH 04/17] Reticule radius increase Doubled the reticule radius to make it more effective & match new hitbox --- src/objects/ballhog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects/ballhog.cpp b/src/objects/ballhog.cpp index 1fe2ba218..cbf720c5d 100644 --- a/src/objects/ballhog.cpp +++ b/src/objects/ballhog.cpp @@ -61,7 +61,7 @@ static void CalculateHogAngles(UINT8 n) if (total_hogs > 1) { - const fixed_t base_radius = mobjinfo[MT_BALLHOG].radius * 6; + const fixed_t base_radius = mobjinfo[MT_BALLHOG].radius * 12; fixed_t radius = base_radius; UINT8 max_points = 6; angle_t circle_offset = 0; From 4577b0a3e3ba0906eeaf92d090f2af1a035d4ca2 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 03:11:49 -0400 Subject: [PATCH 05/17] Deathstate sound and radius increase Made it bigger, use a Gunstar Heroes sound and NOT a kirby one --- src/info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index 019cb0d17..1139aeb2e 100644 --- a/src/info.c +++ b/src/info.c @@ -15371,7 +15371,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // missilestate S_BALLHOG_DEAD, // deathstate S_NULL, // xdeathstate - sfx_hogbom, // deathsound + sfx_gshdd, // deathsound 0, // speed 26*FRACUNIT, // radius 64*FRACUNIT, // height @@ -15400,8 +15400,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_None, // deathsound 0, // speed - 32*FRACUNIT, // radius - 32*FRACUNIT, // height + 50*FRACUNIT, // radius + 50*FRACUNIT, // height 0, // display offset 100, // mass 1, // damage From d2b7bfcc0049974c38738fa0be892bc619f4e1f5 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 03:12:41 -0400 Subject: [PATCH 06/17] Big fat quakes It quakes, and proxmine explosion is fat too --- src/p_enemy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 03d823eb7..3fbb4e36a 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -12207,6 +12207,8 @@ void A_BallhogExplode(mobj_t *actor) P_SetTarget(&mo2->target, actor->target); S_StartSound(mo2, actor->info->deathsound); + P_StartQuakeFromMobj(7, 50 * actor->scale, 1024 * actor->scale, actor); + actor->fuse = 1; return; } @@ -12217,7 +12219,7 @@ void A_SpecialStageBombExplode(mobj_t *actor) return; K_SpawnLandMineExplosion(actor, SKINCOLOR_KETCHUP, actor->hitlag); - P_StartQuakeFromMobj(TICRATE/6, 24 * actor->scale, 512 * mapobjectscale, actor); + P_StartQuakeFromMobj(7, 80 * actor->scale, 2048 * mapobjectscale, actor); } // A_LightningFollowPlayer: From 12f8c6814453145fe5b8bae29bb83212d9339800 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 03:13:06 -0400 Subject: [PATCH 07/17] Gunstar sound plays further away since we use it now --- src/sounds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sounds.c b/src/sounds.c index 4af86b79d..2df3575db 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1481,7 +1481,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"gshda", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshdb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshdc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"gshdd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"gshdd", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, //New ballhog explosion {"gshde", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshdf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshe0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, From 567ec0aef241809225222ddc81aac33cba96d682 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 04:37:58 -0400 Subject: [PATCH 08/17] Deathstate for SSMine has sound But it doesn't fucking work because of course it don't --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 1139aeb2e..5b3a518e6 100644 --- a/src/info.c +++ b/src/info.c @@ -15128,7 +15128,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // missilestate S_SSMINE_EXPLODE, // deathstate S_NULL, // xdeathstate - sfx_None, // deathsound + sfx_gshc5, // deathsound 0, // speed 16*FRACUNIT, // radius 56*FRACUNIT, // height From b4d4e3a140abfbf9ad491babf6783f78dfae4b4e Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 29 Jul 2025 04:39:42 -0400 Subject: [PATCH 09/17] Bigger quake Bigger quake but it doesn't do anything :holdingbacktears: --- src/p_enemy.c | 2 +- src/sounds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 3fbb4e36a..edfb8a3a1 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -12219,7 +12219,7 @@ void A_SpecialStageBombExplode(mobj_t *actor) return; K_SpawnLandMineExplosion(actor, SKINCOLOR_KETCHUP, actor->hitlag); - P_StartQuakeFromMobj(7, 80 * actor->scale, 2048 * mapobjectscale, actor); + //P_StartQuakeFromMobj(7, 80 * actor->scale, 4096 * mapobjectscale, actor); } // A_LightningFollowPlayer: diff --git a/src/sounds.c b/src/sounds.c index 2df3575db..679247370 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1457,7 +1457,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"gshc2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshc3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshc4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"gshc5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"gshc5", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, //x8away, ProxMineBOOM! {"gshc6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshc7", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, //x8away {"gshc8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, From 6aed8f5f1c995f07eecac1e90f9a9f2e9d17657a Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 29 Jul 2025 05:28:13 -0400 Subject: [PATCH 10/17] Galactic ballhog fuckup WIP --- src/d_player.h | 1 + src/k_hud.cpp | 2 +- src/k_kart.c | 54 ++++++++++++++++++++++++++++++++++++++++++++- src/k_kart.h | 2 ++ src/lua_playerlib.c | 4 ++++ src/p_enemy.c | 6 +++++ src/p_map.c | 6 +++++ src/p_mobj.c | 6 +++-- src/p_saveg.cpp | 2 ++ 9 files changed, 79 insertions(+), 4 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index e73ff2e12..e00736305 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -838,6 +838,7 @@ struct player_t UINT16 counterdash; // Flame Shield boost without the flame, largely. Used in places where awarding thrust would affect player control. UINT16 ballhogcharge; // Ballhog charge up -- the higher this value, the more projectiles + UINT8 ballhogburst; boolean ballhogtap; // Ballhog released during charge: used to allow semirapid tapfire mobj_t *ballhogreticule; // First ballhog reticule estimation object diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 683117cab..aaca2abf1 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -1875,7 +1875,7 @@ static void K_drawKartItem(void) V_ClearClipRect(); // A little goofy, but helps with ballhog charge conveyance—you're "loading" them. - UINT8 fakeitemamount = stplyr->itemamount - (stplyr->ballhogcharge / BALLHOGINCREMENT); + UINT8 fakeitemamount = stplyr->itemamount - std::min(stplyr->itemamount - 1, (stplyr->ballhogcharge / BALLHOGINCREMENT)); boolean transflag = V_HUDTRANS; diff --git a/src/k_kart.c b/src/k_kart.c index f30e3bbd4..19497e3ca 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -10984,6 +10984,17 @@ void K_KartResetPlayerColor(player_t *player) } } + if (player->ballhogcharge && player->ballhogburst >= (BALLHOG_BURST_FUSE/2)) + { + if (player->ballhogburst % 2 == 0) + { + player->mo->colorized = true; + player->mo->color = SKINCOLOR_KETCHUP; + fullbright = true; + goto finalise; + } + } + if (player->invincibilitytimer) // You're gonna kiiiiill { const tic_t defaultTime = itemtime+(2*TICRATE); @@ -14696,6 +14707,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { if (player->ballhogcharge < ballhogmax) { + player->ballhogburst = 0; player->ballhogcharge++; if (player->ballhogcharge % BALLHOGINCREMENT == 0) @@ -14713,6 +14725,47 @@ void K_MoveKartPlayer(player_t *player, boolean onground) S_StartSound(player->mo, hogsound[chargesound-1]); } } + else + { + player->ballhogburst++; + + if (player->ballhogburst == BALLHOG_BURST_FUSE/2) + S_StartSound(player->mo, sfx_gshb8); + else if (player->ballhogburst == BALLHOG_BURST_FUSE) + { + K_PlayBoostTaunt(player->mo); + for (UINT8 j = 0; j < player->itemamount; j++) + { + K_DoSneaker(player, 0); + } + + mobj_t *boom = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_THOK); + P_SetMobjState(boom, S_BALLHOGBOOM); + boom->scale = player->mo->scale + (player->mo->scale / 4 * player->itemamount); + // boom->momx = player->mo->momx/2; + // boom->momy = player->mo->momy/2; + // boom->momz = player->mo->momz/2; + boom->color = player->skincolor; + boom->colorized = true; + S_StartSound(player->mo, mobjinfo[MT_BALLHOG].deathsound); + + K_StumblePlayer(player); + K_AddHitLag(player->mo, TICRATE/4, false); + player->tumbleBounces = 10; + + P_Thrust(player->mo, player->mo->angle, 240 * player->mo->scale); + + if (onground) + player->mo->momz += 10*player->mo->scale; + else + player->mo->momz -= 50*player->mo->scale; + + player->itemamount = 0; + player->botvars.itemconfirm = 0; + player->ballhogcharge = 0; + player->ballhogburst = 0; + } + } } else { @@ -16532,7 +16585,6 @@ static boolean K_PickUp(player_t *player, mobj_t *picked) type = KITEM_JAWZ; break; case MT_BALLHOG: - case MT_BALLHOGBOOM: type = KITEM_BALLHOG; break; case MT_LANDMINE: diff --git a/src/k_kart.h b/src/k_kart.h index 181bac2fd..1d36bab5d 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -68,6 +68,8 @@ Make sure this matches the actual number of states #define FLAMESHIELD_MAX (120) +#define BALLHOG_BURST_FUSE (TICRATE) + #define RR_PROJECTILE_FUSE (8*TICRATE) #define SCAMDIST (2000) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index ea452a7ab..c5209dd18 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -498,6 +498,8 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->lightningcharge); else if (fastcmp(field,"ballhogcharge")) lua_pushinteger(L, plr->ballhogcharge); + else if (fastcmp(field,"ballhogburst")) + lua_pushinteger(L, plr->ballhogburst); else if (fastcmp(field,"ballhogtap")) lua_pushinteger(L, plr->ballhogtap); else if (fastcmp(field,"hyudorotimer")) @@ -1139,6 +1141,8 @@ static int player_set(lua_State *L) plr->lightningcharge = luaL_checkinteger(L, 3); else if (fastcmp(field,"ballhogcharge")) plr->ballhogcharge = luaL_checkinteger(L, 3); + else if (fastcmp(field,"ballhogburst")) + plr->ballhogburst = luaL_checkinteger(L, 3); else if (fastcmp(field,"ballhogtap")) plr->ballhogtap = luaL_checkinteger(L, 3); else if (fastcmp(field,"hyudorotimer")) diff --git a/src/p_enemy.c b/src/p_enemy.c index edfb8a3a1..017797b46 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -12206,6 +12206,12 @@ void A_BallhogExplode(mobj_t *actor) mo2->destscale = mo2->scale; P_SetTarget(&mo2->target, actor->target); S_StartSound(mo2, actor->info->deathsound); + + if (actor->target && !P_MobjWasRemoved(actor->target) && actor->target->player) + { + mo2->color = actor->target->color; + mo2->colorized = true; + } P_StartQuakeFromMobj(7, 50 * actor->scale, 1024 * actor->scale, actor); diff --git a/src/p_map.c b/src/p_map.c index 46a0c3298..2efbc253c 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2775,11 +2775,17 @@ fixed_t P_BaseStepUp(void) fixed_t P_GetThingStepUp(mobj_t *thing, fixed_t destX, fixed_t destY) { + + // I have no idea why this check caused Ballhog to step up on EVERYTHING, + // but it sure did step up on everything. + + /* if (thing->type == MT_BALLHOG || thing->type == MT_BALLHOG_RETICULE_TEST) { // these should explode, not go up stairs return 0; } + */ const fixed_t maxstepmove = P_BaseStepUp(); fixed_t maxstep = maxstepmove; diff --git a/src/p_mobj.c b/src/p_mobj.c index 4c5eeb34f..179a5e550 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1719,11 +1719,13 @@ boolean P_XYMovement(mobj_t *mo) P_PushSpecialLine(result.line, mo); + /* if (mo->type == MT_BALLHOG || mo->type == MT_BALLHOG_RETICULE_TEST) { P_ExplodeMissile(mo); return false; } + */ if (mo->flags & MF_MISSILE) { @@ -2011,7 +2013,7 @@ boolean P_XYMovement(mobj_t *mo) return moved; //{ SRB2kart stuff - if (mo->type == MT_FLINGRING || mo->type == MT_BALLHOG || mo->type == MT_BALLHOG_RETICULE_TEST || mo->type == MT_BUBBLESHIELDTRAP) + if (mo->type == MT_FLINGRING || mo->type == MT_BUBBLESHIELDTRAP) return moved; if (player && (player->spinouttimer && !player->wipeoutslow) @@ -2390,7 +2392,7 @@ boolean P_ZMovement(mobj_t *mo) break; case MT_BALLHOG: case MT_BALLHOG_RETICULE_TEST: - if (mo->z <= mo->floorz || mo->z + mo->height >= mo->ceilingz) + if (mo->z <= mo->floorz) { P_ExplodeMissile(mo); return false; diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 45da46e47..688556420 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -563,6 +563,7 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT8(save->p, players[i].lightningcharge); WRITEUINT16(save->p, players[i].ballhogcharge); + WRITEUINT8(save->p, players[i].ballhogburst); WRITEUINT8(save->p, players[i].ballhogtap); WRITEUINT16(save->p, players[i].hyudorotimer); @@ -1229,6 +1230,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) players[i].lightningcharge = READUINT8(save->p); players[i].ballhogcharge = READUINT16(save->p); + players[i].ballhogburst = READUINT8(save->p); players[i].ballhogtap = READUINT8(save->p); players[i].hyudorotimer = READUINT16(save->p); From 893098c59da3119a39e7a90a1d72754418c4bfa8 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 29 Jul 2025 17:26:15 -0400 Subject: [PATCH 11/17] Hog refinement, PF2_FASTTUMBLEBOUNCE --- src/d_player.h | 1 + src/k_hud_track.cpp | 15 ++++++++++++++- src/k_kart.c | 38 +++++++++++++++++++++++++++++++------- src/k_kart.h | 2 +- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index e00736305..b80a97797 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -145,6 +145,7 @@ typedef enum PF2_ALWAYSDAMAGED = 1<<6, // Ignore invulnerability or clash conditions when evaulating damage (P_DamageMobj). Unset after use! PF2_BUBBLECONTACT = 1<<7, // ACHTUNG VERY BAD HACK - Don't allow Bubble Shield to contact certain objects unless this is a fresh blowup. PF2_SUPERTRANSFERVFX = 1<<8, // Don't respawn the "super transfer available" VFX. + PF2_FASTTUMBLEBOUNCE = 1<<9, // Don't lose speed when tumblebouncing. } pflags2_t; typedef enum diff --git a/src/k_hud_track.cpp b/src/k_hud_track.cpp index 26c240916..57303b809 100644 --- a/src/k_hud_track.cpp +++ b/src/k_hud_track.cpp @@ -468,7 +468,20 @@ std::optional object_tooltip(const mobj_t* mobj) TextElement().parse("").font(splitfont)) ) .offset3d(0, 0, 64 * mobj->scale * P_MobjFlip(mobj)); - + + if (mobj->player == stplyr && stplyr->ballhogburst >= (BALLHOG_BURST_FUSE/3)) + { + UINT32 flag = 0; + if (stplyr->ballhogburst % 2) + flag = (stplyr->ballhogburst >= (2*BALLHOG_BURST_FUSE/3)) ? V_REDMAP : V_YELLOWMAP; + + return Tooltip( + TextElement( + TextElement().parse("DANGER!").flags(V_20TRANS|flag).font(splitfont)) + ) + .offset3d(0, 0, 32 * mobj->scale * P_MobjFlip(mobj)); + } + return conditional( mobj->player == stplyr && stplyr->icecube.frozen, [&] { return Tooltip(TextElement( diff --git a/src/k_kart.c b/src/k_kart.c index 19497e3ca..a87ad66c5 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5445,8 +5445,13 @@ static void K_HandleTumbleBounce(player_t *player) S_StartSound(player->mo, (player->tumbleHeight < 40) ? sfx_s3k5d : sfx_s3k5f); // s3k5d is bounce < 50, s3k5f otherwise! - player->mo->momx = player->mo->momx / 2; - player->mo->momy = player->mo->momy / 2; + if (!(player->pflags2 & PF2_FASTTUMBLEBOUNCE)) + { + player->mo->momx = player->mo->momx / 2; + player->mo->momy = player->mo->momy / 2; + } + + player->pflags2 &= ~PF2_FASTTUMBLEBOUNCE; // and then modulate momz like that... player->mo->momz = K_TumbleZ(player->mo, player->tumbleHeight * FRACUNIT); @@ -10984,12 +10989,20 @@ void K_KartResetPlayerColor(player_t *player) } } - if (player->ballhogcharge && player->ballhogburst >= (BALLHOG_BURST_FUSE/2)) + if (player->ballhogcharge && player->ballhogburst >= (2*BALLHOG_BURST_FUSE/3)) + { + player->mo->colorized = true; + player->mo->color = (player->ballhogburst % 2) ? SKINCOLOR_CRIMSON : SKINCOLOR_BLACK; + fullbright = true; + goto finalise; + } + + if (player->ballhogcharge && player->ballhogburst >= (BALLHOG_BURST_FUSE/3)) { if (player->ballhogburst % 2 == 0) { player->mo->colorized = true; - player->mo->color = SKINCOLOR_KETCHUP; + player->mo->color = SKINCOLOR_CRIMSON; fullbright = true; goto finalise; } @@ -14729,8 +14742,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { player->ballhogburst++; - if (player->ballhogburst == BALLHOG_BURST_FUSE/2) + if (player->ballhogburst == 2*BALLHOG_BURST_FUSE/3) S_StartSound(player->mo, sfx_gshb8); + + if (player->ballhogburst == BALLHOG_BURST_FUSE/3) + S_StartSound(player->mo, sfx_gshda); + else if (player->ballhogburst == BALLHOG_BURST_FUSE) { K_PlayBoostTaunt(player->mo); @@ -14739,26 +14756,33 @@ void K_MoveKartPlayer(player_t *player, boolean onground) K_DoSneaker(player, 0); } + S_StopSoundByID(player->mo, sfx_gshda); + mobj_t *boom = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_THOK); P_SetMobjState(boom, S_BALLHOGBOOM); boom->scale = player->mo->scale + (player->mo->scale / 4 * player->itemamount); + // boom->momx = player->mo->momx/2; // boom->momy = player->mo->momy/2; // boom->momz = player->mo->momz/2; + boom->color = player->skincolor; boom->colorized = true; S_StartSound(player->mo, mobjinfo[MT_BALLHOG].deathsound); K_StumblePlayer(player); K_AddHitLag(player->mo, TICRATE/4, false); - player->tumbleBounces = 10; + player->tumbleBounces = TUMBLEBOUNCES; - P_Thrust(player->mo, player->mo->angle, 240 * player->mo->scale); + P_Thrust(player->mo, player->mo->angle, (40 + 10 * player->itemamount) * player->mo->scale); + player->pflags2 |= PF2_FASTTUMBLEBOUNCE; + /* if (onground) player->mo->momz += 10*player->mo->scale; else player->mo->momz -= 50*player->mo->scale; + */ player->itemamount = 0; player->botvars.itemconfirm = 0; diff --git a/src/k_kart.h b/src/k_kart.h index 1d36bab5d..cdeaa393a 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -68,7 +68,7 @@ Make sure this matches the actual number of states #define FLAMESHIELD_MAX (120) -#define BALLHOG_BURST_FUSE (TICRATE) +#define BALLHOG_BURST_FUSE (TICRATE*2) #define RR_PROJECTILE_FUSE (8*TICRATE) From f6488697f43612e072015219965d2bb24b37ed07 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 29 Jul 2025 17:30:14 -0400 Subject: [PATCH 12/17] Don't flash ballhog "DANGER!" in reducevfx --- src/k_hud_track.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/k_hud_track.cpp b/src/k_hud_track.cpp index 57303b809..84bea3266 100644 --- a/src/k_hud_track.cpp +++ b/src/k_hud_track.cpp @@ -471,9 +471,9 @@ std::optional object_tooltip(const mobj_t* mobj) if (mobj->player == stplyr && stplyr->ballhogburst >= (BALLHOG_BURST_FUSE/3)) { - UINT32 flag = 0; - if (stplyr->ballhogburst % 2) - flag = (stplyr->ballhogburst >= (2*BALLHOG_BURST_FUSE/3)) ? V_REDMAP : V_YELLOWMAP; + UINT32 flag = (stplyr->ballhogburst >= (2*BALLHOG_BURST_FUSE/3)) ? V_REDMAP : V_YELLOWMAP; + if (stplyr->ballhogburst % 2 && !cv_reducevfx.value) + flag = 0; return Tooltip( TextElement( From cc79808aba39bb56a5c05cf850d48deecfbd2055 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Thu, 31 Jul 2025 18:37:38 -0400 Subject: [PATCH 13/17] New MFE_DONTSLOPELAUNCH flag Makes mobj immune to slope launching Also 32 bit eflags woo --- src/lua_mobjlib.c | 2 +- src/p_mobj.c | 3 +++ src/p_mobj.h | 4 +++- src/p_saveg.cpp | 4 ++-- src/p_slopes.c | 8 ++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index 158909815..fc0d1b3d9 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -709,7 +709,7 @@ static int mobj_set(lua_State *L) mo->flags2 = (UINT32)luaL_checkinteger(L, 3); break; case mobj_eflags: - mo->eflags = (UINT16)luaL_checkinteger(L, 3); + mo->eflags = (UINT32)luaL_checkinteger(L, 3); break; case mobj_renderflags: mo->renderflags = (UINT32)luaL_checkinteger(L, 3); diff --git a/src/p_mobj.c b/src/p_mobj.c index 179a5e550..12a439230 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4138,6 +4138,8 @@ static void P_PlayerMobjThinker(mobj_t *mobj) mobj->eflags &= ~MFE_JUSTHITFLOOR; } + mobj->eflags &= ~MFE_DONTSLOPELAUNCH; + P_SquishThink(mobj); K_UpdateTerrainOverlay(mobj); @@ -10909,6 +10911,7 @@ void P_MobjThinker(mobj_t *mobj) P_ButteredSlope(mobj); } + mobj->eflags &= ~MFE_DONTSLOPELAUNCH; P_SquishThink(mobj); K_UpdateTerrainOverlay(mobj); diff --git a/src/p_mobj.h b/src/p_mobj.h index 34a52d3fd..a79c3ef7d 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -262,6 +262,8 @@ typedef enum MFE_SLOPELAUNCHED = 1<<14, // Thinker is paused due to hitlag MFE_PAUSED = 1<<15, + // Don't launch off of slopes + MFE_DONTSLOPELAUNCH = 1<<16, } mobjeflag_t; // @@ -339,7 +341,7 @@ struct mobj_t state_t *state; UINT32 flags; // flags from mobjinfo tables UINT32 flags2; // MF2_ flags - UINT16 eflags; // extra flags + UINT32 eflags; // extra flags mtag_t tid; mobj_t *tid_next; diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 688556420..25f6d3bae 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -3469,7 +3469,7 @@ static void SaveMobjThinker(savebuffer_t *save, const thinker_t *th, const UINT8 WRITEUINT16(save->p, mobj->anim_duration); } if (diff & MD_EFLAGS) - WRITEUINT16(save->p, mobj->eflags); + WRITEUINT32(save->p, mobj->eflags); if (diff & MD_PLAYER) WRITEUINT8(save->p, mobj->player-players); if (diff & MD_MOVEDIR) @@ -4744,7 +4744,7 @@ static thinker_t* LoadMobjThinker(savebuffer_t *save, actionf_p1 thinker) mobj->anim_duration = (UINT16)mobj->state->var2; } if (diff & MD_EFLAGS) - mobj->eflags = READUINT16(save->p); + mobj->eflags = READUINT32(save->p); if (diff & MD_PLAYER) { i = READUINT8(save->p); diff --git a/src/p_slopes.c b/src/p_slopes.c index a64ebfaa0..c1a767a63 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -989,6 +989,14 @@ boolean P_CanApplySlopeLaunch(mobj_t *mo, pslope_t *slope) return false; } + if (mo->eflags & MFE_DONTSLOPELAUNCH) + { + CONS_Printf("MFE_DONTSLOPELAUNCH\n"); + mo->eflags &= ~MFE_DONTSLOPELAUNCH; // You get one cancelled launch + // Don't launch off of slopes. + return false; + } + // We can do slope launching. return true; } From 1ddfd7c1ee018c13b908a9a0f32c9f2a67171b53 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Thu, 31 Jul 2025 18:46:38 -0400 Subject: [PATCH 14/17] Also fix reverse gravity while I'm here --- src/k_kart.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index a87ad66c5..9c86fbab6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -14777,12 +14777,15 @@ void K_MoveKartPlayer(player_t *player, boolean onground) P_Thrust(player->mo, player->mo->angle, (40 + 10 * player->itemamount) * player->mo->scale); player->pflags2 |= PF2_FASTTUMBLEBOUNCE; - /* if (onground) - player->mo->momz += 10*player->mo->scale; + { + P_SetObjectMomZ(player->mo, 10*FRACUNIT, true); + player->mo->eflags |= MFE_DONTSLOPELAUNCH; + } else - player->mo->momz -= 50*player->mo->scale; - */ + { + P_SetObjectMomZ(player->mo, -50*FRACUNIT, true); + } player->itemamount = 0; player->botvars.itemconfirm = 0; From 9784fd6d97995edb6f3d9e67ccec0f795c750de7 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Thu, 31 Jul 2025 18:49:10 -0400 Subject: [PATCH 15/17] Comment out the float for now, not my design --- src/k_kart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/k_kart.c b/src/k_kart.c index 9c86fbab6..f1450536c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -14777,6 +14777,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) P_Thrust(player->mo, player->mo->angle, (40 + 10 * player->itemamount) * player->mo->scale); player->pflags2 |= PF2_FASTTUMBLEBOUNCE; + /* if (onground) { P_SetObjectMomZ(player->mo, 10*FRACUNIT, true); @@ -14786,6 +14787,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { P_SetObjectMomZ(player->mo, -50*FRACUNIT, true); } + */ player->itemamount = 0; player->botvars.itemconfirm = 0; From 98f385049d4f7e1c103d9a3b14b61d8ced942434 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Thu, 31 Jul 2025 21:02:58 -0400 Subject: [PATCH 16/17] Ballhog bugfixes --- src/k_collide.cpp | 3 +++ src/k_kart.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/k_collide.cpp b/src/k_collide.cpp index fe3d0981b..62af4d285 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -75,6 +75,9 @@ boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2) if (t1->type == MT_BALLHOGBOOM && t2->type == MT_BALLHOGBOOM) return true; // Ballhogs don't collide with eachother + if (t1->type == MT_BALLHOGBOOM && t2->type == MT_PLAYER && t1->target == t2 ) + return true; // Allied hog explosion, not snatchable but shouldn't damage + if (K_TryPickMeUp(t1, t2, false)) return true; diff --git a/src/k_kart.c b/src/k_kart.c index f1450536c..79db29b42 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -14813,6 +14813,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } player->ballhogcharge = 0; + player->ballhogburst = 0; + S_StopSoundByID(player->mo, sfx_gshda); player->itemflags &= ~IF_HOLDREADY; player->botvars.itemconfirm = 0; } From 47b04a60447b790bffc61e2079a26dbdaece77f4 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Thu, 31 Jul 2025 22:26:21 -0400 Subject: [PATCH 17/17] Fix ballhog boom lingering --- src/k_collide.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/k_collide.cpp b/src/k_collide.cpp index fe3d0981b..9f0189ffc 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -87,7 +87,10 @@ boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2) if (t1->type == MT_BANANA && t1->health > 1) S_StartSound(t2, sfx_bsnipe); - damageitem = true; + if (t1->type != MT_BALLHOGBOOM) // ballhog booms linger and expire after their anim is done + { + damageitem = true; + } if (t2->player->flamedash && t2->player->itemtype == KITEM_FLAMESHIELD) {