summaryrefslogtreecommitdiff
path: root/src/luaconsole.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-08-08 09:17:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-08 09:17:58 (GMT)
commitfdf4ee7c95099effa4c52319b0a2ab6af547574c (patch)
tree5b97f161a7fe09471970ea4fe00b817ab88c888f /src/luaconsole.c
parent11d3cb0dd56ddc7df49570e41c3f8f9f01d872d1 (diff)
parent39e1ffe5bf64c29e81ecf8779dfbbe41bb5173d5 (diff)
downloadpowder-fdf4ee7c95099effa4c52319b0a2ab6af547574c.zip
powder-fdf4ee7c95099effa4c52319b0a2ab6af547574c.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/luaconsole.c')
-rw-r--r--src/luaconsole.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index 5209689..dac25ea 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -437,6 +437,9 @@ int luatpt_set_property(lua_State* l)
} else if (strcmp(prop,"tmp")==0){
offset = offsetof(particle, tmp);
format = 1;
+ } else if (strcmp(prop,"tmp2")==0){
+ offset = offsetof(particle, tmp2);
+ format = 1;
} else if (strcmp(prop,"vy")==0){
offset = offsetof(particle, vy);
format = 2;
@@ -577,6 +580,10 @@ int luatpt_get_property(lua_State* l)
lua_pushinteger(l, parts[i].tmp);
return 1;
}
+ if (strcmp(prop,"tmp2")==0){
+ lua_pushinteger(l, parts[i].tmp2);
+ return 1;
+ }
if (strcmp(prop,"vy")==0){
lua_pushnumber(l, (double)parts[i].vy);
return 1;
@@ -1004,8 +1011,8 @@ int luatpt_airheat(lua_State* l)
int luatpt_active_menu(lua_State* l)
{
int menuid;
- menuid = luaL_optint(l, 1, 0);
- if (menuid < SC_TOTAL && menuid > 0)
+ menuid = luaL_optint(l, 1, -1);
+ if (menuid < SC_TOTAL && menuid >= 0)
active_menu = menuid;
else
return luaL_error(l, "Invalid menu");