From 1bce9d281df8d5c590da5de2f192a0e1e9bc07de Mon Sep 17 00:00:00 2001 From: James Date: Mon, 18 Feb 2019 00:17:58 -0500 Subject: [PATCH 01/16] Shrink timer is consistent 20sec --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index b006ae3b..797fbe24 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3294,7 +3294,7 @@ static void K_DoShrink(player_t *user) players[i].mo->destscale = (6*mapobjectscale)/8; if (cv_kartdebugshrink.value && !modeattacking && !players[i].bot) players[i].mo->destscale = (6*players[i].mo->destscale)/8; - players[i].kartstuff[k_growshrinktimer] = -(200+(40*(MAXPLAYERS-players[i].kartstuff[k_position]))); + players[i].kartstuff[k_growshrinktimer] = -(20*TICRATE); } // Grow should get taken away. From 4c3871cb6d165b7c47a455bc4c04d6e65fcd061a Mon Sep 17 00:00:00 2001 From: James Date: Mon, 18 Feb 2019 00:23:40 -0500 Subject: [PATCH 02/16] Some items have 30 sec cooldown on match start --- src/k_kart.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 797fbe24..48f1c93a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -699,17 +699,19 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) if (mashed > 0) \ odds = FixedDiv(odds<> FRACBITS \ +#define COOLDOWNONSTART (leveltime < (31*TICRATE)+starttime) + switch (item) { case KITEM_INVINCIBILITY: case KITEM_GROW: - if (pinvin >= max(1, (pingame+2) / 4)) + if (pinvin >= max(1, (pingame+2) / 4) || COOLDOWNONSTART) newodds = 0; else - /* FALLTHRU */ + POWERITEMODDS(newodds); + break; case KITEM_ROCKETSNEAKER: case KITEM_JAWZ: - case KITEM_MINE: case KITEM_BALLHOG: case KITEM_THUNDERSHIELD: case KRITEM_TRIPLESNEAKER: @@ -720,17 +722,27 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) case KRITEM_DUALJAWZ: POWERITEMODDS(newodds); break; + case KITEM_MINE: + if (COOLDOWNONSTART) + newodds = 0; + else + POWERITEMODDS(newodds); + break; case KITEM_SPB: - //POWERITEMODDS(newodds); if (((indirectitemcooldown > 0) || (pexiting > 0) || (secondist/distvar < 3)) && (pos != 9)) // Force SPB newodds = 0; else - newodds *= min((secondist/distvar)-4, 3); + newodds *= min((secondist/distvar)-4, 3); // POWERITEMODDS(newodds); break; case KITEM_SHRINK: - POWERITEMODDS(newodds); - if ((indirectitemcooldown > 0) || (pingame-1 <= pexiting)) + if ((indirectitemcooldown > 0) || (pingame-1 <= pexiting) || COOLDOWNONSTART) + newodds = 0; + else + POWERITEMODDS(newodds); + break; + case KITEM_HYUDORO: + if (COOLDOWNONSTART) newodds = 0; break; default: From 2f4d3eb087db628958aa95326192ed04ff0cb8d5 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Feb 2019 18:38:54 -0500 Subject: [PATCH 03/16] Mines can be punted Setting behind leaves a longer startup animation window so that it can be punted more easily --- src/k_kart.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++---- src/k_kart.h | 1 + src/p_map.c | 14 +++++++++-- src/p_mobj.c | 23 ++++++++++++++----- 4 files changed, 91 insertions(+), 12 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 48f1c93a..855e0903 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2895,7 +2895,8 @@ static mobj_t *K_FindLastTrailMobj(player_t *player) static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t mapthing, INT32 defaultDir, INT32 altthrow) { mobj_t *mo; - INT32 dir, PROJSPEED; + INT32 dir; + fixed_t PROJSPEED; angle_t newangle; fixed_t newx, newy, newz; mobj_t *throwmo; @@ -3012,10 +3013,10 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map if (mo) { angle_t fa = player->mo->angle>>ANGLETOFINESHIFT; - INT32 HEIGHT = (20 + (dir*10))*mapobjectscale + player->mo->momz; + fixed_t HEIGHT = (20 + (dir*10))*mapobjectscale + player->mo->momz; - mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), (altthrow == 2 ? 2*PROJSPEED/3 : PROJSPEED)); - mo->momy = player->mo->momy + FixedMul(FINESINE(fa), (altthrow == 2 ? 2*PROJSPEED/3 : PROJSPEED)); + mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED); + mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED); mo->momz = P_MobjFlip(player->mo) * HEIGHT; if (player->mo->eflags & MFE_VERTICALFLIP) @@ -3082,12 +3083,68 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map if (player->mo->eflags & MFE_VERTICALFLIP) mo->eflags |= MFE_VERTICALFLIP; + + if (mapthing == MT_SSMINE) + mo->extravalue1 = 14; // Pads the start-up length from 21 frames to a full second } } return mo; } +void K_PuntMine(mobj_t *thismine, mobj_t *punter) +{ + angle_t fa = R_PointToAngle2(0, 0, punter->momx, punter->momy) >> ANGLETOFINESHIFT; + fixed_t z = 30*mapobjectscale + punter->momz; + fixed_t spd; + mobj_t *mine; + + if (!thismine || P_MobjWasRemoved(thismine)) + return; + + if (thismine->type == MT_SSMINE_SHIELD) // Create a new mine + { + mine = P_SpawnMobj(thismine->x, thismine->y, thismine->z, MT_SSMINE); + P_SetTarget(&mine->target, thismine->target); + mine->angle = thismine->angle; + mine->flags2 = thismine->flags2; + mine->floorz = thismine->floorz; + mine->ceilingz = thismine->ceilingz; + P_RemoveMobj(thismine); + } + else + mine = thismine; + + if (!mine || P_MobjWasRemoved(mine)) + return; + + switch (gamespeed) + { + case 0: + spd = 68*mapobjectscale; // Avg Speed is 34 + break; + case 2: + spd = 96*mapobjectscale; // Avg Speed is 48 + break; + default: + spd = 82*mapobjectscale; // Avg Speed is 41 + break; + } + + mine->flags |= MF_NOCLIPTHING; + + P_SetMobjState(mine, S_SSMINE_AIR1); + mine->threshold = 10; + mine->extravalue1 = 0; + mine->reactiontime = mine->info->reactiontime; + + mine->momx = punter->momx + FixedMul(FINECOSINE(fa), spd); + mine->momy = punter->momy + FixedMul(FINESINE(fa), spd); + mine->momz = P_MobjFlip(mine) * z; + + mine->flags &= ~MF_NOCLIPTHING; +} + #define THUNDERRADIUS 320 static void K_DoThunderShield(player_t *player) diff --git a/src/k_kart.h b/src/k_kart.h index dc37956a..a09093f2 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -41,6 +41,7 @@ void K_SpawnBoostTrail(player_t *player); void K_SpawnSparkleTrail(mobj_t *mo); void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent); void K_DriftDustHandling(mobj_t *spawner); +void K_PuntMine(mobj_t *mine, mobj_t *punter); void K_DoSneaker(player_t *player, INT32 type); void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound); void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source); diff --git a/src/p_map.c b/src/p_map.c index 41e5a455..ed71a546 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -980,7 +980,12 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->type == MT_PLAYER) { - P_KillMobj(tmthing, thing, thing); + // Bomb punting + if ((tmthing->state >= &states[S_SSMINE1] && tmthing->state <= &states[S_SSMINE4]) + || (tmthing->state >= &states[S_SSMINE_DEPLOY8] && tmthing->state <= &states[S_SSMINE_DEPLOY13])) + P_KillMobj(tmthing, thing, thing); + else + K_PuntMine(tmthing, thing); } else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD || thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD) @@ -1079,7 +1084,12 @@ static boolean PIT_CheckThing(mobj_t *thing) if (tmthing->health <= 0 || thing->health <= 0) return true; - P_KillMobj(thing, tmthing, tmthing); + // Bomb punting + if ((thing->state >= &states[S_SSMINE1] && thing->state <= &states[S_SSMINE4]) + || (thing->state >= &states[S_SSMINE_DEPLOY8] && thing->state <= &states[S_SSMINE_DEPLOY13])) + P_KillMobj(thing, tmthing, tmthing); + else + K_PuntMine(thing, tmthing); } else if (thing->type == MT_MINEEXPLOSION && tmthing->player) { diff --git a/src/p_mobj.c b/src/p_mobj.c index 746fc1af..8a290fdf 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8190,28 +8190,39 @@ void P_MobjThinker(mobj_t *mobj) mobj->color = mobj->target->player->skincolor; else mobj->color = SKINCOLOR_KETCHUP; + if (mobj->momx || mobj->momy) P_SpawnGhostMobj(mobj); + if (P_IsObjectOnGround(mobj)) { - if (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2]) - P_SetMobjState(mobj, S_SSMINE_DEPLOY1); - if (mobj->reactiontime >= mobj->info->reactiontime) + if (mobj->extravalue1 > 0) + mobj->extravalue1--; + else { - mobj->momx = mobj->momy = 0; - S_StartSound(mobj, mobj->info->activesound); - mobj->reactiontime--; + if (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2]) + P_SetMobjState(mobj, S_SSMINE_DEPLOY1); + + if (mobj->reactiontime >= mobj->info->reactiontime) + { + mobj->momx = mobj->momy = 0; + S_StartSound(mobj, mobj->info->activesound); + mobj->reactiontime--; + } } } + if (mobj->reactiontime && mobj->reactiontime < mobj->info->reactiontime) { mobj->reactiontime--; if (!mobj->reactiontime) P_KillMobj(mobj, NULL, NULL); } + if ((mobj->state >= &states[S_SSMINE1] && mobj->state <= &states[S_SSMINE4]) || (mobj->state >= &states[S_SSMINE_DEPLOY8] && mobj->state <= &states[S_SSMINE_DEPLOY13])) A_GrenadeRing(mobj); + if (mobj->threshold > 0) mobj->threshold--; break; From f822eb94cfdf474ee4c568af15dcf6f5cdd4b854 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Feb 2019 20:19:01 -0500 Subject: [PATCH 04/16] Reduce explosion radius, lives forever, longer startup --- src/info.c | 6 +++--- src/k_kart.c | 2 +- src/p_mobj.c | 20 +++----------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/info.c b/src/info.c index 5701f1c9..270e21fd 100644 --- a/src/info.c +++ b/src/info.c @@ -15574,10 +15574,10 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 1, // spawnhealth S_NULL, // seestate sfx_tossed, // seesound - 6*TICRATE, // reactiontime + 0, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 192*FRACUNIT, // painchance + 128*FRACUNIT, // painchance sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate @@ -15604,7 +15604,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 192*FRACUNIT, // painchance + 128*FRACUNIT, // painchance sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate diff --git a/src/k_kart.c b/src/k_kart.c index 855e0903..b94341bb 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3085,7 +3085,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map mo->eflags |= MFE_VERTICALFLIP; if (mapthing == MT_SSMINE) - mo->extravalue1 = 14; // Pads the start-up length from 21 frames to a full second + mo->extravalue1 = 49; // Pads the start-up length from 21 frames to a full 2 seconds } } diff --git a/src/p_mobj.c b/src/p_mobj.c index 8a290fdf..6898053d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8194,31 +8194,17 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->momx || mobj->momy) P_SpawnGhostMobj(mobj); - if (P_IsObjectOnGround(mobj)) + if (P_IsObjectOnGround(mobj) && (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2])) { if (mobj->extravalue1 > 0) mobj->extravalue1--; else { - if (mobj->state == &states[S_SSMINE_AIR1] || mobj->state == &states[S_SSMINE_AIR2]) - P_SetMobjState(mobj, S_SSMINE_DEPLOY1); - - if (mobj->reactiontime >= mobj->info->reactiontime) - { - mobj->momx = mobj->momy = 0; - S_StartSound(mobj, mobj->info->activesound); - mobj->reactiontime--; - } + mobj->momx = mobj->momy = 0; + S_StartSound(mobj, mobj->info->activesound); } } - if (mobj->reactiontime && mobj->reactiontime < mobj->info->reactiontime) - { - mobj->reactiontime--; - if (!mobj->reactiontime) - P_KillMobj(mobj, NULL, NULL); - } - if ((mobj->state >= &states[S_SSMINE1] && mobj->state <= &states[S_SSMINE4]) || (mobj->state >= &states[S_SSMINE_DEPLOY8] && mobj->state <= &states[S_SSMINE_DEPLOY13])) A_GrenadeRing(mobj); From ff57b4bc22ab4567a26f0ea47d402b5f5b1663af Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Feb 2019 20:29:53 -0500 Subject: [PATCH 05/16] Missed a line --- src/p_mobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 6898053d..a84fc1dd 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8202,6 +8202,7 @@ void P_MobjThinker(mobj_t *mobj) { mobj->momx = mobj->momy = 0; S_StartSound(mobj, mobj->info->activesound); + P_SetMobjState(mobj, S_SSMINE_DEPLOY1); } } From 09c3fd432939fbf4b94c54208d16b56c7f79b6d0 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Feb 2019 23:15:31 -0500 Subject: [PATCH 06/16] Hyu b gone --- src/dehacked.c | 3 +++ src/doomstat.h | 1 + src/g_game.c | 1 + src/k_kart.c | 11 ++++++----- src/p_saveg.c | 2 ++ src/p_setup.c | 1 + src/p_tick.c | 2 ++ 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 11aed24d..d0c5b8dc 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -9852,6 +9852,9 @@ static inline int lib_getenum(lua_State *L) } else if (fastcmp(word,"indirectitemcooldown")) { lua_pushinteger(L, indirectitemcooldown); return 1; + } else if (fastcmp(word,"hyubgone")) { + lua_pushinteger(L, hyubgone); + return 1; } else if (fastcmp(word,"thwompsactive")) { lua_pushboolean(L, thwompsactive); return 1; diff --git a/src/doomstat.h b/src/doomstat.h index 9ae2726d..0f057273 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -468,6 +468,7 @@ extern boolean comeback; extern SINT8 battlewanted[4]; extern tic_t wantedcalcdelay; extern tic_t indirectitemcooldown; +extern tic_t hyubgone; extern tic_t mapreset; extern UINT8 nospectategrief; extern boolean thwompsactive; diff --git a/src/g_game.c b/src/g_game.c index f0d221ff..9edb1d84 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -267,6 +267,7 @@ SINT8 pickedvote; // What vote the host rolls SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points tic_t wantedcalcdelay; // Time before it recalculates WANTED tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded +tic_t hyubgone; // Cooldown before hyudoro is allowed to be rerolled tic_t mapreset; // Map reset delay when enough players have joined an empty game UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing boolean thwompsactive; // Thwomps activate on lap 2 diff --git a/src/k_kart.c b/src/k_kart.c index b94341bb..4da1f6e0 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -556,6 +556,11 @@ static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][6] = */ static void K_KartGetItemResult(player_t *player, SINT8 getitem) { + if (getitem == KITEM_SPB || getitem == KITEM_SHRINK) // Indirect items + indirectitemcooldown = 20*TICRATE; + if (getitem == KITEM_HYUDORO) // Hyudoro cooldown + hyubgone = 5*TICRATE; + switch (getitem) { // Special roulettes first, then the generic ones are handled by default @@ -583,10 +588,6 @@ static void K_KartGetItemResult(player_t *player, SINT8 getitem) player->kartstuff[k_itemtype] = KITEM_JAWZ; player->kartstuff[k_itemamount] = 2; break; - case KITEM_SPB: - case KITEM_SHRINK: // Indirect items - indirectitemcooldown = 20*TICRATE; - /* FALLTHRU */ default: if (getitem <= 0 || getitem >= NUMKARTRESULTS) // Sad (Fallback) { @@ -742,7 +743,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) POWERITEMODDS(newodds); break; case KITEM_HYUDORO: - if (COOLDOWNONSTART) + if ((hyubgone > 0) || COOLDOWNONSTART) newodds = 0; break; default: diff --git a/src/p_saveg.c b/src/p_saveg.c index 975a4a5d..f00e3f9b 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3313,6 +3313,7 @@ static void P_NetArchiveMisc(void) WRITEUINT32(save_p, wantedcalcdelay); WRITEUINT32(save_p, indirectitemcooldown); + WRITEUINT32(save_p, hyubgone); WRITEUINT32(save_p, mapreset); WRITEUINT8(save_p, nospectategrief); WRITEUINT8(save_p, thwompsactive); @@ -3421,6 +3422,7 @@ static inline boolean P_NetUnArchiveMisc(void) wantedcalcdelay = READUINT32(save_p); indirectitemcooldown = READUINT32(save_p); + hyubgone = READUINT32(save_p); mapreset = READUINT32(save_p); nospectategrief = READUINT8(save_p); thwompsactive = (boolean)READUINT8(save_p); diff --git a/src/p_setup.c b/src/p_setup.c index 58e13c2e..fab433fe 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3244,6 +3244,7 @@ boolean P_SetupLevel(boolean skipprecip) wantedcalcdelay = wantedfrequency*2; indirectitemcooldown = 0; + hyubgone = 0; mapreset = 0; nospectategrief = 0; thwompsactive = false; diff --git a/src/p_tick.c b/src/p_tick.c index b46b248b..85eaea9b 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -680,6 +680,8 @@ void P_Ticker(boolean run) if (indirectitemcooldown) indirectitemcooldown--; + if (hyubgone) + hyubgone--; if (G_BattleGametype()) { From a6dd439e998d643a113b94539e388150f71cfd7a Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Thu, 21 Feb 2019 17:04:58 -0500 Subject: [PATCH 07/16] Grow cancel Needs item table changes to make it less OP --- src/d_player.h | 1 + src/dehacked.c | 3 ++- src/k_kart.c | 28 ++++++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index b430f20a..31f6d843 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -354,6 +354,7 @@ typedef enum k_getsparks, // Disable drift sparks at low speed, JUST enough to give acceleration the actual headstart above speed k_jawztargetdelay, // Delay for Jawz target switching, to make it less twitchy k_spectatewait, // How long have you been waiting as a spectator + k_growcancel, // Hold the item button down to cancel Grow NUMKARTSTUFF } kartstufftype_t; diff --git a/src/dehacked.c b/src/dehacked.c index d0c5b8dc..49b77bd2 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8335,7 +8335,8 @@ static const char *const KARTSTUFF_LIST[] = { "ITEMBLINKMODE", "GETSPARKS", "JAWZTARGETDELAY", - "SPECTATEWAIT" + "SPECTATEWAIT", + "GROWCANCEL" }; static const char *const HUDITEMS_LIST[] = { diff --git a/src/k_kart.c b/src/k_kart.c index 4da1f6e0..cad54335 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1991,6 +1991,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, mobj_t *inflicto static void K_RemoveGrowShrink(player_t *player) { player->kartstuff[k_growshrinktimer] = 0; + player->kartstuff[k_growcancel] = 0; if (player->kartstuff[k_invincibilitytimer] == 0) player->mo->color = player->skincolor; player->mo->scalespeed = mapobjectscale/TICRATE; @@ -5093,6 +5094,18 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (player->kartstuff[k_rocketsneakertimer] < 1) player->kartstuff[k_rocketsneakertimer] = 1; } + // Grow Canceling + else if (player->kartstuff[k_growshrinktimer] > 0) + { + if (cmd->buttons & BT_ATTACK) + { + player->kartstuff[k_growcancel]++; + if (player->kartstuff[k_growcancel] > 26) + K_RemoveGrowShrink(player); + } + else + player->kartstuff[k_growcancel] = 0; + } else if (player->kartstuff[k_itemamount] <= 0) { player->kartstuff[k_itemamount] = player->kartstuff[k_itemheld] = 0; @@ -5449,6 +5462,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (player->kartstuff[k_itemtype] != KITEM_THUNDERSHIELD) player->kartstuff[k_curshield] = 0; + if (player->kartstuff[k_growshrinktimer] <= 0) + player->kartstuff[k_growcancel] = 0; + if (player->kartstuff[k_itemtype] == KITEM_SPB || player->kartstuff[k_itemtype] == KITEM_SHRINK || player->kartstuff[k_growshrinktimer] < 0) @@ -6510,6 +6526,8 @@ static void K_drawKartItem(void) //INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTOLEFT); const INT32 numberdisplaymin = ((!offset && stplyr->kartstuff[k_itemtype] == KITEM_ORBINAUT) ? 5 : 2); INT32 itembar = 0; + INT32 maxl = 0; // itembar's normal highest value + const INT32 barlength = (splitscreen > 1 ? 12 : 26); UINT8 localcolor = SKINCOLOR_NONE; SINT8 colormode = TC_RAINBOW; UINT8 *colmap = NULL; @@ -6618,6 +6636,8 @@ static void K_drawKartItem(void) else if (stplyr->kartstuff[k_rocketsneakertimer] > 1) { itembar = stplyr->kartstuff[k_rocketsneakertimer]; + maxl = (itemtime*3) - barlength; + if (leveltime & 1) localpatch = kp_rocketsneaker[offset]; else @@ -6625,6 +6645,12 @@ static void K_drawKartItem(void) } else if (stplyr->kartstuff[k_growshrinktimer] > 0) { + if (stplyr->kartstuff[k_growcancel]) + { + itembar = stplyr->kartstuff[k_growcancel]; + maxl = 26; + } + if (leveltime & 1) localpatch = kp_grow[offset]; else @@ -6776,8 +6802,6 @@ static void K_drawKartItem(void) // Extensible meter, currently only used for rocket sneaker... if (itembar && hudtrans) { - const INT32 barlength = (splitscreen > 1 ? 12 : 26); - const INT32 maxl = (itemtime*3) - barlength; // timer's normal highest value const INT32 fill = ((itembar*barlength)/maxl); const INT32 length = min(barlength, fill); const INT32 height = (offset ? 1 : 2); From 6b6fba841c2b4640fd7be34d11ef7d4171a80805 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Fri, 22 Feb 2019 18:43:10 -0500 Subject: [PATCH 08/16] Banana snipe sfx --- src/p_map.c | 8 ++++++++ src/sounds.c | 1 + src/sounds.h | 1 + 3 files changed, 10 insertions(+) diff --git a/src/p_map.c b/src/p_map.c index ed71a546..9cca972a 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -912,6 +912,10 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->type == MT_PLAYER) { + // Banana snipe! + if (tmthing->type == MT_BANANA && tmthing->health > 1) + S_StartSound(thing, sfx_bsnipe); + // Player Damage K_SpinPlayer(thing->player, tmthing->target, 0, tmthing, (tmthing->type == MT_BANANA || tmthing->type == MT_BANANA_SHIELD)); @@ -1061,6 +1065,10 @@ static boolean PIT_CheckThing(mobj_t *thing) if (tmthing->health <= 0 || thing->health <= 0) return true; + // Banana snipe! + if (thing->type == MT_BANANA && thing->health > 1) + S_StartSound(tmthing, sfx_bsnipe); + // Player Damage K_SpinPlayer(tmthing->player, thing->target, 0, tmthing, (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD)); diff --git a/src/sounds.c b/src/sounds.c index a3bc8bf4..61fddb76 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -815,6 +815,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"chain", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Mementos Reaper {"mkuma", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Trigger Happy Havoc Monokuma {"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Arid Sands Toad scream + {"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Banana sniping {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree: {"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Debug notification diff --git a/src/sounds.h b/src/sounds.h index 4c341d49..bb46ea9d 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -890,6 +890,7 @@ typedef enum sfx_chain, sfx_mkuma, sfx_toada, + sfx_bsnipe, sfx_itfree, sfx_dbgsal, From ae14d967ea1ce5a1e31a7525bcde222e6a05c5d4 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 17:50:43 -0500 Subject: [PATCH 09/16] Misc changes - Start cooldown deactivates exactly 30 sec, instead of after 30 seconds. Barely affects gameplay but it looks slightly less of a magic number looking at the code. - Prevent multiple Thunder Shields being out via normal means. - Slightly loosened up the invincibility item limits -- gives more invincibility items sooner for odd player counts but doesn't affect the numbers for the game's balancing points (4P, 8P) - Update comments --- src/k_kart.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 10e12da8..b7bf8653 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -681,6 +681,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) INT32 newodds; INT32 i; UINT8 pingame = 0, pexiting = 0, pinvin = 0; + boolean thunderisout = false; SINT8 first = -1, second = -1; INT32 secondist = 0; boolean itemenabled[NUMKARTRESULTS-1] = { @@ -725,10 +726,13 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) { if (!playeringame[i] || players[i].spectator) continue; + if (!G_BattleGametype() || players[i].kartstuff[k_bumper]) pingame++; + if (players[i].exiting) pexiting++; + if (players[i].mo) { if (players[i].kartstuff[k_itemtype] == KITEM_INVINCIBILITY @@ -736,6 +740,10 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) || players[i].kartstuff[k_invincibilitytimer] || players[i].kartstuff[k_growshrinktimer] > 0) pinvin++; + + if (players[i].kartstuff[k_itemtype] == KITEM_THUNDERSHIELD) + thunderisout = true; + if (!G_BattleGametype()) { if (players[i].kartstuff[k_position] == 1 && first == -1) @@ -759,9 +767,9 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) // POWERITEMODDS handles all of the "frantic item" related functionality, for all of our powerful items. // First, it multiplies it by 2 if franticitems is true; easy-peasy. // Next, it multiplies it again if it's in SPB mode and 2nd needs to apply pressure to 1st. - // Then, it multiplies it further if there's less than 5 players in game. - // This is done to make low player count races more fair & interesting. (2P normal would be about halfway between 8P normal and 8P frantic) - // Lastly, it *divides* it by your mashed value, which was determined in K_KartItemRoulette, to punish those who are impatient. + // Then, it multiplies it further if the player count isn't equal to 8. + // This is done to make low player count races more interesting and high player count rates more fair. (2P normal would be about halfway between 8P normal and 8P frantic) + // Lastly, it *divides* it by your mashed value, which was determined in K_KartItemRoulette, for lesser items needed in a pinch. #define POWERITEMODDS(odds) \ if (franticitems) \ odds <<= 1; \ @@ -769,13 +777,13 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) if (mashed > 0) \ odds = FixedDiv(odds<> FRACBITS \ -#define COOLDOWNONSTART (leveltime < (31*TICRATE)+starttime) +#define COOLDOWNONSTART (leveltime < (30*TICRATE)+starttime) switch (item) { case KITEM_INVINCIBILITY: case KITEM_GROW: - if (pinvin >= max(1, (pingame+2) / 4) || COOLDOWNONSTART) + if (pinvin >= max(1, (pingame+3) / 4) || COOLDOWNONSTART) newodds = 0; else POWERITEMODDS(newodds); @@ -783,7 +791,6 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) case KITEM_ROCKETSNEAKER: case KITEM_JAWZ: case KITEM_BALLHOG: - case KITEM_THUNDERSHIELD: case KRITEM_TRIPLESNEAKER: case KRITEM_TRIPLEBANANA: case KRITEM_TENFOLDBANANA: @@ -811,6 +818,11 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) else POWERITEMODDS(newodds); break; + case KITEM_THUNDERSHIELD: + if (thunderisout) + newodds = 0; + else + POWERITEMODDS(newodds); case KITEM_HYUDORO: if ((hyubgone > 0) || COOLDOWNONSTART) newodds = 0; From 5760e106e5a6859d082779cb5a157e24ae750bd0 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 19:45:20 -0500 Subject: [PATCH 10/16] SPB updates - SPB Rush odds are not affected by player count. - Thunder Shield cannot be rolled with SPB out. - Reticule is displayed on minimap while SPB is out. --- src/k_kart.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index b7bf8653..4c59f1e0 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -675,7 +675,7 @@ static void K_KartGetItemResult(player_t *player, SINT8 getitem) \return void */ -static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) +static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean spbrush) { const INT32 distvar = (64*14); INT32 newodds; @@ -768,12 +768,17 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) // First, it multiplies it by 2 if franticitems is true; easy-peasy. // Next, it multiplies it again if it's in SPB mode and 2nd needs to apply pressure to 1st. // Then, it multiplies it further if the player count isn't equal to 8. - // This is done to make low player count races more interesting and high player count rates more fair. (2P normal would be about halfway between 8P normal and 8P frantic) + // This is done to make low player count races more interesting and high player count rates more fair. + // (2P normal would be about halfway between 8P normal and 8P frantic.) + // (This scaling is not done for SPB Rush, so that catchup strength is not weakened.) // Lastly, it *divides* it by your mashed value, which was determined in K_KartItemRoulette, for lesser items needed in a pinch. + +#define PLAYERSCALING (8 - (spbrush ? 2 : pingame)) + #define POWERITEMODDS(odds) \ if (franticitems) \ odds <<= 1; \ - odds = FixedMul(odds<> FRACBITS; \ + odds = FixedMul(odds<> FRACBITS; \ if (mashed > 0) \ odds = FixedDiv(odds<> FRACBITS \ @@ -860,7 +865,7 @@ static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT3 for (j = 1; j < NUMKARTRESULTS; j++) { - if (K_KartGetItemOdds(i, j, mashed) > 0) + if (K_KartGetItemOdds(i, j, mashed, spbrush) > 0) { available = true; break; @@ -966,6 +971,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) INT32 bestbumper = 0; fixed_t mashed = 0; boolean dontforcespb = false; + boolean spbrush = false; // This makes the roulette cycle through items - if this is 0, you shouldn't be here. if (player->kartstuff[k_itemroulette]) @@ -1058,15 +1064,18 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) return; } + if (G_RaceGametype()) + spbrush = (spbplace != -1 && player->kartstuff[k_position] == spbplace+1); + // Initializes existing spawnchance values for (i = 0; i < NUMKARTRESULTS; i++) spawnchance[i] = 0; // Split into another function for a debug function below - useodds = K_FindUseodds(player, mashed, pingame, bestbumper, (spbplace != -1 && player->kartstuff[k_position] == spbplace+1), dontforcespb); + useodds = K_FindUseodds(player, mashed, pingame, bestbumper, spbrush, dontforcespb); for (i = 1; i < NUMKARTRESULTS; i++) - spawnchance[i] = (totalspawnchance += K_KartGetItemOdds(useodds, i, mashed)); + spawnchance[i] = (totalspawnchance += K_KartGetItemOdds(useodds, i, mashed, spbrush)); // Award the player whatever power is rolled if (totalspawnchance > 0) @@ -7859,8 +7868,12 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags, pat else colormap = R_GetTranslationColormap(skin, mo->color, GTC_CACHE); V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, facemmapprefix[skin], colormap); - if (mo->player && K_IsPlayerWanted(mo->player)) + if (mo->player + && ((G_RaceGametype() && mo->player->kartstuff[k_position] == spbplace) + || (G_BattleGametype() && K_IsPlayerWanted(mo->player)))) + { V_DrawFixedPatch(amxpos - (4<kartstuff[k_position] == spbplace+1), dontforcespb); + if (G_RaceGametype()) + spbrush = (spbplace != -1 && stplyr->kartstuff[k_position] == spbplace+1); + + useodds = K_FindUseodds(stplyr, 0, pingame, bestbumper, spbrush, dontforcespb); for (i = 1; i < NUMKARTRESULTS; i++) { - const INT32 itemodds = K_KartGetItemOdds(useodds, i, 0); + const INT32 itemodds = K_KartGetItemOdds(useodds, i, 0, spbrush); if (itemodds <= 0) continue; From 36a7e88e6382aeb2878364eb4bb2cab46a7b2664 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 20:49:11 -0500 Subject: [PATCH 11/16] Mine updates - Increase gravity of super-forward throws - Revert explosion radius change - Nerf generic explosion stun (SPB explosion stun is identical) --- src/info.c | 4 ++-- src/k_kart.c | 19 +++++++++++++++---- src/p_mobj.c | 6 ++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/info.c b/src/info.c index 270e21fd..41711fa4 100644 --- a/src/info.c +++ b/src/info.c @@ -15577,7 +15577,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 0, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 128*FRACUNIT, // painchance + 192*FRACUNIT, // painchance sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate @@ -15604,7 +15604,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 128*FRACUNIT, // painchance + 192*FRACUNIT, // painchance sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate diff --git a/src/k_kart.c b/src/k_kart.c index 4c59f1e0..b1c96773 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2217,6 +2217,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b #ifdef HAVE_BLUA boolean force = false; // Used to check if Lua ShouldExplode should get us damaged reguardless of flashtics or heck knows what. UINT8 shouldForce = LUAh_ShouldExplode(player, inflictor, source); + if (P_MobjWasRemoved(player->mo)) return; // mobj was removed (in theory that shouldn't happen) if (shouldForce == 1) @@ -2227,6 +2228,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b #else static const boolean force = false; #endif + if (G_BattleGametype()) { if (K_IsPlayerWanted(player)) @@ -2308,13 +2310,13 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b } player->kartstuff[k_spinouttype] = 1; - player->kartstuff[k_spinouttimer] = 2*TICRATE+(TICRATE/2); + player->kartstuff[k_spinouttimer] = (3*TICRATE/2)+2; player->powers[pw_flashing] = K_GetKartFlashing(player); if (inflictor && inflictor->type == MT_SPBEXPLOSION && inflictor->extravalue1) { - player->kartstuff[k_spinouttimer] = ((3*player->kartstuff[k_spinouttimer])/2)+1; + player->kartstuff[k_spinouttimer] = ((5*player->kartstuff[k_spinouttimer])/2)+1; player->mo->momz *= 2; } @@ -3048,12 +3050,19 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map { if (altthrow == 2) // Kitchen sink throwing { +#if 0 if (player->kartstuff[k_throwdir] == 1) dir = 3; else if (player->kartstuff[k_throwdir] == -1) dir = 1; else dir = 2; +#else + if (player->kartstuff[k_throwdir] == 1) + dir = 2; + else + dir = 1; +#endif } else { @@ -3129,10 +3138,12 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map angle_t fa = player->mo->angle>>ANGLETOFINESHIFT; fixed_t HEIGHT = (20 + (dir*10))*mapobjectscale + player->mo->momz; - mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED); - mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED); + mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED*dir); + mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED*dir); mo->momz = P_MobjFlip(player->mo) * HEIGHT; + mo->extravalue2 = dir; + if (mo->eflags & MFE_UNDERWATER) mo->momz = (117 * mo->momz) / 200; diff --git a/src/p_mobj.c b/src/p_mobj.c index da35f538..f1074e0f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1404,11 +1404,13 @@ fixed_t P_GetMobjGravity(mobj_t *mo) break; case MT_BANANA: case MT_EGGMANITEM: + case MT_SSMINE: + case MT_SINK: + gravityadd *= mo->extravalue2; + /* FALLTHRU */ case MT_ORBINAUT: case MT_JAWZ: case MT_JAWZ_DUD: - case MT_SSMINE: - case MT_SINK: gravityadd = (5*gravityadd)/2; break; case MT_SIGN: From 4e570739fe10b38bb940d4b4af304ec9754f2c44 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 20:56:02 -0500 Subject: [PATCH 12/16] Make smoke opaque to reduce lag --- src/dehacked.c | 7 +++++++ src/info.c | 17 ++++++++++++----- src/k_kart.c | 2 ++ src/p_mobj.c | 2 ++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 530b6906..231f0aa8 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7150,6 +7150,13 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_KARMAFIREWORK4", "S_KARMAFIREWORKTRAIL", + // Opaque smoke version, to prevent lag + "S_OPAQUESMOKE1", + "S_OPAQUESMOKE2", + "S_OPAQUESMOKE3", + "S_OPAQUESMOKE4", + "S_OPAQUESMOKE5", + #ifdef SEENAMES "S_NAMECHECK", #endif diff --git a/src/info.c b/src/info.c index 41711fa4..84cb4cd4 100644 --- a/src/info.c +++ b/src/info.c @@ -3140,11 +3140,11 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM12}, // S_FZEROBOOM11 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 0, 0, S_NULL}, // S_FZEROBOOM12 - {SPR_SMOK, FF_TRANS30, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1 - {SPR_SMOK, FF_TRANS30|1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2 - {SPR_SMOK, FF_TRANS30|2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3 - {SPR_SMOK, FF_TRANS30|3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4 - {SPR_SMOK, FF_TRANS30|4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5 + {SPR_SMOK, 0, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1 + {SPR_SMOK, 1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2 + {SPR_SMOK, 2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3 + {SPR_SMOK, 3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4 + {SPR_SMOK, 4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5 // Various plants {SPR_SBUS, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SONICBUSH @@ -3394,6 +3394,13 @@ state_t states[NUMSTATES] = {SPR_FWRK, 3|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK1}, // S_KARMAFIREWORK4 {SPR_FWRK, 4|FF_FULLBRIGHT, TICRATE, {NULL}, 0, 0, S_NULL}, // S_KARMAFIREWORKTRAIL + // Opaque smoke + {SPR_SMOK, 0, 4, {NULL}, 0, 0, S_OPAQUESMOKE2}, // S_OPAQUESMOKE1 + {SPR_SMOK, 1, 5, {NULL}, 0, 0, S_OPAQUESMOKE3}, // S_OPAQUESMOKE2 + {SPR_SMOK, 2, 6, {NULL}, 0, 0, S_OPAQUESMOKE4}, // S_OPAQUESMOKE3 + {SPR_SMOK, 3, 7, {NULL}, 0, 0, S_OPAQUESMOKE5}, // S_OPAQUESMOKE4 + {SPR_SMOK, 4, 8, {NULL}, 0, 0, S_NULL}, // S_OPAQUESMOKE5 + #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif diff --git a/src/k_kart.c b/src/k_kart.c index b1c96773..dee5df73 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2515,6 +2515,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color) for (i = 0; i < 32; i++) { dust = P_SpawnMobj(source->x, source->y, source->z, MT_SMOKE); + P_SetMobjState(dust, S_OPAQUESMOKE1); dust->angle = (ANGLE_180/16) * i; P_SetScale(dust, source->scale); dust->destscale = source->scale*10; @@ -2542,6 +2543,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color) dust = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT, source->y + P_RandomRange(-radius, radius)*FRACUNIT, source->z + P_RandomRange(0, height)*FRACUNIT, MT_SMOKE); + P_SetMobjState(dust, S_OPAQUESMOKE1); P_SetScale(dust, source->scale); dust->destscale = source->scale*10; dust->scalespeed = source->scale/12; diff --git a/src/p_mobj.c b/src/p_mobj.c index f1074e0f..6d36dcc9 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6653,6 +6653,7 @@ void P_MobjThinker(mobj_t *mobj) fixed_t y = P_RandomRange(-35, 35)*mobj->scale; fixed_t z = P_RandomRange(0, 70)*mobj->scale; mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE); + P_SetMobjState(smoke, S_OPAQUESMOKE1); smoke->scale = mobj->scale * 2; smoke->destscale = mobj->scale * 6; smoke->momz = P_RandomRange(4, 9)*FRACUNIT; @@ -6674,6 +6675,7 @@ void P_MobjThinker(mobj_t *mobj) else { mobj_t *smoke = P_SpawnMobj(mobj->x + x, mobj->y + y, mobj->z + z, MT_SMOKE); + P_SetMobjState(smoke, S_OPAQUESMOKE1); smoke->scale = mobj->scale; smoke->destscale = mobj->scale*2; } From a3e00bdb0e6640d6d98a27498d2b9f5c1731864c Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 21:25:37 -0500 Subject: [PATCH 13/16] uncommited change... :anger: --- src/info.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/info.h b/src/info.h index 157c72e1..0e23a07c 100644 --- a/src/info.h +++ b/src/info.h @@ -4052,6 +4052,12 @@ typedef enum state S_KARMAFIREWORK4, S_KARMAFIREWORKTRAIL, + S_OPAQUESMOKE1, + S_OPAQUESMOKE2, + S_OPAQUESMOKE3, + S_OPAQUESMOKE4, + S_OPAQUESMOKE5, + #ifdef SEENAMES S_NAMECHECK, #endif From 171ca1670e6e164eb669b2bcc84eda2779539db0 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 22:02:41 -0500 Subject: [PATCH 14/16] Add banana snipe sound effect to eggboxes & sinks --- src/p_inter.c | 4 ++++ src/p_map.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index dd27858f..824d714d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -411,6 +411,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) player->kartstuff[k_roulettetype] = 2; } + // Eggbox snipe! + if (special->type == MT_EGGMANITEM && special->health > 1) + S_StartSound(toucher, sfx_bsnipe); + { mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE); S_StartSound(poof, special->info->deathsound); diff --git a/src/p_map.c b/src/p_map.c index d3680c6c..843f588c 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -853,7 +853,7 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->type == MT_PLAYER) { - S_StartSound(NULL, sfx_cgot); //let all players hear it. + S_StartSound(NULL, sfx_bsnipe); //let all players hear it. HU_SetCEchoFlags(0); HU_SetCEchoDuration(5); HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[thing->player-players])); From f230e0d6447ff71b9de47825d65d6f2e44daa2db Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 22:06:47 -0500 Subject: [PATCH 15/16] Put eggbox sniping behind an #if On second thought, the old method is "sneakier" --- src/p_inter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index 824d714d..7da581a5 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -411,9 +411,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) player->kartstuff[k_roulettetype] = 2; } +#if 0 // Eggbox snipe! if (special->type == MT_EGGMANITEM && special->health > 1) S_StartSound(toucher, sfx_bsnipe); +#endif { mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE); From f5fe0736274a2adb5eea62ff34bc153d6ec4f0cd Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Wed, 6 Mar 2019 01:53:52 -0500 Subject: [PATCH 16/16] Fix floating lob items --- src/p_mobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 6d36dcc9..7f4e747c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1406,7 +1406,8 @@ fixed_t P_GetMobjGravity(mobj_t *mo) case MT_EGGMANITEM: case MT_SSMINE: case MT_SINK: - gravityadd *= mo->extravalue2; + if (mo->extravalue2 > 0) + gravityadd *= mo->extravalue2; /* FALLTHRU */ case MT_ORBINAUT: case MT_JAWZ: