diff options
| author | jacob1 <jfu614@gmail.com> | 2013-07-12 02:43:36 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-07-12 02:43:36 (GMT) |
| commit | a06202c78f392db833733d621974af1edcdb1cec (patch) | |
| tree | 14448710c9699662ca0ca72acb187c18dd1dc6ee /src/cat/LuaScriptInterface.cpp | |
| parent | 4f5c4536439dc546c6ea0a7aadbeb9e481cf8031 (diff) | |
| download | powder-a06202c78f392db833733d621974af1edcdb1cec.zip powder-a06202c78f392db833733d621974af1edcdb1cec.tar.gz | |
fixes to wall and particle floodfill. Wall fill ignores particles and always goes to the edges, while particle fill will only ignore walls it can't exist in, and flood particle erase won't check for walls / edges at all
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
| -rw-r--r-- | src/cat/LuaScriptInterface.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 1653e28..2657456 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1033,9 +1033,8 @@ int LuaScriptInterface::simulation_floodParts(lua_State * l) int y = luaL_optint(l,2,-1); int c = luaL_optint(l,3,luacon_model->GetActiveTool(0)->GetToolID()); int cm = luaL_optint(l,4,-1); - int bm = luaL_optint(l,5,-1); - int flags = luaL_optint(l,6,luacon_sim->replaceModeFlags); - int ret = luacon_sim->FloodParts(x, y, c, cm, bm, flags); + int flags = luaL_optint(l,5,luacon_sim->replaceModeFlags); + int ret = luacon_sim->FloodParts(x, y, c, cm, flags); lua_pushinteger(l, ret); return 1; } @@ -1093,12 +1092,11 @@ int LuaScriptInterface::simulation_floodWalls(lua_State * l) int x = luaL_optint(l,1,-1); int y = luaL_optint(l,2,-1); int c = luaL_optint(l,3,8); - int cm = luaL_optint(l,4,-1); - int bm = luaL_optint(l,5,-1); - int flags = luaL_optint(l,6,luacon_sim->replaceModeFlags); + int bm = luaL_optint(l,4,-1); + int flags = luaL_optint(l,5,luacon_sim->replaceModeFlags); if (c < 0 || c >= UI_WALLCOUNT) return luaL_error(l, "Unrecognised wall id '%d'", c); - int ret = luacon_sim->FloodWalls(x, y, c, cm, bm, flags); + int ret = luacon_sim->FloodWalls(x, y, c, bm, flags); lua_pushinteger(l, ret); return 1; } |
