mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Make the Pyrefly glowing and damaging in its fire-spawning state
This commit is contained in:
parent
ce5d0691ac
commit
0fceb66e71
5 changed files with 11 additions and 3 deletions
|
@ -4583,6 +4583,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
|
||||
// Pyre Fly
|
||||
"S_PYREFLY_FLY",
|
||||
"S_PYREFLY_BURN",
|
||||
"S_PYREFIRE1",
|
||||
"S_PYREFIRE2",
|
||||
|
||||
|
|
|
@ -1177,7 +1177,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_CANG, 0|FF_TRANS90, 10, {NULL}, 0, 0, S_NULL}, // S_CANARIVOREGAS_8
|
||||
|
||||
// Pyre Fly
|
||||
{SPR_PYRE, FF_ANIMATE, 8, {NULL}, 4, 2, S_PYREFLY_FLY}, // S_PYREFLY_FLY
|
||||
{SPR_PYRE, FF_ANIMATE, -1, {NULL}, 3, 2, S_NULL}, // S_PYREFLY_FLY
|
||||
{SPR_PYRE, 4|FF_ANIMATE|FF_FULLBRIGHT, -1, {NULL}, 3, 2, S_NULL}, // S_PYREFLY_BURN
|
||||
{SPR_FLAM, FF_FULLBRIGHT, 10, {NULL}, 0, 0, S_PYREFIRE2}, // S_PYREFIRE1
|
||||
{SPR_FLAM, 1|FF_FULLBRIGHT, 10, {A_FireShrink}, 0, 16, S_NULL}, // S_PYREFIRE2
|
||||
|
||||
|
@ -5041,7 +5042,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_PYREFLY_BURN, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_XPLD_FLICKY, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
|
|
|
@ -1339,6 +1339,7 @@ typedef enum state
|
|||
|
||||
// Pyre Fly
|
||||
S_PYREFLY_FLY,
|
||||
S_PYREFLY_BURN,
|
||||
S_PYREFIRE1,
|
||||
S_PYREFIRE2,
|
||||
|
||||
|
|
|
@ -450,6 +450,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MT_PYREFLY:
|
||||
if (special->extravalue2 == 2 && P_DamageMobj(player->mo, special, special, 1, DMG_FIRE))
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -9081,7 +9081,6 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
else if (mobj->extravalue2 == 2)
|
||||
{
|
||||
INT32 fireradius = min(100 - mobj->fuse, 52);
|
||||
mobj->frame |= FF_FULLBRIGHT;
|
||||
P_PyreFlyBurn(mobj, P_RandomRange(0, fireradius)*FRACUNIT, 20, MT_FLAMEPARTICLE, 4*FRACUNIT);
|
||||
P_PyreFlyBurn(mobj, fireradius*FRACUNIT, 40, MT_PYREFLY_FIRE, 0);
|
||||
}
|
||||
|
@ -9456,6 +9455,7 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
|
|||
mobj->extravalue2 = (mobj->extravalue2 + 1) % 3;
|
||||
if (mobj->extravalue2 == 0)
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->spawnstate);
|
||||
mobj->fuse = 100;
|
||||
S_StopSound(mobj);
|
||||
S_StartSound(mobj, sfx_s3k8c);
|
||||
|
@ -9467,6 +9467,7 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
|
|||
}
|
||||
else
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->meleestate);
|
||||
mobj->fuse = 100;
|
||||
S_StopSound(mobj);
|
||||
S_StartSound(mobj, sfx_s3kc2l);
|
||||
|
@ -12084,6 +12085,7 @@ ML_EFFECT5 : Don't stop thinking when too far away
|
|||
//start on fire if Ambush flag is set, otherwise behave normally
|
||||
if (mthing->options & MTF_AMBUSH)
|
||||
{
|
||||
P_SetMobjState(mobj, mobj->info->meleestate);
|
||||
mobj->extravalue2 = 2;
|
||||
S_StartSound(mobj, sfx_s3kc2l);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue