Skip to content

Commit

Permalink
fix sim.brush being double size, fix compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Nov 21, 2018
1 parent 5a57c37 commit d0dd9ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lua/LuaScriptInterface.cpp
Expand Up @@ -1936,9 +1936,9 @@ int LuaScriptInterface::simulation_brush(lua_State * l)
}
else
{
ui::Point size = luacon_model->GetBrush()->GetSize();
brushradiusX = size.X;
brushradiusY = size.Y;
ui::Point radius = luacon_model->GetBrush()->GetRadius();
brushradiusX = radius.X;
brushradiusY = radius.Y;
}
int brushID = luaL_optint(l, 5, luacon_model->GetBrushID());

Expand Down
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -5143,7 +5143,7 @@ void Simulation::CheckStacking()
excessive_stacking_found = 1;
}
}
else if (pmap_count[y][x]>1500 || (random_gen()%1600) <= (pmap_count[y][x]+100))
else if (pmap_count[y][x]>1500 || (unsigned int)RNG::Ref().between(0, 1599) <= (pmap_count[y][x]+100))
{
pmap_count[y][x] = pmap_count[y][x] + NPART;
excessive_stacking_found = true;
Expand Down

0 comments on commit d0dd9ec

Please sign in to comment.