diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-01-22 20:08:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-01-22 20:08:50 (GMT) |
| commit | 527a7a1ca6e1413ddf0ea27fe0fc60c4e9a060ca (patch) | |
| tree | 2f87d6ced8b714e18a52293d4126333b1e3cc42f /src/cat/LegacyLuaAPI.cpp | |
| parent | f1e51ba9bc4d67f1fd4698290e546e0c98082ca9 (diff) | |
| parent | 392271a2692a2b764ae346e1f6ec70c1cb4277b7 (diff) | |
| download | powder-527a7a1ca6e1413ddf0ea27fe0fc60c4e9a060ca.zip powder-527a7a1ca6e1413ddf0ea27fe0fc60c4e9a060ca.tar.gz | |
Merge branch 'master' of https://github.com/FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/cat/LegacyLuaAPI.cpp')
| -rw-r--r-- | src/cat/LegacyLuaAPI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp index 951a707..5492e2e 100644 --- a/src/cat/LegacyLuaAPI.cpp +++ b/src/cat/LegacyLuaAPI.cpp @@ -1010,7 +1010,7 @@ int luatpt_set_property(lua_State* l) } else { t = luaL_optint(l, 2, 0); } - if (format == CommandInterface::FormatInt && (t<0 || t>=PT_NUM || !luacon_sim->elements[t].Enabled)) + if (!strcmp(prop,"type") && (t<0 || t>=PT_NUM || !luacon_sim->elements[t].Enabled)) return luaL_error(l, "Unrecognised element number '%d'", t); } else { name = (char*)luaL_optstring(l, 2, "dust"); @@ -1702,7 +1702,7 @@ int luatpt_heat(lua_State* l) int luatpt_cmode_set(lua_State* l) { - int cmode = luaL_optint(l, 1, 0); + int cmode = luaL_optint(l, 1, 0)+1; if (cmode >= 0 && cmode <= 10) luacon_controller->LoadRenderPreset(cmode); else |
