mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Added the QF_GROUNDONLY flag.
The QF_GROUNDONLY flag makes earthquakes only shake the player while they are standing on the ground.
This commit is contained in:
parent
7722784de6
commit
05a5a4be51
3 changed files with 3 additions and 1 deletions
|
@ -113,6 +113,7 @@ enum
|
||||||
QF_FULLINTENSITY = 1 << 4,
|
QF_FULLINTENSITY = 1 << 4,
|
||||||
QF_WAVE = 1 << 5,
|
QF_WAVE = 1 << 5,
|
||||||
QF_3D = 1 << 6,
|
QF_3D = 1 << 6,
|
||||||
|
QF_GROUNDONLY = 1 << 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FQuakeJiggers
|
struct FQuakeJiggers
|
||||||
|
|
|
@ -295,7 +295,7 @@ int DEarthquake::StaticGetQuakeIntensities(double ticFrac, AActor *victim, FQuak
|
||||||
|
|
||||||
while ( (quake = iterator.Next()) != nullptr)
|
while ( (quake = iterator.Next()) != nullptr)
|
||||||
{
|
{
|
||||||
if (quake->m_Spot != nullptr)
|
if (quake->m_Spot != nullptr && !(quake->m_Flags & QF_GROUNDONLY && victim->Z() > victim->floorz))
|
||||||
{
|
{
|
||||||
double dist;
|
double dist;
|
||||||
|
|
||||||
|
|
|
@ -643,6 +643,7 @@ enum EQuakeFlags
|
||||||
QF_FULLINTENSITY = 1 << 4,
|
QF_FULLINTENSITY = 1 << 4,
|
||||||
QF_WAVE = 1 << 5,
|
QF_WAVE = 1 << 5,
|
||||||
QF_3D = 1 << 6,
|
QF_3D = 1 << 6,
|
||||||
|
QF_GROUNDONLY = 1 << 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
// A_CheckProximity flags
|
// A_CheckProximity flags
|
||||||
|
|
Loading…
Reference in a new issue