MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getHasExit

Method getHasExit

game/state/tilemap/tile.cpp:133–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133bool 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
160bool Tile::getPassable(bool large, int height)
161{

Callers 2

updateMethod · 0.80
orderMoveMethod · 0.80

Calls 1

getTileMethod · 0.80

Tested by

no test coverage detected