| 131 | } |
| 132 | |
| 133 | bool Tile::getHasExit(bool large) |
| 134 | { |
| 135 | if (large) |
| 136 | { |
| 137 | if (position.x < 1 || position.y < 1) |
| 138 | { |
| 139 | LogError("Trying to get exit for a large unit when it can't fit! %d, %d, %d", |
| 140 | position.x, position.y, position.z); |
| 141 | return false; |
| 142 | } |
| 143 | if (hasExit || map.getTile(position.x - 1, position.y, position.z)->hasExit || |
| 144 | map.getTile(position.x, position.y - 1, position.z)->hasExit || |
| 145 | map.getTile(position.x - 1, position.y - 1, position.z)->hasExit) |
| 146 | { |
| 147 | return true; |
| 148 | } |
| 149 | } |
| 150 | else |
| 151 | { |
| 152 | if (hasExit) |
| 153 | { |
| 154 | return true; |
| 155 | } |
| 156 | } |
| 157 | return false; |
| 158 | } |
| 159 | |
| 160 | bool Tile::getPassable(bool large, int height) |
| 161 | { |