mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 23:52:02 +00:00
- added MF6_RELATIVETOFLOOR flag.
This commit is contained in:
parent
211d293002
commit
25ec3fb8fe
3 changed files with 33 additions and 13 deletions
|
@ -332,6 +332,7 @@ enum
|
||||||
MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove
|
MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove
|
||||||
MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim.
|
MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim.
|
||||||
MF6_NOTONAUTOMAP = 0x40000000, // will not be shown on automap with the 'scanner' powerup.
|
MF6_NOTONAUTOMAP = 0x40000000, // will not be shown on automap with the 'scanner' powerup.
|
||||||
|
MF6_RELATIVETOFLOOR = 0x80000000, // [RC] Make flying actors be affected by lifts.
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
||||||
|
|
|
@ -5047,6 +5047,15 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((thing->z != oldfloorz && !(thing->flags & MF_NOLIFTDROP)))
|
||||||
|
{
|
||||||
|
fixed_t oldz = thing->z;
|
||||||
|
if ((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
|
||||||
|
{
|
||||||
|
thing->z = thing->z - oldfloorz + thing->floorz;
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -5058,6 +5067,7 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
|
||||||
void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
||||||
{
|
{
|
||||||
fixed_t oldfloorz = thing->floorz;
|
fixed_t oldfloorz = thing->floorz;
|
||||||
|
fixed_t oldz = thing->z;
|
||||||
|
|
||||||
P_AdjustFloorCeil (thing, cpos);
|
P_AdjustFloorCeil (thing, cpos);
|
||||||
|
|
||||||
|
@ -5072,22 +5082,30 @@ void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
||||||
return; // do not move bridge things
|
return; // do not move bridge things
|
||||||
}
|
}
|
||||||
intersectors.Clear ();
|
intersectors.Clear ();
|
||||||
fixed_t oldz = thing->z;
|
|
||||||
thing->z = thing->floorz;
|
thing->z = thing->floorz;
|
||||||
switch (P_PushUp (thing, cpos))
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
|
||||||
{
|
{
|
||||||
default:
|
intersectors.Clear ();
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
thing->z = thing->z - oldfloorz + thing->floorz;
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
P_DoCrunch (thing, cpos);
|
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
P_DoCrunch (thing, cpos);
|
|
||||||
thing->z = oldz;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else return;
|
||||||
|
}
|
||||||
|
switch (P_PushUp (thing, cpos))
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
P_DoCrunch (thing, cpos);
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
P_DoCrunch (thing, cpos);
|
||||||
|
thing->z = oldz;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,7 @@ static FFlagDef ActorFlags[]=
|
||||||
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
|
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6),
|
DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, NOTONAUTOMAP, AActor, flags6),
|
DEFINE_FLAG(MF6, NOTONAUTOMAP, AActor, flags6),
|
||||||
|
DEFINE_FLAG(MF6, RELATIVETOFLOOR, AActor, flags6),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
|
Loading…
Reference in a new issue