- move BobSin to game side.

This commit is contained in:
Christoph Oelckers 2022-09-04 09:01:57 +02:00
parent 8cba80a2cd
commit 175c91308a
3 changed files with 7 additions and 6 deletions

View file

@ -1366,12 +1366,6 @@ public:
} }
}; };
// Emulates the old floatbob offset table with direct calls to trig functions.
inline double BobSin(double fb)
{
return g_sindeg(double(fb * (180.0 / 32))) * 8;
}
template<class T> template<class T>
inline TAngle<T> fabs (const TAngle<T> &deg) inline TAngle<T> fabs (const TAngle<T> &deg)
{ {

View file

@ -49,6 +49,12 @@ inline double sector_t::LowestFloorAt(AActor *a, sector_t **resultsec)
return ::LowestFloorAt(this, a->X(), a->Y(), resultsec); return ::LowestFloorAt(this, a->X(), a->Y(), resultsec);
} }
// Emulates the old floatbob offset table with direct calls to trig functions.
inline double BobSin(double fb)
{
return g_sindeg(double(fb * (180.0 / 32))) * 8;
}
inline double AActor::GetBobOffset(double ticfrac) const inline double AActor::GetBobOffset(double ticfrac) const
{ {
if (!(flags2 & MF2_FLOATBOB)) if (!(flags2 & MF2_FLOATBOB))

View file

@ -41,6 +41,7 @@
#include "g_levellocals.h" #include "g_levellocals.h"
#include "vm.h" #include "vm.h"
#include "r_utility.h" #include "r_utility.h"
#include "actorinlines.h"
//========================================================================== //==========================================================================
// //