From 2383016b1d673fcf0ad69a08bba62d7ce36cdd76 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 30 Nov 2013 14:22:26 +0100 Subject: Added the real tick duration to the OnWorldTick hook. --- src/LuaState.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/LuaState.h') diff --git a/src/LuaState.h b/src/LuaState.h index 5e7f3d180..15b0cdeff 100644 --- a/src/LuaState.h +++ b/src/LuaState.h @@ -224,6 +224,22 @@ public: return CallFunction(0); } + /// Call any 3-param 0-return Lua function in a single line: + template< + typename FnT, typename ArgT1, typename ArgT2, typename ArgT3 + > + bool Call(FnT a_FnName, ArgT1 a_Arg1, ArgT2 a_Arg2, ArgT3 a_Arg3) + { + if (!PushFunction(a_FnName)) + { + return false; + } + Push(a_Arg1); + Push(a_Arg2); + Push(a_Arg3); + return CallFunction(0); + } + /// Call any 1-param 1-return Lua function in a single line: template< typename FnT, typename ArgT1, typename RetT1 -- cgit v1.2.3