mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
CEZ1 flames now implemented.
Please note Brak flames use a FF_ANIMATE state instead of the normal flame ones because they are spammed a lot, and the normal ones make particles.
This commit is contained in:
parent
90b2236711
commit
4e8ce1b77f
4 changed files with 87 additions and 11 deletions
|
@ -1961,6 +1961,7 @@ static actionpointer_t actionpointers[] =
|
|||
{{A_FlickyCheck}, "A_FLICKYCHECK"},
|
||||
{{A_FlickyHeightCheck}, "A_FLICKYHEIGHTCHECK"},
|
||||
{{A_FlickyFlutter}, "A_FLICKYFLUTTER"},
|
||||
{{A_FlameParticle}, "A_FLAMEPARTICLE"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
|
@ -5212,6 +5213,11 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FLAME2",
|
||||
"S_FLAME3",
|
||||
"S_FLAME4",
|
||||
"S_FLAME5",
|
||||
"S_FLAME6",
|
||||
"S_FLAMEPARTICLE",
|
||||
|
||||
"S_FLAMEREST",
|
||||
|
||||
// Eggman Statue
|
||||
"S_EGGSTATUE1",
|
||||
|
@ -6550,6 +6556,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
// Castle Eggman Scenery
|
||||
"MT_CHAIN", // CEZ Chain
|
||||
"MT_FLAME", // Flame (has corona)
|
||||
"MT_FLAMEPARTICLE",
|
||||
"MT_EGGSTATUE", // Eggman Statue
|
||||
"MT_MACEPOINT", // Mace rotation point
|
||||
"MT_SWINGMACEPOINT", // Mace swinging point
|
||||
|
|
54
src/info.c
54
src/info.c
|
@ -1246,12 +1246,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_RCKT, 2 + FF_FULLBRIGHT, 6, {A_NapalmScatter}, MT_CYBRAKDEMON_NAPALM_FLAMES + (6<<16), 32 + (16<<16), S_CYBRAKDEMONMISSILE_EXPLODE3}, // S_CYBRAKDEMONMISSILE_EXPLODE2
|
||||
{SPR_RCKT, 3 + FF_FULLBRIGHT, 4, {NULL}, 0, 0, S_NULL}, // S_CYBRAKDEMONMISSILE_EXPLODE3
|
||||
|
||||
{SPR_FLME, FF_TRANS50|FF_FULLBRIGHT , 15, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY2}, // S_CYBRAKDEMONFLAMESHOT_FLY1
|
||||
{SPR_FLME, FF_TRANS50|FF_FULLBRIGHT|1, 15, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY3}, // S_CYBRAKDEMONFLAMESHOT_FLY2
|
||||
{SPR_FLME, FF_TRANS50|FF_FULLBRIGHT|2, -1, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY3}, // S_CYBRAKDEMONFLAMESHOT_FLY3
|
||||
{SPR_FLME, FF_TRANS50|FF_FULLBRIGHT|2, 0, {A_SpawnObjectRelative}, 0, MT_CYBRAKDEMON_FLAMEREST, S_NULL}, // S_CYBRAKDEMONFLAMESHOT_DIE
|
||||
{SPR_FLME, FF_TRANS20|FF_FULLBRIGHT , 15, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY2}, // S_CYBRAKDEMONFLAMESHOT_FLY1
|
||||
{SPR_FLME, FF_TRANS20|FF_FULLBRIGHT|1, 15, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY3}, // S_CYBRAKDEMONFLAMESHOT_FLY2
|
||||
{SPR_FLME, FF_TRANS20|FF_FULLBRIGHT|2, -1, {NULL}, 0, 0, S_CYBRAKDEMONFLAMESHOT_FLY3}, // S_CYBRAKDEMONFLAMESHOT_FLY3
|
||||
{SPR_FLME, FF_TRANS20|FF_FULLBRIGHT|2, 0, {A_SpawnObjectRelative}, 0, MT_CYBRAKDEMON_FLAMEREST, S_NULL}, // S_CYBRAKDEMONFLAMESHOT_DIE
|
||||
|
||||
{SPR_FLAM, FF_TRANS50|FF_FULLBRIGHT|3, 3, {A_SetFuse}, 10*TICRATE, 0, S_FLAME1}, // S_CYBRAKDEMONFLAMEREST
|
||||
{SPR_FLAM, FF_TRANS20|FF_FULLBRIGHT|5, 3, {A_SetFuse}, 10*TICRATE, 0, S_FLAMEREST}, // S_CYBRAKDEMONFLAMEREST
|
||||
|
||||
{SPR_ELEC, 0 + FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_CYBRAKDEMONELECTRICBARRIER_INIT2}, // S_CYBRAKDEMONELECTRICBARRIER_INIT1
|
||||
{SPR_ELEC, 0 + FF_FULLBRIGHT, 0, {A_RemoteAction}, -1, S_CYBRAKDEMON_INVINCIBLERIZE, S_CYBRAKDEMONELECTRICBARRIER_PLAYSOUND}, // S_CYBRAKDEMONELECTRICBARRIER_INIT2
|
||||
|
@ -1806,10 +1806,15 @@ state_t states[NUMSTATES] =
|
|||
{SPR_CHAN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CEZCHAIN
|
||||
|
||||
// Flame
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS50, 3, {NULL}, 0, 0, S_FLAME2}, // S_FLAME1
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS50|1, 3, {NULL}, 0, 0, S_FLAME3}, // S_FLAME2
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS50|2, 3, {NULL}, 0, 0, S_FLAME4}, // S_FLAME3
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS50|3, 3, {NULL}, 0, 0, S_FLAME1}, // S_FLAME4
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20, 3, {A_FlameParticle}, 3, 0, S_FLAME2}, // S_FLAME1
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|1, 3, {NULL}, 0, 0, S_FLAME3}, // S_FLAME2
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|2, 3, {A_FlameParticle}, 3, 0, S_FLAME4}, // S_FLAME3
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|3, 3, {NULL}, 0, 0, S_FLAME5}, // S_FLAME4
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|4, 3, {A_FlameParticle}, 3, 0, S_FLAME6}, // S_FLAME5
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|5, 3, {NULL}, 0, 0, S_FLAME1}, // S_FLAME6
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS10|6, 24, {NULL}, 0, 0, S_NULL}, // S_FLAMEPARTICLE
|
||||
|
||||
{SPR_FLAM, FF_FULLBRIGHT|FF_TRANS20|FF_ANIMATE, -1, {NULL}, 5, 3, S_FLAME2}, // S_FLAMEREST
|
||||
|
||||
// Eggman statue
|
||||
{SPR_ESTA, 0, -1, {NULL}, 0, 0, S_NULL}, // S_EGGSTATUE1
|
||||
|
@ -4730,7 +4735,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
MT_NULL, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
|
@ -8370,7 +8375,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
MT_FLAMEPARTICLE, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
|
@ -8388,6 +8393,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_FLAMEPARTICLE
|
||||
-1, // doomednum
|
||||
S_FLAMEPARTICLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // 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_NOBLOCKMAP|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_EGGSTATUE
|
||||
1102, // doomednum
|
||||
S_EGGSTATUE1, // spawnstate
|
||||
|
|
|
@ -224,6 +224,7 @@ void A_FlickyFlounder();
|
|||
void A_FlickyCheck();
|
||||
void A_FlickyHeightCheck();
|
||||
void A_FlickyFlutter();
|
||||
void A_FlameParticle();
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
#define NUMMOBJFREESLOTS 256
|
||||
|
@ -2017,6 +2018,11 @@ typedef enum state
|
|||
S_FLAME2,
|
||||
S_FLAME3,
|
||||
S_FLAME4,
|
||||
S_FLAME5,
|
||||
S_FLAME6,
|
||||
S_FLAMEPARTICLE,
|
||||
|
||||
S_FLAMEREST,
|
||||
|
||||
// Eggman Statue
|
||||
S_EGGSTATUE1,
|
||||
|
@ -3374,6 +3380,7 @@ typedef enum mobj_type
|
|||
// Castle Eggman Scenery
|
||||
MT_CHAIN, // CEZ Chain
|
||||
MT_FLAME, // Flame (has corona)
|
||||
MT_FLAMEPARTICLE,
|
||||
MT_EGGSTATUE, // Eggman Statue
|
||||
MT_MACEPOINT, // Mace rotation point
|
||||
MT_SWINGMACEPOINT, // Mace swinging point
|
||||
|
|
|
@ -252,6 +252,7 @@ void A_FlickyFlounder(mobj_t *actor);
|
|||
void A_FlickyCheck(mobj_t *actor);
|
||||
void A_FlickyHeightCheck(mobj_t *actor);
|
||||
void A_FlickyFlutter(mobj_t *actor);
|
||||
void A_FlameParticle(mobj_t *actor);
|
||||
|
||||
//
|
||||
// ENEMY THINKING
|
||||
|
@ -10759,3 +10760,32 @@ void A_FlickyFlutter(mobj_t *actor)
|
|||
}
|
||||
|
||||
#undef FLICKYHITWALL
|
||||
|
||||
// Function: A_FlameParticle
|
||||
//
|
||||
// Description: Creates the mobj's painchance at a random position around the object's radius.
|
||||
//
|
||||
// var1 = momz of particle.
|
||||
//
|
||||
void A_FlameParticle(mobj_t *actor)
|
||||
{
|
||||
mobjtype_t type = (mobjtype_t)(mobjinfo[actor->type].painchance);
|
||||
INT32 locvar1 = var1;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_FlameParticle", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (type)
|
||||
{
|
||||
fixed_t rad = 2*actor->radius>>FRACBITS;
|
||||
fixed_t hei = actor->height>>FRACBITS;
|
||||
mobj_t *particle = P_SpawnMobjFromMobj(actor,
|
||||
P_RandomRange(rad, -rad)<<FRACBITS,
|
||||
P_RandomRange(rad, -rad)<<FRACBITS,
|
||||
P_RandomRange(hei/2, hei)<<FRACBITS,
|
||||
type);
|
||||
P_SetObjectMomZ(particle, locvar1<<FRACBITS, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue