diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-16 23:36:41 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-16 23:36:41 (GMT) |
| commit | fd97e923f3f8409346723a9924761c9e21bb79d3 (patch) | |
| tree | 8cdd033b87e6548b77c9f57fc00fcad9fbad1fcf /src/cat/LuaScriptInterface.cpp | |
| parent | 027649e85894b688d271d9b736d5ca204304de29 (diff) | |
| download | powder-fd97e923f3f8409346723a9924761c9e21bb79d3.zip powder-fd97e923f3f8409346723a9924761c9e21bb79d3.tar.gz | |
remove check in deco tools (that shouldn't be there)
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
| -rw-r--r-- | src/cat/LuaScriptInterface.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index f9239f9..f257636 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1155,8 +1155,6 @@ int LuaScriptInterface::simulation_decoBrush(lua_State * l) int a = luaL_optint(l,8,255); int tool = luaL_optint(l,9,DECO_DRAW); int brush = luaL_optint(l,10,CIRCLE_BRUSH); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); vector<Brush*> brushList = luacon_model->GetBrushList(); if (brush < 0 || brush >= brushList.size()) @@ -1183,8 +1181,6 @@ int LuaScriptInterface::simulation_decoLine(lua_State * l) int a = luaL_optint(l,10,255); int tool = luaL_optint(l,11,DECO_DRAW); int brush = luaL_optint(l,12,CIRCLE_BRUSH); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); vector<Brush*> brushList = luacon_model->GetBrushList(); if (brush < 0 || brush >= brushList.size()) @@ -1210,8 +1206,6 @@ int LuaScriptInterface::simulation_decoBox(lua_State * l) int b = luaL_optint(l,9,255); int a = luaL_optint(l,10,255); int tool = luaL_optint(l,11,0); - if (tool < 0 || tool >= luacon_sim->tools.size()) - return luaL_error(l, "Invalid tool id '%d'", tool); luacon_sim->ApplyDecorationBox(x1, y1, x2, y2, r, g, b, a, tool); return 0; |
