From e948135636872aebc80489b9ffcf30ff13e3b17c Mon Sep 17 00:00:00 2001 From: Hielke Morsink <123mannetje@gmail.com> Date: Sun, 8 May 2016 01:39:59 +0200 Subject: [PATCH] Sort guest list when loading a park --- src/game.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game.c b/src/game.c index 8cf4f4b356..2493240dfa 100644 --- a/src/game.c +++ b/src/game.c @@ -749,6 +749,11 @@ void game_fix_save_vars() { gNumGuestsInPark = peepCount; + // Needed to be done twice to make sure the order is correct. + // This is needed because the sort function assumes the order is correct already. By making it switch between 'real' names and number this is solved. + peep_update_names(!(gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)); + peep_update_names(!(gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)); + // Fixes broken saves where a surface element could be null for (int y = 0; y < 256; y++) { for (int x = 0; x < 256; x++) {