MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / IsTileOccupied

Function IsTileOccupied

Source/engine/path.cpp:346–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346bool IsTileOccupied(Point position)
347{
348 if (!InDungeonBounds(position)) {
349 return true; // OOB positions are considered occupied.
350 }
351
352 if (IsTileSolid(position)) {
353 return true;
354 }
355 if (dMonster[position.x][position.y] != 0) {
356 return true;
357 }
358 if (dPlayer[position.x][position.y] != 0) {
359 return true;
360 }
361 if (IsObjectAtPosition(position)) {
362 return true;
363 }
364
365 return false;
366}
367
368int FindPath(tl::function_ref<bool(Point)> posOk, Point startPosition, Point destinationPosition, int8_t path[MaxPathLength])
369{

Callers 3

CanPlaceMonsterFunction · 0.85
AddGolemFunction · 0.85
ProcessHorkSpawnFunction · 0.85

Calls 3

InDungeonBoundsFunction · 0.85
IsTileSolidFunction · 0.85
IsObjectAtPositionFunction · 0.85

Tested by

no test coverage detected