From 74b7f51b898575bacec52663e5e8601d6bfd36bd Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 19 Mar 2014 22:55:47 +0100 Subject: Errors in Lua don't include the error handler in the stack trace. Fixes #817. --- src/Bindings/LuaState.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index f5cb8379d..356a284e0 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -868,10 +868,10 @@ public: static bool ReportErrors(lua_State * a_LuaState, int status); /** Logs all items in the current stack trace to the server console */ - void LogStackTrace(void); + void LogStackTrace(int a_StartingDepth = 0); /** Logs all items in the current stack trace to the server console */ - static void LogStackTrace(lua_State * a_LuaState); + static void LogStackTrace(lua_State * a_LuaState, int a_StartingDepth = 0); /** Returns the type of the item on the specified position in the stack */ AString GetTypeText(int a_StackPos); -- cgit v1.2.3 From 964647a9006af475bea71272e313f3575cf4d37f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 20 Mar 2014 09:16:47 +0100 Subject: Made pushing plain pointer to Lua a valid operation, with a warning. This is used for exotic explosions, and the NORETURNDEBUG macro caused MSVC warnings across the entire cLuaState class (MSVC marked ALL Push() function overloads as non-returning) --- src/Bindings/LuaState.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 356a284e0..f0047b362 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -200,7 +200,7 @@ public: void Push(const HTTPTemplateRequest * a_Request); void Push(cTNTEntity * a_TNTEntity); void Push(Vector3i * a_Vector); - NORETURNDEBUG void Push(void * a_Ptr); + void Push(void * a_Ptr); void Push(cHopperEntity * a_Hopper); void Push(cBlockEntity * a_BlockEntity); -- cgit v1.2.3 From a6ef40cb6efa1b8da549c81c7e1137d523240c17 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 29 Mar 2014 15:43:03 +0100 Subject: Fixed error when the hook gets called. --- src/Bindings/LuaState.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index f0047b362..b9ca2f29b 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -38,6 +38,7 @@ extern "C" class cWorld; class cPlayer; class cEntity; +class cProjectileEntity; class cMonster; class cItem; class cItems; @@ -183,6 +184,7 @@ public: void Push(cPlayer * a_Player); void Push(const cPlayer * a_Player); void Push(cEntity * a_Entity); + void Push(cProjectileEntity * a_ProjectileEntity); void Push(cMonster * a_Monster); void Push(cItem * a_Item); void Push(cItems * a_Items); -- cgit v1.2.3