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:
inkoalawetrust 2022-09-25 06:41:23 +03:00 committed by Christoph Oelckers
parent 7722784de6
commit 05a5a4be51
3 changed files with 3 additions and 1 deletions

View File

@ -113,6 +113,7 @@ enum
QF_FULLINTENSITY = 1 << 4,
QF_WAVE = 1 << 5,
QF_3D = 1 << 6,
QF_GROUNDONLY = 1 << 7,
};
struct FQuakeJiggers

View File

@ -295,7 +295,7 @@ int DEarthquake::StaticGetQuakeIntensities(double ticFrac, AActor *victim, FQuak
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;

View File

@ -643,6 +643,7 @@ enum EQuakeFlags
QF_FULLINTENSITY = 1 << 4,
QF_WAVE = 1 << 5,
QF_3D = 1 << 6,
QF_GROUNDONLY = 1 << 7,
};
// A_CheckProximity flags