don't extend too far beyond ramps

and don't expand across mushroom tops -- they're not pathable
develop
Myk Taylor 2023-11-14 10:33:35 -08:00
parent 2a52011492
commit 8dccfae9bc
No known key found for this signature in database
1 changed files with 11 additions and 10 deletions

@ -520,8 +520,7 @@ static uint16_t get_walk_group(const df::coord & pos) {
}
static bool is_tree(const df::tiletype *tt) {
return tileMaterial(*tt) == tiletype_material::TREE ||
tileMaterial(*tt) == tiletype_material::MUSHROOM;
return tileMaterial(*tt) == tiletype_material::TREE;
}
// if the outside tile flag is set
@ -599,6 +598,7 @@ static void flood_fill(lua_State *L, bool enable) {
if (start_walk && start_walk != walk && tt && !is_tree(tt))
continue;
if (tt && tileShape(*tt) != df::tiletype_shape::RAMP_TOP) {
flood.emplace(pos.x-1, pos.y-1, pos.z);
flood.emplace(pos.x, pos.y-1, pos.z);
flood.emplace(pos.x+1, pos.y-1, pos.z);
@ -607,6 +607,7 @@ static void flood_fill(lua_State *L, bool enable) {
flood.emplace(pos.x-1, pos.y+1, pos.z);
flood.emplace(pos.x, pos.y+1, pos.z);
flood.emplace(pos.x+1, pos.y+1, pos.z);
}
if (!zlevel) {
df::coord pos_above = pos + df::coord(0, 0, 1);