- refactored global sides array to be more VM friendly.

- moved FLevelLocals to its own header to resolve some circular include conflicts.
This commit is contained in:
Christoph Oelckers 2017-01-08 18:45:30 +01:00
commit cd7986b1b1
117 changed files with 354 additions and 251 deletions

View file

@ -72,6 +72,7 @@
#include "a_armor.h"
#include "a_ammo.h"
#include "a_health.h"
#include "g_levellocals.h"
// MACROS ------------------------------------------------------------------
@ -7539,6 +7540,22 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
return 0;
}
double AActor::GetBobOffset(double ticfrac) const
{
if (!(flags2 & MF2_FLOATBOB))
{
return 0;
}
return BobSin(FloatBobPhase + level.maptime + ticfrac);
}
DEFINE_ACTION_FUNCTION(AActor, GetBobOffset)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_FLOAT_DEF(frac);
ACTION_RETURN_FLOAT(self->GetBobOffset(frac));
}
@ -7639,13 +7656,6 @@ DEFINE_ACTION_FUNCTION(AActor, GetDefaultByType)
ACTION_RETURN_OBJECT(cls == nullptr? nullptr : GetDefaultByType(cls));
}
DEFINE_ACTION_FUNCTION(AActor, GetBobOffset)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_FLOAT_DEF(frac);
ACTION_RETURN_FLOAT(self->GetBobOffset(frac));
}
// This combines all 3 variations of the internal function
DEFINE_ACTION_FUNCTION(AActor, VelFromAngle)
{