Fix thundershield not killing the spb and add DMG_VOLTAGE
Ported the fix from RR since it made the most sense
This commit is contained in:
parent
e19abad972
commit
9ca6075a9e
4 changed files with 27 additions and 8 deletions
|
|
@ -952,9 +952,10 @@ struct int_const_s const INT_CONST[] = {
|
|||
// for P_DamageMobj
|
||||
//// Damage types
|
||||
{"DMG_NORMAL",DMG_NORMAL},
|
||||
{"DMG_SQUISH",DMG_SQUISH},
|
||||
{"DMG_WIPEOUT",DMG_WIPEOUT},
|
||||
{"DMG_EXPLODE",DMG_EXPLODE},
|
||||
{"DMG_SQUISH",DMG_SQUISH},
|
||||
{"DMG_VOLTAGE",DMG_VOLTAGE},
|
||||
{"DMG_KARMA",DMG_KARMA},
|
||||
//// Death types
|
||||
{"DMG_INSTAKILL",DMG_INSTAKILL},
|
||||
|
|
|
|||
|
|
@ -665,10 +665,13 @@ static inline BlockItReturn_t PIT_ThunderShieldAttack(mobj_t *thing)
|
|||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY))
|
||||
if (thing->type != MT_SPB)
|
||||
{
|
||||
// Not shootable
|
||||
return BMIT_CONTINUE;
|
||||
if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY))
|
||||
{
|
||||
// Not shootable
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (thing->player && thing->player->spectator)
|
||||
|
|
@ -691,7 +694,7 @@ static inline BlockItReturn_t PIT_ThunderShieldAttack(mobj_t *thing)
|
|||
}
|
||||
#endif
|
||||
|
||||
P_DamageMobj(thing, lightningSource, lightningSource, 1, DMG_NORMAL|DMG_CANTHURTSELF);
|
||||
P_DamageMobj(thing, lightningSource, lightningSource, 1, DMG_VOLTAGE|DMG_CANTHURTSELF);
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2083,6 +2083,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
{
|
||||
player_t *player;
|
||||
boolean force = false;
|
||||
boolean spbpop = false;
|
||||
|
||||
if (objectplacing)
|
||||
return false;
|
||||
|
|
@ -2097,6 +2098,16 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (source && source->player && source->player->spectator)
|
||||
return false;
|
||||
|
||||
switch (target->type)
|
||||
{
|
||||
case MT_SPB:
|
||||
spbpop = (damagetype & DMG_TYPEMASK) == DMG_VOLTAGE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Everything above here can't be forced.
|
||||
if (!metalrecording)
|
||||
{
|
||||
|
|
@ -2111,8 +2122,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
if (!force)
|
||||
{
|
||||
if (!(target->flags & MF_SHOOTABLE))
|
||||
return false; // shouldn't happen...
|
||||
if (!spbpop)
|
||||
{
|
||||
if (!(target->flags & MF_SHOOTABLE))
|
||||
return false; // shouldn't happen...
|
||||
}
|
||||
}
|
||||
|
||||
if (target->flags2 & MF2_SKULLFLY)
|
||||
|
|
@ -2317,6 +2331,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
LUA_HookPlayerSpin(target, inflictor, source, damage, damagetype);
|
||||
K_KartPainEnergyFling(player);
|
||||
break;
|
||||
case DMG_VOLTAGE:
|
||||
case DMG_NORMAL:
|
||||
default:
|
||||
K_SpinPlayer(player, inflictor, source, KSPIN_SPINOUT);
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ struct BasicFF_t
|
|||
#define DMG_WIPEOUT 0x01 // Normal, but with extra flashy effects
|
||||
#define DMG_EXPLODE 0x02
|
||||
#define DMG_SQUISH 0x03
|
||||
//#define free 0x04
|
||||
#define DMG_VOLTAGE 0x04 // Normal but for killing the spb
|
||||
#define DMG_KARMA 0x05 // Karma Bomb explosion -- works like DMG_EXPLODE, but steals half of their bumpers & deletes the rest
|
||||
//// Death types - cannot be combined with damage types
|
||||
#define DMG_INSTAKILL 0x80
|
||||
|
|
|
|||
Loading…
Reference in a new issue