mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'ambush-fix' into 'next'
Re-add code that sets MF2_AMBUSH if MTF_AMBUSH is set, but only for binary maps Closes #958 See merge request STJr/SRB2!1937
This commit is contained in:
commit
171f5ac21c
1 changed files with 20 additions and 0 deletions
20
src/p_mobj.c
20
src/p_mobj.c
|
@ -13280,6 +13280,23 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
return true;
|
||||
}
|
||||
|
||||
// Pre-UDMF backwards compatibility stuff. Remove for 2.3
|
||||
static void P_SetAmbush(mapthing_t *mthing, mobj_t *mobj)
|
||||
{
|
||||
if (mobj->type == MT_NIGHTSBUMPER
|
||||
|| mobj->type == MT_AXIS
|
||||
|| mobj->type == MT_AXISTRANSFER
|
||||
|| mobj->type == MT_AXISTRANSFERLINE
|
||||
|| mobj->type == MT_NIGHTSBUMPER
|
||||
|| mobj->type == MT_STARPOST)
|
||||
return;
|
||||
|
||||
if ((mthing->options & MTF_OBJECTSPECIAL) && (mobj->flags & MF_PUSHABLE))
|
||||
return;
|
||||
|
||||
mobj->flags2 |= MF2_AMBUSH;
|
||||
}
|
||||
|
||||
static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y, fixed_t z, mobjtype_t i)
|
||||
{
|
||||
mobj_t *mobj = NULL;
|
||||
|
@ -13302,6 +13319,9 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
|
|||
|
||||
mthing->mobj = mobj;
|
||||
|
||||
if (!udmf && (mthing->options & MTF_AMBUSH))
|
||||
P_SetAmbush(mthing, mobj);
|
||||
|
||||
// Generic reverse gravity for individual objects flag.
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue