From 6fade38d36cd427bd453ea7a499bfc53094d4a92 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 24 Jun 2015 21:54:08 +0200 Subject: [PATCH] Fix remove all guests cheat --- src/windows/cheats.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/windows/cheats.c b/src/windows/cheats.c index b2f557e81b..2d00ef2203 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -664,16 +664,6 @@ static void cheat_give_all_guests(int object) static void cheat_remove_all_guests() { - int i; - rct_ride *ride; - - FOR_ALL_RIDES(i, ride) - { - ride_clear_for_construction(i); - ride_set_status(i, RIDE_STATUS_CLOSED); - } - window_invalidate_by_class(WC_RIDE); - rct_peep *peep; uint16 spriteIndex, nextSpriteIndex; @@ -685,6 +675,19 @@ static void cheat_remove_all_guests() } } + int i; + rct_ride *ride; + + FOR_ALL_RIDES(i, ride) + { + ride_clear_for_construction(i); + ride_set_status(i, RIDE_STATUS_CLOSED); + + for(int i=0;i<4;i++) { + ride->first_peep_in_queue[i]=0xFFFF; + } + } + window_invalidate_by_class(WC_RIDE); gfx_invalidate_screen(); }