| 131 | } |
| 132 | |
| 133 | df::coord simulate_area_fall(const df::coord &pos) { |
| 134 | df::coord neighbours[8]{}; |
| 135 | get_neighbours(pos, neighbours); |
| 136 | df::coord lowest = simulate_fall(pos); |
| 137 | for (auto p : neighbours) { |
| 138 | if unlikely(!Maps::isValidTilePos(p)) continue; |
| 139 | auto nlow = simulate_fall(p); |
| 140 | if (nlow.z < lowest.z) { |
| 141 | lowest = nlow; |
| 142 | } |
| 143 | } |
| 144 | return lowest; |
| 145 | } |
| 146 | |
| 147 | namespace CSP { |
| 148 | std::unordered_map<df::unit*, int32_t> endangered_units; |
no test coverage detected