News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

BUG: field's height can be changed unlimitedly

Started by poppo, Today at 02:29:12 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

poppo

in tool_setslope_t, we check the height differences from the adjacent tiles. But the tile with field of factory, this check was skipped:
// check, if action is valid ...
const sint16 hgt=new_pos.z;
// maximum difference check with tiles to north, south east and west
const sint8 test_hgt = hgt+(new_slope!=0);

- if(  gr1->get_typ()==grund_t::boden  ) {
+ if(  gr1->get_typ()==grund_t::boden  ||  gr1->get_typ()==grund_t::fundament  ) {
for(  sint16 i = 0 ;  i < 4 ;  i++  ) {
const koord neighbour = k + koord::nesw[i];
grund_t::fundament means there is a building or fields, but in building case, returned early.