From 36a7e88e6382aeb2878364eb4bb2cab46a7b2664 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Tue, 5 Mar 2019 20:49:11 -0500 Subject: [PATCH] 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: