summaryrefslogtreecommitdiffstats
path: root/source/cPlugin_NewLua.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-01 23:31:20 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-01 23:31:20 +0200
commit63bd1976ccab084a36ea9a22b84af64c824d5437 (patch)
tree603445a24f7731eb1d1465ad2bbad3822a657504 /source/cPlugin_NewLua.cpp
parentImplemented: http://www.mc-server.org/support/index.php?do=details&task_id=239&project=2&dev=26 (diff)
downloadcuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar.gz
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar.bz2
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar.lz
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar.xz
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.tar.zst
cuberite-63bd1976ccab084a36ea9a22b84af64c824d5437.zip
Diffstat (limited to 'source/cPlugin_NewLua.cpp')
-rw-r--r--source/cPlugin_NewLua.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/cPlugin_NewLua.cpp b/source/cPlugin_NewLua.cpp
index 7341a572b..dea74540b 100644
--- a/source/cPlugin_NewLua.cpp
+++ b/source/cPlugin_NewLua.cpp
@@ -555,7 +555,8 @@ bool cPlugin_NewLua::OnWeatherChanged(cWorld * a_World)
bool cPlugin_NewLua::OnUpdatingSign(
cWorld * a_World,
int a_BlockX, int a_BlockY, int a_BlockZ,
- AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4
+ AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4,
+ cPlayer * a_Player
)
{
cCSLock Lock(m_CriticalSection);
@@ -572,8 +573,9 @@ bool cPlugin_NewLua::OnUpdatingSign(
tolua_pushstring (m_LuaState, a_Line2.c_str());
tolua_pushstring (m_LuaState, a_Line3.c_str());
tolua_pushstring (m_LuaState, a_Line4.c_str());
+ tolua_pushusertype(m_LuaState, (void *)a_Player, "cPlayer");
- if (!CallFunction(8, 5, "OnUpdatingSign"))
+ if (!CallFunction(9, 5, "OnUpdatingSign"))
{
return false;
}
@@ -605,7 +607,8 @@ bool cPlugin_NewLua::OnUpdatingSign(
bool cPlugin_NewLua::OnUpdatedSign(
cWorld * a_World,
int a_BlockX, int a_BlockY, int a_BlockZ,
- const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4
+ const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4,
+ cPlayer * a_Player
)
{
cCSLock Lock(m_CriticalSection);
@@ -622,8 +625,9 @@ bool cPlugin_NewLua::OnUpdatedSign(
tolua_pushstring (m_LuaState, a_Line2.c_str());
tolua_pushstring (m_LuaState, a_Line3.c_str());
tolua_pushstring (m_LuaState, a_Line4.c_str());
+ tolua_pushusertype(m_LuaState, (void *)a_Player, "cPlayer");
- if (!CallFunction(8, 1, "OnUpdatedSign"))
+ if (!CallFunction(9, 1, "OnUpdatedSign"))
{
return false;
}