mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-03 17:01:19 +00:00
The main explosion particles bounce off the floor too
This commit is contained in:
parent
6b63e44ff9
commit
858a7adcb3
5 changed files with 42 additions and 3 deletions
|
@ -7017,6 +7017,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_BOMBEXPLOSIONSOUND",
|
||||
|
||||
"MT_SMOLDERING", // New explosion
|
||||
"MT_BOOMEXPLODE",
|
||||
"MT_BOOMPARTICLE",
|
||||
|
||||
"MT_BLUELIGHTNING", // Lightning stuff
|
||||
|
|
27
src/info.c
27
src/info.c
|
@ -15056,6 +15056,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOMEXPLODE
|
||||
-1, // doomednum
|
||||
S_SLOWBOOM1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
1, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOGRAVITY|MF_BOUNCE|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOMPARTICLE
|
||||
-1, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
|
|
|
@ -3999,6 +3999,7 @@ typedef enum mobj_type
|
|||
MT_BOMBEXPLOSIONSOUND,
|
||||
|
||||
MT_SMOLDERING, // New explosion
|
||||
MT_BOOMEXPLODE,
|
||||
MT_BOOMPARTICLE,
|
||||
|
||||
MT_BLUELIGHTNING, // Lightning stuff
|
||||
|
|
|
@ -2196,10 +2196,9 @@ void K_SpawnBobombExplosion(mobj_t *source, UINT8 color)
|
|||
|
||||
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
|
||||
source->y + P_RandomRange(-radius, radius)*FRACUNIT,
|
||||
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOSSEXPLODE);
|
||||
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMEXPLODE);
|
||||
truc->scale = source->scale*2;
|
||||
truc->destscale = source->scale*6;
|
||||
P_SetMobjState(truc, S_SLOWBOOM1);
|
||||
speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS;
|
||||
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
|
|
13
src/p_mobj.c
13
src/p_mobj.c
|
@ -3038,11 +3038,22 @@ static boolean P_SceneryZMovement(mobj_t *mo)
|
|||
|
||||
switch (mo->type)
|
||||
{
|
||||
case MT_BOOMEXPLODE:
|
||||
case MT_BOOMPARTICLE:
|
||||
if ((mo->flags & MF_BOUNCE) && (mo->z <= mo->floorz || mo->z+mo->height >= mo->ceilingz))
|
||||
{
|
||||
// set standingslope
|
||||
P_TryMove(mo, mo->x, mo->y, true);
|
||||
mo->momz = -mo->momz;
|
||||
mo->z += mo->momz;
|
||||
#ifdef ESLOPE
|
||||
if (mo->standingslope)
|
||||
{
|
||||
if (mo->flags & MF_NOCLIPHEIGHT)
|
||||
mo->standingslope = NULL;
|
||||
else if (!P_IsObjectOnGround(mo))
|
||||
P_SlopeLaunch(mo);
|
||||
}
|
||||
#endif
|
||||
S_StartSound(mo, mo->info->activesound);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue