forkserf / forkserf

a continuation of "FreeSerf"

Home Page:https://forkserf.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't build houses here

zdechlak opened this issue · comments

forkserf.2023-01-19.22-57-49.mp4

icantbulid.zip

this is very interesting, I will try to reproduce, thank you

fixed in unstable, thank you for providing save and video to reproduce.

Cause was faulty logic in the effort to restore the original game behavior of disallowing buildings to be placed where their flag would touch water.

changed this:

Game::can_build_small(MapPos pos) const {
  // Freeserf was missing the original game check preventing buildings from being placed
  //  with its flag pos touching edge of water
  if (!map_types_within(map->move_down_right(pos), Map::TerrainGrass0, Map::TerrainGrass3)){
    return false;
  }

to this:

Game::can_build_small(MapPos pos) const {
  // Freeserf was missing the original game check preventing buildings from being placed
  //  with its flag pos touching edge of water
  if (!map_types_within(map->move_down_right(pos), Map::TerrainGrass0, Map::TerrainSnow1)){
    return false;
  }