Hardcoded train dust and steam spawner

This commit is contained in:
MascaraSnake 2019-06-09 17:16:07 +02:00
parent 6df14492a5
commit 3a16a7d7d4
5 changed files with 99 additions and 0 deletions

View File

@ -5744,6 +5744,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_TRAINCAMEOSPAWNER_5",
"S_TRAINPUFFMAKER",
// Train
"S_TRAINDUST",
"S_TRAINSTEAM",
// Flame jet
"S_FLAMEJETSTND",
"S_FLAMEJETSTART",
@ -7442,6 +7446,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_ARIDDUST",
"MT_TRAINCAMEOSPAWNER",
"MT_TRAINSEG",
"MT_TRAINDUSTSPAWNER",
"MT_TRAINSTEAMSPAWNER",
// Red Volcano Scenery
"MT_FLAMEJET",

View File

@ -358,6 +358,7 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_ADST
&lspr[NOLIGHT], // SPR_TRAE
&lspr[NOLIGHT], // SPR_TRAI
&lspr[NOLIGHT], // SPR_STEA
// Red Volcano Scenery
&lspr[REDBALL_L], // SPR_FLME

View File

@ -253,6 +253,7 @@ char sprnames[NUMSPRITES + 1][5] =
"ADST", // Arid dust
"TRAE", // Train cameo locomotive
"TRAI", // Train cameo wagon
"STEA", // Train steam
// Red Volcano Scenery
"FLME", // Flame jet
@ -2383,6 +2384,9 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, 1, {A_Repeat}, 5, S_TRAINCAMEOSPAWNER_4, S_NULL}, // S_TRAINCAMEOSPAWNER_5
{SPR_NULL, 0, 2, {A_SmokeTrailer}, MT_SMOKE, 0, S_TRAINPUFFMAKER}, // S_TRAINPUFFMAKER
{SPR_ADST, FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_TRAINDUST
{SPR_STEA, FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_TRAINSTEAM
// Flame jet
{SPR_NULL, 0, 2*TICRATE, {NULL}, 0, 0, S_FLAMEJETSTART}, // S_FLAMEJETSTND
{SPR_NULL, 0, 3*TICRATE, {A_ToggleFlameJet}, 0, 0, S_FLAMEJETSTOP}, // S_FLAMEJETSTART
@ -11702,6 +11706,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_TRAINDUSTSPAWNER
1223, // 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
FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_NOBLOCKMAP|MF_NOCLIP, // flags
S_NULL // raisestate
},
{ // MT_TRAINSTEAMSPAWNER
1224, // 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
FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_NOBLOCKMAP|MF_NOCLIP, // flags
S_NULL // raisestate
},
{ // MT_FLAMEJET
1300, // doomednum
S_FLAMEJETSTND, // spawnstate

View File

@ -490,6 +490,7 @@ typedef enum sprite
SPR_ADST, // Arid dust
SPR_TRAE, // Train cameo locomotive
SPR_TRAI, // Train cameo wagon
SPR_STEA, // Train steam
// Red Volcano Scenery
SPR_FLME, // Flame jet
@ -2500,6 +2501,10 @@ typedef enum state
S_TRAINCAMEOSPAWNER_5,
S_TRAINPUFFMAKER,
// Train
S_TRAINDUST,
S_TRAINSTEAM,
// Flame jet
S_FLAMEJETSTND,
S_FLAMEJETSTART,
@ -4218,6 +4223,8 @@ typedef enum mobj_type
MT_ARIDDUST,
MT_TRAINCAMEOSPAWNER,
MT_TRAINSEG,
MT_TRAINDUSTSPAWNER,
MT_TRAINSTEAMSPAWNER,
// Red Volcano Scenery
MT_FLAMEJET,

View File

@ -8412,6 +8412,33 @@ void P_MobjThinker(mobj_t *mobj)
mobj->flags2 |= MF2_DONTDRAW;
}
break;
case MT_TRAINDUSTSPAWNER:
if (leveltime % 5 == 0) {
mobj_t *traindust = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_PARTICLE);
traindust->flags = MF_SCENERY;
P_SetMobjState(traindust, S_TRAINDUST);
traindust->frame = P_RandomRange(0, 8) | FF_TRANS90;
traindust->angle = mobj->angle;
traindust->tics = TICRATE * 4;
traindust->destscale = FRACUNIT * 64;
traindust->scalespeed = FRACUNIT / 24;
P_SetScale(traindust, FRACUNIT * 6);
}
break;
case MT_TRAINSTEAMSPAWNER:
if (leveltime % 5 == 0) {
mobj_t *steam = P_SpawnMobj(mobj->x + FRACUNIT*P_SignedRandom() / 2, mobj->y + FRACUNIT*P_SignedRandom() / 2, mobj->z, MT_PARTICLE);
P_SetMobjState(steam, S_TRAINSTEAM);
steam->frame = P_RandomRange(0, 1) | FF_TRANS90;
steam->tics = TICRATE * 8;
steam->destscale = FRACUNIT * 64;
steam->scalespeed = FRACUNIT / 8;
P_SetScale(steam, FRACUNIT * 16);
steam->momx = P_SignedRandom() * 32;
steam->momy = -64 * FRACUNIT;
steam->momz = 2 * FRACUNIT;
}
break;
case MT_SPINFIRE:
if (mobj->flags & MF_NOGRAVITY)
{