fix sim.brush being double size, fix compile warning

This commit is contained in:
jacob1 2018-11-21 12:38:26 -05:00
parent 5a57c37ae9
commit d0dd9ec22f
2 changed files with 4 additions and 4 deletions

View File

@ -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());

View File

@ -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;