From 37276a4430e26f5b3ab56e07d5f30a194f75982e Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 1 Jul 2013 10:39:56 +0000 Subject: Rewritten entity-on-fire management ("forever on fire" bugs) Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Plugin_NewLua.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/Plugin_NewLua.cpp') diff --git a/source/Plugin_NewLua.cpp b/source/Plugin_NewLua.cpp index 1e4a6a94a..c79106761 100644 --- a/source/Plugin_NewLua.cpp +++ b/source/Plugin_NewLua.cpp @@ -549,7 +549,7 @@ bool cPlugin_NewLua::OnHandshake(cClientHandle * a_Client, const AString & a_Use -bool cPlugin_NewLua::OnKilling(cPawn & a_Victim, cEntity * a_Killer) +bool cPlugin_NewLua::OnKilling(cEntity & a_Victim, cEntity * a_Killer) { cCSLock Lock(m_CriticalSection); const char * FnName = GetHookFnName(cPluginManager::HOOK_KILLING); @@ -559,7 +559,7 @@ bool cPlugin_NewLua::OnKilling(cPawn & a_Victim, cEntity * a_Killer) return false; } - tolua_pushusertype(m_LuaState, &a_Victim, "cPawn"); + tolua_pushusertype(m_LuaState, &a_Victim, "cEntity"); tolua_pushusertype(m_LuaState, a_Killer, "cEntity"); if (!CallFunction(2, 1, FnName)) @@ -1150,7 +1150,7 @@ bool cPlugin_NewLua::OnPreCrafting(const cPlayer * a_Player, const cCraftingGrid -bool cPlugin_NewLua::OnTakeDamage(cPawn & a_Receiver, TakeDamageInfo & a_TDI) +bool cPlugin_NewLua::OnTakeDamage(cEntity & a_Receiver, TakeDamageInfo & a_TDI) { cCSLock Lock(m_CriticalSection); const char * FnName = GetHookFnName(cPluginManager::HOOK_TAKE_DAMAGE); @@ -1160,7 +1160,7 @@ bool cPlugin_NewLua::OnTakeDamage(cPawn & a_Receiver, TakeDamageInfo & a_TDI) return false; } - tolua_pushusertype(m_LuaState, &a_Receiver, "cPawn"); + tolua_pushusertype(m_LuaState, &a_Receiver, "cEntity"); tolua_pushusertype(m_LuaState, &a_TDI, "TakeDamageInfo"); if (!CallFunction(2, 1, FnName)) -- cgit v1.2.3