summaryrefslogtreecommitdiffstats
path: root/source/LuaCommandBinder.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-11 22:49:18 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-11 22:49:18 +0200
commit4eaafbd70f204d620d9211a672d28ec618c01d39 (patch)
treebbbee73574324a9eb1b334afe99c6ce09756eb11 /source/LuaCommandBinder.cpp
parentProtoProxy: Added the PACKET_COLLECT_PICKUP packet handling (diff)
downloadcuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar.gz
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar.bz2
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar.lz
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar.xz
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.tar.zst
cuberite-4eaafbd70f204d620d9211a672d28ec618c01d39.zip
Diffstat (limited to '')
-rw-r--r--source/LuaCommandBinder.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/source/LuaCommandBinder.cpp b/source/LuaCommandBinder.cpp
index a495a2954..7a65cab7f 100644
--- a/source/LuaCommandBinder.cpp
+++ b/source/LuaCommandBinder.cpp
@@ -81,12 +81,6 @@ bool cLuaCommandBinder::HandleCommand( const std::string & a_Command, cPlayer* a
}
}
- // For enabling 'self' in the function, it's kind of a hack I'm not sure this is the way to go
- lua_pushvalue(func.LuaState, LUA_GLOBALSINDEX);
- lua_pushstring(func.LuaState, "self");
- tolua_pushusertype( func.LuaState, func.Plugin, "cPlugin" );
- lua_rawset(func.LuaState, -3);
- lua_pop(func.LuaState, 1);
LOGD("1. Stack size: %i", lua_gettop(func.LuaState) );
lua_rawgeti( func.LuaState, LUA_REGISTRYINDEX, func.Reference); // same as lua_getref()