MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / dequeuePath

Method dequeuePath

src/Battlescape/Pathfinding.cpp:532–538  ·  view source on GitHub ↗

* Dequeues the next path direction. Ie returns the direction and removes it from queue. * @return Direction where the unit needs to go next, -1 if it's the end of the path. */

Source from the content-addressed store, hash-verified

530 * @return Direction where the unit needs to go next, -1 if it's the end of the path.
531 */
532int Pathfinding::dequeuePath()
533{
534 if (_path.empty()) return -1;
535 int last_element = _path.back();
536 _path.pop_back();
537 return last_element;
538}
539
540/**
541 * Aborts the current path. Clears the path vector.

Callers 2

wayPointActionMethod · 0.80
thinkMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected