Permalink
Browse files

fix wind line from lua changing brush size, allow setting wind tool s…

…trength
  • Loading branch information...
jacob1 committed Sep 29, 2015
1 parent 0a907c5 commit 1f7b6a6bb40cb3367affe1013479812ba818f1a9
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/lua/LuaScriptInterface.cpp
@@ -1434,9 +1434,11 @@ int LuaScriptInterface::simulation_toolLine(lua_State * l)
if (tool == (int)luacon_sim->tools.size())
{
Tool *WindTool = luacon_model->GetToolFromIdentifier("DEFAULT_UI_WIND");
WindTool->DrawLine(luacon_sim, brushList[brush], ui::Point(x1, y1), ui::Point(x2, y2));
return 1;
Tool *windTool = luacon_model->GetToolFromIdentifier("DEFAULT_UI_WIND");
float oldStrength = windTool->GetStrength();
windTool->SetStrength(strength);
windTool->DrawLine(luacon_sim, brushList[brush], ui::Point(x1, y1), ui::Point(x2, y2));
windTool->SetStrength(oldStrength);
}
else
luacon_sim->ToolLine(x1, y1, x2, y2, tool, brushList[brush], strength);

0 comments on commit 1f7b6a6

Please sign in to comment.