- rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.

This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.
This commit is contained in:
Christoph Oelckers 2019-01-01 19:35:55 +01:00
commit d654e02dea
34 changed files with 438 additions and 412 deletions

View file

@ -38,6 +38,7 @@
#include <type_traits>
#include "doomtype.h"
#include "i_system.h"
#include "vectors.h"
class PClass;
class PType;
@ -238,6 +239,7 @@ public:
inline PalEntry &ColorVar(FName field);
inline FName &NameVar(FName field);
inline double &FloatVar(FName field);
inline DAngle &AngleVar(FName field);
inline FString &StringVar(FName field);
template<class T> T*& PointerVar(FName field);
@ -456,6 +458,11 @@ inline double &DObject::FloatVar(FName field)
return *(double*)ScriptVar(field, nullptr);
}
inline DAngle &DObject::AngleVar(FName field)
{
return *(DAngle*)ScriptVar(field, nullptr);
}
template<class T>
inline T *&DObject::PointerVar(FName field)
{