diff --git a/src/dehacked.c b/src/dehacked.c index ed6aee55..5b160dd9 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6360,6 +6360,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_BOMBITEM", "S_BOMBAIR", "S_BOMBEXPLODE", + "S_BOMBEXPLOSION1", + "S_BOMBEXPLOSION2", // Blue Shell - Blue Lightning for now... "S_BLUELIGHTNING1", diff --git a/src/info.c b/src/info.c index ee8853ef..b3c32990 100644 --- a/src/info.c +++ b/src/info.c @@ -2687,6 +2687,8 @@ state_t states[NUMSTATES] = {SPR_BOMB, 0, 1, {A_GrenadeRing}, 0, 0, S_BOMBITEM}, // S_BOMBITEM {SPR_BOMB, 0, 1, {NULL}, 0, 0, S_BOMBAIR}, // S_BOMBAIR {SPR_BOMB, 0, 1, {A_BobombExplode}, MT_BOMBEXPLOSION, 0, S_NULL}, // S_BOMBEXPLODE + {SPR_BOM2, FF_FULLBRIGHT, 6, {NULL}, 0, 0, S_BOMBEXPLOSION2}, // S_BOMBEXPLOSION1 + {SPR_BOM2, FF_FULLBRIGHT|1, 22, {A_ForceStop}, 0, 0, S_NULL}, // S_BOMBEXPLOSION2 {SPR_BLIG, 0, 2, {NULL}, 0, 0, S_BLUELIGHTNING2}, // S_BLUELIGHTNING1 {SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2 @@ -14932,7 +14934,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 8, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 256*FRACUNIT, // painchance + 288*FRACUNIT, // painchance sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate @@ -14946,13 +14948,13 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 1, // damage sfx_bomb, // activesound - MF_BOUNCE|MF_FLOAT|MF_NOCLIPTHING|MF_MISSILE|MF_SHOOTABLE, // flags + MF_BOUNCE|MF_NOCLIPTHING|MF_MISSILE|MF_SHOOTABLE, // flags S_NULL // raisestate }, { // MT_BOMBEXPLOSION -1, // doomednum - S_BPLD1, // spawnstate + S_BOMBEXPLOSION1, // spawnstate 1000, // spawnhealth S_NULL, // seestate sfx_None, // seesound diff --git a/src/info.h b/src/info.h index e50e9bf0..f88568b8 100644 --- a/src/info.h +++ b/src/info.h @@ -3197,6 +3197,8 @@ typedef enum state S_BOMBITEM, S_BOMBAIR, S_BOMBEXPLODE, + S_BOMBEXPLOSION1, + S_BOMBEXPLOSION2, // Blue Shell - Blue Lightning for now... S_BLUELIGHTNING1, diff --git a/src/k_kart.c b/src/k_kart.c index 14c9c6c8..1f96d215 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2107,8 +2107,6 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 degrees = FINEANGLES/number; - radius = FixedDiv(radius,5*(FRACUNIT/4)); - closestangle = 0; // Create the hoop! @@ -2153,10 +2151,6 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 mobj = ghost; } - mobj->momx = FixedMul(FixedDiv(mobjx - x, dist), 2*FRACUNIT); - mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), 2*FRACUNIT); - mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), 2*FRACUNIT); - if (spawncenter) { mobj->x = x; @@ -2164,6 +2158,10 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 mobj->z = z; } + mobj->momx = FixedMul(FixedDiv(mobjx - x, dist), FixedDiv(dist, 6*FRACUNIT)); + mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), FixedDiv(dist, 6*FRACUNIT)); + mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), FixedDiv(dist, 6*FRACUNIT)); + mobj->flags |= MF_NOCLIPTHING; mobj->flags &= ~MF_SPECIAL; diff --git a/src/p_enemy.c b/src/p_enemy.c index 59a4a076..6d97d596 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3922,11 +3922,11 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing) if (thing->type != MT_PLAYER) // Don't explode for anything but an actual player. return true; - if (thing == grenade->target && !(grenade->threshold == 0)) // Don't blow up at your owner. + if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner. return true; if (thing->player && (thing->player->kartstuff[k_bootimer] - || (thing->player->kartstuff[k_balloon] <= 0 && thing->player->kartstuff[k_comebacktimer]))) + || (gametype == GT_MATCH && thing->player && thing->player->kartstuff[k_balloon] <= 0 && thing->player->kartstuff[k_comebacktimer]))) return true; if ((gametype == GT_CTF || gametype == GT_TEAMMATCH) @@ -8268,7 +8268,7 @@ void A_BobombExplode(mobj_t *actor) type = (mobjtype_t)locvar1; for (d = 0; d < 16; d++) - K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), false, false, actor->target); // 32 <-> 64 + K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64 P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND); @@ -8284,7 +8284,7 @@ void A_BobombExplode(mobj_t *actor) if (mo2 == actor || mo2->type == MT_BOMBEXPLOSIONSOUND) // Don't explode yourself! Endless loop! continue; - if (actor->target && actor->target->player && actor->target->player->kartstuff[k_balloon] <= 0 && mo2 == actor->target) + if (gametype == GT_MATCH && actor->target && actor->target->player && actor->target->player->kartstuff[k_balloon] <= 0 && mo2 == actor->target) continue; if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance) diff --git a/src/p_map.c b/src/p_map.c index 0a52d6fb..6674e0b1 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -848,9 +848,12 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->player && thing->player->powers[pw_flashing]) return true; - if (thing->type == MT_PLAYER) + if (thing->type == MT_PLAYER && thing->player) { - K_SpinPlayer(thing->player, tmthing->target); + if (tmthing->state == &states[S_BOMBEXPLOSION1]) + K_ExplodePlayer(thing->player, tmthing->target); + else + K_SpinPlayer(thing->player, tmthing->target); } return true; // This doesn't collide with anything, but we want it to effect the player anyway. @@ -1180,10 +1183,13 @@ static boolean PIT_CheckThing(mobj_t *thing) P_KillMobj(thing, tmthing, tmthing); } - else if (thing->type == MT_BOMBEXPLOSION) + else if (thing->type == MT_BOMBEXPLOSION && tmthing->player) { // Player Damage - K_SpinPlayer(tmthing->player, thing->target); + if (thing->state == &states[S_BOMBEXPLOSION1]) + K_ExplodePlayer(tmthing->player, thing->target); + else + K_SpinPlayer(tmthing->player, thing->target); return true; }