mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
* Flameaura shield now has boosh sprites.
* MF2_SHIELD calls shield thinker (P_AddShield/P_ShieldLook). * Multiple types of force shields now handled.
This commit is contained in:
parent
cfc9302bd3
commit
45d32b7f7c
6 changed files with 96 additions and 44 deletions
|
|
@ -5407,6 +5407,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_ELEM11",
|
"S_ELEM11",
|
||||||
"S_ELEM12",
|
"S_ELEM12",
|
||||||
|
|
||||||
|
"S_ELEM13",
|
||||||
|
"S_ELEM14",
|
||||||
|
|
||||||
"S_ELEMF1",
|
"S_ELEMF1",
|
||||||
"S_ELEMF2",
|
"S_ELEMF2",
|
||||||
"S_ELEMF3",
|
"S_ELEMF3",
|
||||||
|
|
@ -5439,6 +5442,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_FIRS8",
|
"S_FIRS8",
|
||||||
"S_FIRS9",
|
"S_FIRS9",
|
||||||
|
|
||||||
|
"S_FIRS10",
|
||||||
|
"S_FIRS11",
|
||||||
|
|
||||||
"S_FIRSB1",
|
"S_FIRSB1",
|
||||||
"S_FIRSB2",
|
"S_FIRSB2",
|
||||||
"S_FIRSB3",
|
"S_FIRSB3",
|
||||||
|
|
@ -5449,6 +5455,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_FIRSB8",
|
"S_FIRSB8",
|
||||||
"S_FIRSB9",
|
"S_FIRSB9",
|
||||||
|
|
||||||
|
"S_FIRSB10",
|
||||||
|
|
||||||
"S_BUBS1",
|
"S_BUBS1",
|
||||||
"S_BUBS2",
|
"S_BUBS2",
|
||||||
"S_BUBS3",
|
"S_BUBS3",
|
||||||
|
|
@ -6653,35 +6661,36 @@ static const char *const MOBJFLAG_LIST[] = {
|
||||||
|
|
||||||
// \tMF2_(\S+).*// (.+) --> \t"\1", // \2
|
// \tMF2_(\S+).*// (.+) --> \t"\1", // \2
|
||||||
static const char *const MOBJFLAG2_LIST[] = {
|
static const char *const MOBJFLAG2_LIST[] = {
|
||||||
"AXIS", // It's a NiGHTS axis! (For faster checking)
|
"AXIS", // It's a NiGHTS axis! (For faster checking)
|
||||||
"TWOD", // Moves like it's in a 2D level
|
"TWOD", // Moves like it's in a 2D level
|
||||||
"DONTRESPAWN", // Don't respawn this object!
|
"DONTRESPAWN", // Don't respawn this object!
|
||||||
"DONTDRAW", // Don't generate a vissprite
|
"DONTDRAW", // Don't generate a vissprite
|
||||||
"AUTOMATIC", // Thrown ring has automatic properties
|
"AUTOMATIC", // Thrown ring has automatic properties
|
||||||
"RAILRING", // Thrown ring has rail properties
|
"RAILRING", // Thrown ring has rail properties
|
||||||
"BOUNCERING", // Thrown ring has bounce properties
|
"BOUNCERING", // Thrown ring has bounce properties
|
||||||
"EXPLOSION", // Thrown ring has explosive properties
|
"EXPLOSION", // Thrown ring has explosive properties
|
||||||
"SCATTER", // Thrown ring has scatter properties
|
"SCATTER", // Thrown ring has scatter properties
|
||||||
"BEYONDTHEGRAVE",// Source of this missile has died and has since respawned.
|
"BEYONDTHEGRAVE", // Source of this missile has died and has since respawned.
|
||||||
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
|
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
|
||||||
"CLASSICPUSH", // Drops straight down when object has negative Z.
|
"CLASSICPUSH", // Drops straight down when object has negative Z.
|
||||||
"STANDONME", // While not pushable, stand on me anyway.
|
"STANDONME", // While not pushable, stand on me anyway.
|
||||||
"INFLOAT", // Floating to a height for a move, don't auto float to target's height.
|
"INFLOAT", // Floating to a height for a move, don't auto float to target's height.
|
||||||
"DEBRIS", // Splash ring from explosion ring
|
"DEBRIS", // Splash ring from explosion ring
|
||||||
"NIGHTSPULL", // Attracted from a paraloop
|
"NIGHTSPULL", // Attracted from a paraloop
|
||||||
"JUSTATTACKED", // can be pushed by other moving mobjs
|
"JUSTATTACKED", // can be pushed by other moving mobjs
|
||||||
"FIRING", // turret fire
|
"FIRING", // turret fire
|
||||||
"SUPERFIRE", // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
"SUPERFIRE", // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
||||||
"SHADOW", // Fuzzy draw, makes targeting harder.
|
"SHADOW", // Fuzzy draw, makes targeting harder.
|
||||||
"STRONGBOX", // Flag used for "strong" random monitors.
|
"STRONGBOX", // Flag used for "strong" random monitors.
|
||||||
"OBJECTFLIP", // Flag for objects that always have flipped gravity.
|
"OBJECTFLIP", // Flag for objects that always have flipped gravity.
|
||||||
"SKULLFLY", // Special handling: skull in flight.
|
"SKULLFLY", // Special handling: skull in flight.
|
||||||
"FRET", // Flashing from a previous hit
|
"FRET", // Flashing from a previous hit
|
||||||
"BOSSNOTRAP", // No Egg Trap after boss
|
"BOSSNOTRAP", // No Egg Trap after boss
|
||||||
"BOSSFLEE", // Boss is fleeing!
|
"BOSSFLEE", // Boss is fleeing!
|
||||||
"BOSSDEAD", // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
"BOSSDEAD", // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
||||||
"AMBUSH", // Alternate behaviour typically set by MTF_AMBUSH
|
"AMBUSH", // Alternate behaviour typically set by MTF_AMBUSH
|
||||||
"LINKDRAW", // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
"LINKDRAW", // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
||||||
|
"SHIELD", // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
14
src/info.c
14
src/info.c
|
|
@ -2119,6 +2119,9 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_ELEM, FF_TRANS50|10, 4, {NULL}, 0, 0, S_ELEM12}, // S_ELEM11
|
{SPR_ELEM, FF_TRANS50|10, 4, {NULL}, 0, 0, S_ELEM12}, // S_ELEM11
|
||||||
{SPR_ELEM, FF_TRANS50|11, 4, {NULL}, 0, 0, S_ELEM1 }, // S_ELEM12
|
{SPR_ELEM, FF_TRANS50|11, 4, {NULL}, 0, 0, S_ELEM1 }, // S_ELEM12
|
||||||
|
|
||||||
|
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_ELEM14}, // S_ELEM13
|
||||||
|
{SPR_ELEM, FF_TRANS50|11, 1, {NULL}, 0, 0, S_ELEM1 }, // S_ELEM14
|
||||||
|
|
||||||
{SPR_ELEM, FF_FULLBRIGHT|12, 3, {NULL}, 0, 0, S_ELEMF2 }, // S_ELEMF1
|
{SPR_ELEM, FF_FULLBRIGHT|12, 3, {NULL}, 0, 0, S_ELEMF2 }, // S_ELEMF1
|
||||||
{SPR_ELEM, FF_FULLBRIGHT|13, 3, {NULL}, 0, 0, S_ELEMF3 }, // S_ELEMF2
|
{SPR_ELEM, FF_FULLBRIGHT|13, 3, {NULL}, 0, 0, S_ELEMF3 }, // S_ELEMF2
|
||||||
{SPR_ELEM, FF_FULLBRIGHT|14, 3, {NULL}, 0, 0, S_ELEMF4 }, // S_ELEMF3
|
{SPR_ELEM, FF_FULLBRIGHT|14, 3, {NULL}, 0, 0, S_ELEMF4 }, // S_ELEMF3
|
||||||
|
|
@ -2152,6 +2155,9 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|7, 2, {NULL}, 0, 0, S_FIRS9}, // S_FIRS8
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|7, 2, {NULL}, 0, 0, S_FIRS9}, // S_FIRS8
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|8, 2, {NULL}, 0, 0, S_FIRS1}, // S_FIRS9
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|8, 2, {NULL}, 0, 0, S_FIRS1}, // S_FIRS9
|
||||||
|
|
||||||
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|18, 1, {NULL}, 0, 0, S_FIRS11}, // S_FIRS10
|
||||||
|
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_FIRS1 }, // S_FIRS11
|
||||||
|
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40| 9, 2, {NULL}, 0, 0, S_FIRSB2}, // S_FIRSB1
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40| 9, 2, {NULL}, 0, 0, S_FIRSB2}, // S_FIRSB1
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|10, 2, {NULL}, 0, 0, S_FIRSB3}, // S_FIRSB2
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|10, 2, {NULL}, 0, 0, S_FIRSB3}, // S_FIRSB2
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|11, 2, {NULL}, 0, 0, S_FIRSB4}, // S_FIRSB3
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|11, 2, {NULL}, 0, 0, S_FIRSB4}, // S_FIRSB3
|
||||||
|
|
@ -2162,6 +2168,8 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|16, 2, {NULL}, 0, 0, S_FIRSB9}, // S_FIRSB8
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|16, 2, {NULL}, 0, 0, S_FIRSB9}, // S_FIRSB8
|
||||||
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|17, 2, {NULL}, 0, 0, S_FIRSB1}, // S_FIRSB9
|
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|17, 2, {NULL}, 0, 0, S_FIRSB1}, // S_FIRSB9
|
||||||
|
|
||||||
|
{SPR_NULL, 0, 2, {NULL}, 0, 0, S_FIRSB1 }, // S_FIRSB10
|
||||||
|
|
||||||
{SPR_BUBS, FF_TRANS30 , 3, {NULL}, 0, 0, S_BUBS2}, // S_BUBS1
|
{SPR_BUBS, FF_TRANS30 , 3, {NULL}, 0, 0, S_BUBS2}, // S_BUBS1
|
||||||
{SPR_BUBS, FF_TRANS30|1, 3, {NULL}, 0, 0, S_BUBS3}, // S_BUBS2
|
{SPR_BUBS, FF_TRANS30|1, 3, {NULL}, 0, 0, S_BUBS3}, // S_BUBS2
|
||||||
{SPR_BUBS, FF_TRANS30|2, 3, {NULL}, 0, 0, S_BUBS4}, // S_BUBS3
|
{SPR_BUBS, FF_TRANS30|2, 3, {NULL}, 0, 0, S_BUBS4}, // S_BUBS3
|
||||||
|
|
@ -10697,7 +10705,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
S_NULL, // painstate
|
S_ELEM13, // painstate
|
||||||
SKINCOLOR_NONE, // painchance
|
SKINCOLOR_NONE, // painchance
|
||||||
sfx_None, // painsound
|
sfx_None, // painsound
|
||||||
S_NULL, // meleestate
|
S_NULL, // meleestate
|
||||||
|
|
@ -10859,7 +10867,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
8, // reactiontime
|
8, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
S_NULL, // painstate
|
S_FIRSB10, // painstate
|
||||||
SKINCOLOR_NONE, // painchance
|
SKINCOLOR_NONE, // painchance
|
||||||
sfx_None, // painsound
|
sfx_None, // painsound
|
||||||
S_NULL, // meleestate
|
S_NULL, // meleestate
|
||||||
|
|
@ -10875,7 +10883,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||||
S_NULL // raisestate
|
S_FIRS10 // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_BUBBLEWRAP_ORB
|
{ // MT_BUBBLEWRAP_ORB
|
||||||
|
|
|
||||||
|
|
@ -2304,6 +2304,9 @@ typedef enum state
|
||||||
S_ELEM11,
|
S_ELEM11,
|
||||||
S_ELEM12,
|
S_ELEM12,
|
||||||
|
|
||||||
|
S_ELEM13,
|
||||||
|
S_ELEM14,
|
||||||
|
|
||||||
S_ELEMF1,
|
S_ELEMF1,
|
||||||
S_ELEMF2,
|
S_ELEMF2,
|
||||||
S_ELEMF3,
|
S_ELEMF3,
|
||||||
|
|
@ -2336,6 +2339,9 @@ typedef enum state
|
||||||
S_FIRS8,
|
S_FIRS8,
|
||||||
S_FIRS9,
|
S_FIRS9,
|
||||||
|
|
||||||
|
S_FIRS10,
|
||||||
|
S_FIRS11,
|
||||||
|
|
||||||
S_FIRSB1,
|
S_FIRSB1,
|
||||||
S_FIRSB2,
|
S_FIRSB2,
|
||||||
S_FIRSB3,
|
S_FIRSB3,
|
||||||
|
|
@ -2346,6 +2352,8 @@ typedef enum state
|
||||||
S_FIRSB8,
|
S_FIRSB8,
|
||||||
S_FIRSB9,
|
S_FIRSB9,
|
||||||
|
|
||||||
|
S_FIRSB10,
|
||||||
|
|
||||||
S_BUBS1,
|
S_BUBS1,
|
||||||
S_BUBS2,
|
S_BUBS2,
|
||||||
S_BUBS3,
|
S_BUBS3,
|
||||||
|
|
|
||||||
48
src/p_mobj.c
48
src/p_mobj.c
|
|
@ -6392,7 +6392,7 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
||||||
|
|
||||||
// TODO: Make an MT_SHIELDORB which changes color/states to always match the appropriate shield,
|
// TODO: Make an MT_SHIELDORB which changes color/states to always match the appropriate shield,
|
||||||
// instead of having completely seperate mobjtypes.
|
// instead of having completely seperate mobjtypes.
|
||||||
if (shield != SH_FORCE)
|
if (!(shield & SH_FORCE))
|
||||||
{ // Regular shields check for themselves only
|
{ // Regular shields check for themselves only
|
||||||
if ((shieldtype_t)(thing->target->player->powers[pw_shield] & SH_NOSTACK) != shield)
|
if ((shieldtype_t)(thing->target->player->powers[pw_shield] & SH_NOSTACK) != shield)
|
||||||
{
|
{
|
||||||
|
|
@ -6406,7 +6406,7 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shield == SH_FORCE && thing->movecount != (thing->target->player->powers[pw_shield] & SH_FORCEHP))
|
if (shield & SH_FORCE && thing->movecount != (thing->target->player->powers[pw_shield] & SH_FORCEHP))
|
||||||
{
|
{
|
||||||
thing->movecount = (thing->target->player->powers[pw_shield] & SH_FORCEHP);
|
thing->movecount = (thing->target->player->powers[pw_shield] & SH_FORCEHP);
|
||||||
if (thing->movecount < 1)
|
if (thing->movecount < 1)
|
||||||
|
|
@ -6458,7 +6458,7 @@ void P_RunShields(void)
|
||||||
// run shields
|
// run shields
|
||||||
for (i = 0; i < numshields; i++)
|
for (i = 0; i < numshields; i++)
|
||||||
{
|
{
|
||||||
P_ShieldLook(shields[i], shields[i]->info->speed);
|
P_ShieldLook(shields[i], shields[i]->threshold);
|
||||||
P_SetTarget(&shields[i], NULL);
|
P_SetTarget(&shields[i], NULL);
|
||||||
}
|
}
|
||||||
numshields = 0;
|
numshields = 0;
|
||||||
|
|
@ -6466,7 +6466,7 @@ void P_RunShields(void)
|
||||||
|
|
||||||
static boolean P_AddShield(mobj_t *thing)
|
static boolean P_AddShield(mobj_t *thing)
|
||||||
{
|
{
|
||||||
shieldtype_t shield = thing->info->speed;
|
shieldtype_t shield = thing->threshold;
|
||||||
|
|
||||||
if (!thing->target || thing->target->health <= 0 || !thing->target->player
|
if (!thing->target || thing->target->health <= 0 || !thing->target->player
|
||||||
|| (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super]
|
|| (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super]
|
||||||
|
|
@ -6476,7 +6476,7 @@ static boolean P_AddShield(mobj_t *thing)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shield != SH_FORCE)
|
if (!(shield & SH_FORCE))
|
||||||
{ // Regular shields check for themselves only
|
{ // Regular shields check for themselves only
|
||||||
if ((shieldtype_t)(thing->target->player->powers[pw_shield] & SH_NOSTACK) != shield)
|
if ((shieldtype_t)(thing->target->player->powers[pw_shield] & SH_NOSTACK) != shield)
|
||||||
{
|
{
|
||||||
|
|
@ -6743,6 +6743,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (P_MobjWasRemoved(mobj))
|
if (P_MobjWasRemoved(mobj))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (mobj->flags2 & MF2_SHIELD)
|
||||||
|
if (!P_AddShield(mobj))
|
||||||
|
return;
|
||||||
|
|
||||||
switch (mobj->type)
|
switch (mobj->type)
|
||||||
{
|
{
|
||||||
case MT_HOOP:
|
case MT_HOOP:
|
||||||
|
|
@ -6802,12 +6807,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
case MT_PITY_ORB:
|
case MT_PITY_ORB:
|
||||||
case MT_WHIRLWIND_ORB:
|
case MT_WHIRLWIND_ORB:
|
||||||
case MT_ARMAGEDDON_ORB:
|
case MT_ARMAGEDDON_ORB:
|
||||||
case MT_FLAMEAURA_ORB:
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
if (!P_AddShield(mobj))
|
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case MT_ATTRACT_ORB:
|
case MT_ATTRACT_ORB:
|
||||||
if (!P_AddShield(mobj))
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
return;
|
return;
|
||||||
if (/*(mobj->target) -- the following is implicit by P_AddShield
|
if (/*(mobj->target) -- the following is implicit by P_AddShield
|
||||||
&& (mobj->target->player)
|
&& (mobj->target->player)
|
||||||
|
|
@ -6818,7 +6822,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_ELEMENTAL_ORB:
|
case MT_ELEMENTAL_ORB:
|
||||||
if (!P_AddShield(mobj))
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
return;
|
return;
|
||||||
if (mobj->tracer
|
if (mobj->tracer
|
||||||
/* && mobj->target -- the following is implicit by P_AddShield
|
/* && mobj->target -- the following is implicit by P_AddShield
|
||||||
|
|
@ -6828,12 +6832,14 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
&& ((statenum_t)(mobj->tracer->state-states) < mobj->info->raisestate
|
&& ((statenum_t)(mobj->tracer->state-states) < mobj->info->raisestate
|
||||||
|| (mobj->tracer->state->nextstate < mobj->info->raisestate && mobj->tracer->tics == 1)))
|
|| (mobj->tracer->state->nextstate < mobj->info->raisestate && mobj->tracer->tics == 1)))
|
||||||
{
|
{
|
||||||
|
P_SetMobjState(mobj, mobj->info->painstate);
|
||||||
|
mobj->tics++;
|
||||||
P_SetMobjState(mobj->tracer, mobj->info->raisestate);
|
P_SetMobjState(mobj->tracer, mobj->info->raisestate);
|
||||||
mobj->tracer->tics++;
|
mobj->tracer->tics++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_FORCE_ORB:
|
case MT_FORCE_ORB:
|
||||||
if (!P_AddShield(mobj))
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
return;
|
return;
|
||||||
if (/*
|
if (/*
|
||||||
&& mobj->target -- the following is implicit by P_AddShield
|
&& mobj->target -- the following is implicit by P_AddShield
|
||||||
|
|
@ -6849,8 +6855,26 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
whoosh->height = 42*FRACUNIT;
|
whoosh->height = 42*FRACUNIT;
|
||||||
mobj->target->player->pflags &= ~PF_SHIELDABILITY; // prevent eternal whoosh
|
mobj->target->player->pflags &= ~PF_SHIELDABILITY; // prevent eternal whoosh
|
||||||
}
|
}
|
||||||
|
case MT_FLAMEAURA_ORB:
|
||||||
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
|
return;
|
||||||
|
mobj->angle = mobj->target->angle; // implicitly okay because of P_AddShield
|
||||||
|
if (mobj->tracer
|
||||||
|
/* && mobj->target -- the following is implicit by P_AddShield
|
||||||
|
&& mobj->target->player
|
||||||
|
&& (mobj->target->player->powers[pw_shield] & SH_NOSTACK) == SH_FLAMEAURA */
|
||||||
|
&& mobj->target->player->pflags & PF_SHIELDABILITY
|
||||||
|
&& ((statenum_t)(mobj->tracer->state-states) < mobj->info->raisestate
|
||||||
|
|| (mobj->tracer->state->nextstate < mobj->info->raisestate && mobj->tracer->tics == 1)))
|
||||||
|
{
|
||||||
|
P_SetMobjState(mobj, mobj->info->painstate);
|
||||||
|
mobj->tics++;
|
||||||
|
P_SetMobjState(mobj->tracer, mobj->info->raisestate);
|
||||||
|
mobj->tracer->tics++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MT_BUBBLEWRAP_ORB:
|
case MT_BUBBLEWRAP_ORB:
|
||||||
if (!P_AddShield(mobj))
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
return;
|
return;
|
||||||
if (mobj->tracer
|
if (mobj->tracer
|
||||||
/* && mobj->target -- the following is implicit by P_AddShield
|
/* && mobj->target -- the following is implicit by P_AddShield
|
||||||
|
|
@ -6878,7 +6902,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_THUNDERCOIN_ORB:
|
case MT_THUNDERCOIN_ORB:
|
||||||
if (!P_AddShield(mobj))
|
if (!(mobj->flags2 & MF2_SHIELD))
|
||||||
return;
|
return;
|
||||||
if (mobj->tracer
|
if (mobj->tracer
|
||||||
/* && mobj->target -- the following is implicit by P_AddShield
|
/* && mobj->target -- the following is implicit by P_AddShield
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ typedef enum
|
||||||
MF2_BOSSDEAD = 1<<26, // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
MF2_BOSSDEAD = 1<<26, // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
||||||
MF2_AMBUSH = 1<<27, // Alternate behaviour typically set by MTF_AMBUSH
|
MF2_AMBUSH = 1<<27, // Alternate behaviour typically set by MTF_AMBUSH
|
||||||
MF2_LINKDRAW = 1<<28, // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
MF2_LINKDRAW = 1<<28, // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
||||||
|
MF2_SHIELD = 1<<29, // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
|
||||||
// free: to and including 1<<31
|
// free: to and including 1<<31
|
||||||
} mobjflag2_t;
|
} mobjflag2_t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1395,8 +1395,10 @@ void P_SpawnShieldOrb(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
shieldobj = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, orbtype);
|
shieldobj = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, orbtype);
|
||||||
|
shieldobj->flags2 |= MF2_SHIELD;
|
||||||
P_SetTarget(&shieldobj->target, player->mo);
|
P_SetTarget(&shieldobj->target, player->mo);
|
||||||
shieldobj->color = (UINT8)shieldobj->info->painchance;
|
shieldobj->color = (UINT8)shieldobj->info->painchance;
|
||||||
|
shieldobj->threshold = (player->powers[pw_shield] & SH_FORCE) ? SH_FORCE : (player->powers[pw_shield] & SH_NOSTACK);
|
||||||
|
|
||||||
if (shieldobj->info->seestate)
|
if (shieldobj->info->seestate)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue