From 307ebc38be500e13494505d7d4620ae584c31059 Mon Sep 17 00:00:00 2001 From: zaxcav Date: Fri, 2 Dec 2016 09:57:19 +0100 Subject: [PATCH] Fix initialisation of junctions added to pathfind_history. Fix initialisation of junctions added to pathfind_history. --- src/peep/peep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index 80d8947549..22c2c620e9 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -9715,7 +9715,7 @@ int peep_pathfind_choose_direction(sint16 x, sint16 y, uint8 z, rct_peep *peep) peep->pathfind_history[i].x = x >> 5; peep->pathfind_history[i].y = y >> 5; peep->pathfind_history[i].z = z; - peep->pathfind_history[i].direction = 0xF; + peep->pathfind_history[i].direction = permitted_edges; peep->pathfind_history[i].direction &= ~(1 << chosen_edge); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (gPathFindDebug) {