Snapper head/legs and minecart segments flash when they're destroyed

This commit is contained in:
MascaraSnake 2019-06-16 15:35:32 +02:00
parent 774ccad401
commit b6790c7f35
4 changed files with 34 additions and 1 deletions

View file

@ -7517,6 +7517,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_DUSTLAYER",
"MT_ARIDDUST",
"MT_MINECART",
"MT_MINECARTSEG",
"MT_MINECARTSPAWNER",
"MT_MINECARTEND",
"MT_MINECARTENDSOLID",

View file

@ -11881,6 +11881,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
MT_MINECARTSIDEMARK // raisestate
},
{ // MT_MINECARTSEG
-1, // doomednum
S_INVISIBLE, // 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
0, // speed
FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIPHEIGHT|MF_NOCLIP, // flags
S_NULL // raisestate
},
{ // MT_MINECARTSPAWNER
1219, // doomednum
S_INVISIBLE, // spawnstate

View file

@ -4302,6 +4302,7 @@ typedef enum mobj_type
MT_DUSTLAYER,
MT_ARIDDUST,
MT_MINECART,
MT_MINECARTSEG,
MT_MINECARTSPAWNER,
MT_MINECARTEND,
MT_MINECARTENDSOLID,

View file

@ -6740,7 +6740,7 @@ static void P_SpawnMinecartSegments(mobj_t *mobj, boolean mode)
for (i = 0; i < 4; i++)
{
seg = P_SpawnMobj(x, y, z, MT_PARTICLE);
seg = P_SpawnMobj(x, y, z, MT_MINECARTSEG);
P_SetMobjState(seg, (statenum_t)(S_MINECARTSEG_FRONT + i));
if (i >= 2)
seg->extravalue1 = (i == 2) ? -18 : 18;
@ -8640,6 +8640,10 @@ void P_MobjThinker(mobj_t *mobj)
// Check fuse
if (mobj->fuse)
{
if (mobj->type == MT_SNAPPER_HEAD || mobj->type == MT_SNAPPER_LEG || mobj->type == MT_MINECARTSEG)
mobj->flags2 ^= MF2_DONTDRAW;
mobj->fuse--;
if (!mobj->fuse)
{