From 3d4b938be2e541c50afdcf49201c5db6ad1c34fd Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 4 Sep 2016 21:53:19 +0100 Subject: [PATCH] Integrate local in peep_update_fixing_sub_state_9 --- src/peep/peep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index 44abd8c3b8..15ea7d24f4 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -4374,6 +4374,7 @@ static bool peep_update_fixing_sub_state_9(bool firstRun, rct_peep *peep, rct_ri return true; } + uint8 direction = 0; track_begin_end trackBeginEnd; while (track_block_get_previous(input.x, input.y, input.element, &trackBeginEnd)) { uint8 trackType = trackBeginEnd.begin_element->properties.track.type; @@ -4382,7 +4383,7 @@ static bool peep_update_fixing_sub_state_9(bool firstRun, rct_peep *peep, rct_ri input.y = trackBeginEnd.begin_y; input.element = trackBeginEnd.begin_element; - RCT2_GLOBAL(0xF43914, uint32) = trackBeginEnd.begin_element->type & 3; + direction = trackBeginEnd.begin_element->type & 3; continue; } @@ -4393,7 +4394,6 @@ static bool peep_update_fixing_sub_state_9(bool firstRun, rct_peep *peep, rct_ri uint16 destinationX = input.x + 16; uint16 destinationY = input.y + 16; - uint8 direction = RCT2_GLOBAL(0xF43914, uint32); rct_xy16 offset = _992A3C[direction]; destinationX -= offset.x;