diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 1461d57052..99e0465ed1 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -101,6 +101,7 @@ void Actor::UnsubcribeAndClearCommands() Actor::Actor() { + m_pLuaInstance = new LuaClass; m_size = RageVector2( 1, 1 ); Reset(); m_bFirstUpdate = true; @@ -1336,7 +1337,7 @@ public: } }; -LUA_REGISTER_CLASS( Actor ) +LUA_REGISTER_INSTANCED_BASE_CLASS( Actor ) // lua end diff --git a/stepmania/src/Actor.h b/stepmania/src/Actor.h index bde414e3be..ec8e6b0808 100644 --- a/stepmania/src/Actor.h +++ b/stepmania/src/Actor.h @@ -4,12 +4,14 @@ #define ACTOR_H #include "RageTypes.h" +#include "RageUtil_AutoPtr.h" #include "ActorCommands.h" #include #include struct XNode; struct lua_State; class LuaReference; +class LuaClass; #include "MessageManager.h" @@ -333,6 +335,7 @@ public: // Lua // virtual void PushSelf( lua_State *L ); + HiddenPtr m_pLuaInstance; // // Commands