Use Direction type in a bunch of the pathfinding code

This commit is contained in:
Richard Fine committed 2019-09-01 18:38:03 +01:00
1 parent 06b2f66ba1
commit 6449393d50
4 files changed
+36 -36

No files matched your search

+2 -2
View File
@@ -83,8 +83,8 @@ protected:
// Pick the direction the peep should initially move in, given the goal position.
// This will also store the goal position and initialize pathfinding data for the peep.
gPeepPathFindGoalPosition = goal;
const int32_t moveDir = peep_pathfind_choose_direction(*pos, peep);
if (moveDir < 0)
const Direction moveDir = peep_pathfind_choose_direction(*pos, peep);
if (moveDir == INVALID_DIRECTION)
{
// Couldn't determine a direction to move off in
return false;