Skip to content

Commit

Permalink
fix wind line from lua changing brush size, allow setting wind tool s…
Browse files Browse the repository at this point in the history
…trength
  • Loading branch information
jacob1 committed Sep 29, 2015
1 parent 0a907c5 commit 1f7b6a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lua/LuaScriptInterface.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 1f7b6a6

Please sign in to comment.