Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually work
git-svn-id: http://mc-server.googlecode.com/svn/trunk@610 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -508,6 +508,29 @@ bool cPlugin_NewLua::OnBlockToPickup(
|
||||
|
||||
|
||||
|
||||
bool cPlugin_NewLua::OnWeatherChanged(cWorld * a_World)
|
||||
{
|
||||
cCSLock Lock(m_CriticalSection);
|
||||
if (!PushFunction("OnWeatherChanged"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
tolua_pushusertype(m_LuaState, (void *)a_World, "cWorld");
|
||||
|
||||
if (!CallFunction(1, 1, "OnWeatherChanged"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bRetVal = (tolua_toboolean( m_LuaState, -1, 0) > 0);
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cWebPlugin_Lua* cPlugin_NewLua::CreateWebPlugin(lua_State* a_LuaState)
|
||||
{
|
||||
cCSLock Lock( m_CriticalSection );
|
||||
|
||||
Reference in New Issue
Block a user