mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
Pushables that are also vulnerable no longer block crushers (because they die anyway). This allows us to make TNT barrels pushable again.
This commit is contained in:
parent
98ea229680
commit
4d0b0f84b1
2 changed files with 6 additions and 4 deletions
|
@ -11619,7 +11619,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
100, // mass
|
||||
0, // damage
|
||||
sfx_s3k8d, // activesound
|
||||
MF_SOLID|MF_SHOOTABLE|MF_ENEMY, // flags
|
||||
MF_SOLID|MF_SHOOTABLE|MF_ENEMY|MF_PUSHABLE, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
|
@ -3894,6 +3894,8 @@ static boolean nofit;
|
|||
static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
||||
{
|
||||
mobj_t *killer = NULL;
|
||||
//If a thing is both pushable and vulnerable, it doesn't block the crusher because it gets killed.
|
||||
boolean immunepushable = ((thing->flags & (MF_PUSHABLE | MF_SHOOTABLE)) == MF_PUSHABLE);
|
||||
|
||||
if (P_ThingHeightClip(thing))
|
||||
{
|
||||
|
@ -3912,7 +3914,7 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
|||
// just be blocked by another object - check if it's really a ceiling!
|
||||
if (thing->z + thing->height > thing->ceilingz && thing->z <= thing->ceilingz)
|
||||
{
|
||||
if (thing->flags & MF_PUSHABLE && thing->z + thing->height > thing->subsector->sector->ceilingheight)
|
||||
if (immunepushable && thing->z + thing->height > thing->subsector->sector->ceilingheight)
|
||||
{
|
||||
//Thing is a pushable and blocks the moving ceiling
|
||||
nofit = true;
|
||||
|
@ -3920,7 +3922,7 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
|||
}
|
||||
|
||||
//Check FOFs in the sector
|
||||
if (thing->subsector->sector->ffloors && (realcrush || thing->flags & MF_PUSHABLE))
|
||||
if (thing->subsector->sector->ffloors && (realcrush || immunepushable))
|
||||
{
|
||||
ffloor_t *rover;
|
||||
fixed_t topheight, bottomheight;
|
||||
|
@ -3947,7 +3949,7 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
|||
delta2 = thingtop - (bottomheight + topheight)/2;
|
||||
if (bottomheight <= thing->ceilingz && abs(delta1) >= abs(delta2))
|
||||
{
|
||||
if (thing->flags & MF_PUSHABLE)
|
||||
if (immunepushable)
|
||||
{
|
||||
//FOF is blocked by pushable
|
||||
nofit = true;
|
||||
|
|
Loading…
Reference in a new issue