summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-23 21:48:21 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-23 21:48:21 (GMT)
commitc5eecff13133bc20987ddc0a52bf133f4dd83d06 (patch)
treecb3004debae4be382af56ec6e0113d7ef2aba717 /src/cat/LuaScriptInterface.cpp
parent7475a49e0b736cd9d710a674bd25dc20bc90e342 (diff)
downloadpowder-c5eecff13133bc20987ddc0a52bf133f4dd83d06.zip
powder-c5eecff13133bc20987ddc0a52bf133f4dd83d06.tar.gz
fix "i" argument to graphics functions.
Also, they don't overwrite the default one, you can pass in nil to tpt.element/graphics_func for the function to restore the original.
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index d24dc85..e4bf3c2 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -315,6 +315,7 @@ tpt.partsdata = nil");
for(i = 0; i < PT_NUM; i++)
{
lua_el_mode[i] = 0;
+ lua_gr_func[i] = 0;
}
}
@@ -1163,7 +1164,6 @@ int LuaScriptInterface::elements_element(lua_State * l)
if(lua_type(l, -1) == LUA_TFUNCTION)
{
lua_gr_func[id] = luaL_ref(l, LUA_REGISTRYINDEX);
- luacon_sim->elements[id].Graphics = &luacon_graphicsReplacement;
}
else if(lua_type(l, -1) == LUA_TBOOLEAN && !lua_toboolean(l, -1))
{
@@ -1332,7 +1332,6 @@ int LuaScriptInterface::elements_property(lua_State * l)
{
lua_pushvalue(l, 3);
lua_gr_func[id] = luaL_ref(l, LUA_REGISTRYINDEX);
- luacon_sim->elements[id].Graphics = &luacon_graphicsReplacement;
}
else if(lua_type(l, 3) == LUA_TBOOLEAN && !lua_toboolean(l, -1))
{