Nev3r wants to make barrels which are both shootable and die when you break them like you break monitors.

To that end, I've made MF_MONITOR *without* MF_SHOOTABLE act like MF_MONITOR does, and MF_SHOOTABLE allow for both missiles AND players to destroy. This has had the side effect of allowing MF_ENEMY and MF_BOSS to use MF_MONITOR as a substitute for MF_SHOOTABLE that doesn't allow missiles to cause them damage, which might be useful for Jetty-syns.
This commit is contained in:
toasterbabe 2016-11-12 14:08:27 +00:00
parent 645e7298c0
commit 286a8b0289
4 changed files with 38 additions and 41 deletions

View file

@ -6019,7 +6019,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_RING_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6046,7 +6046,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_PITY_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6073,7 +6073,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ATTRACT_ICON,// damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6100,7 +6100,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_FORCE_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6127,7 +6127,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ARMAGEDDON_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6154,7 +6154,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_WHIRLWIND_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6181,7 +6181,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ELEMENTAL_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6208,7 +6208,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_SNEAKERS_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6235,7 +6235,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_INVULN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6262,7 +6262,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_1UP_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6289,7 +6289,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_EGGMAN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6316,7 +6316,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_MIXUP_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6343,7 +6343,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_UNKNOWN, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6370,7 +6370,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_GRAVITY_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6397,7 +6397,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_RECYCLER_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6424,7 +6424,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_SCORE1K_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6451,7 +6451,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_SCORE10K_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6478,7 +6478,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_FLAMEAURA_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6505,7 +6505,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_BUBBLEWRAP_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6532,7 +6532,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_THUNDERCOIN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6559,7 +6559,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_PITY_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6586,7 +6586,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ATTRACT_ICON,// damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6613,7 +6613,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_FORCE_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6640,7 +6640,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ARMAGEDDON_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6667,7 +6667,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_WHIRLWIND_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6694,7 +6694,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_ELEMENTAL_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6721,7 +6721,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_SNEAKERS_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6748,7 +6748,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_INVULN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6775,7 +6775,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_EGGMAN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6802,7 +6802,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_GRAVITY_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6829,7 +6829,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_FLAMEAURA_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6856,7 +6856,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_BUBBLEWRAP_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6883,7 +6883,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_THUNDERCOIN_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR|MF_GRENADEBOUNCE, // flags
MF_SOLID|MF_MONITOR|MF_GRENADEBOUNCE, // flags
S_NULL // raisestate
},
@ -6910,7 +6910,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_RING_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},
@ -6937,7 +6937,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
MT_RING_ICON, // damage
sfx_None, // activesound
MF_SOLID|MF_SHOOTABLE|MF_MONITOR, // flags
MF_SOLID|MF_MONITOR, // flags
S_NULL // raisestate
},

View file

@ -2744,7 +2744,7 @@ void A_GoldMonitorRestore(mobj_t *actor)
return;
#endif
actor->flags |= MF_MONITOR|MF_SHOOTABLE;
actor->flags |= MF_MONITOR|(mobjinfo[actor->type].flags & MF_SHOOTABLE);
actor->flags2 &= ~MF2_STANDONME;
actor->health = 1; // Just in case.
}

View file

@ -2907,14 +2907,14 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (!force)
{
if (!(target->flags & MF_SHOOTABLE))
if (!(target->flags & (MF_SHOOTABLE|MF_MONITOR)))
return false; // shouldn't happen...
if (target->type == MT_BLACKEGGMAN)
return false;
// Make sure that boxes cannot be popped by enemies, red rings, etc.
if (target->flags & MF_MONITOR && ((!source || !source->player || source->player->bot) || (inflictor && !inflictor->player)))
if (!(target->flags & MF_SHOOTABLE) && ((!source || !source->player || source->player->bot) || (inflictor && !inflictor->player)))
return false;
}

View file

@ -3357,9 +3357,6 @@ static boolean PIT_RadiusAttack(mobj_t *thing)
if (thing->flags & MF_BOSS)
return true;
if (thing->flags & MF_MONITOR)
return true;
dx = abs(thing->x - bombspot->x);
dy = abs(thing->y - bombspot->y);
dz = abs(thing->z + (thing->height>>1) - bombspot->z);