From 0ec91d62b5dc83f6987099c335f3819cd7d76bae Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Sat, 19 Dec 2015 20:09:37 +0000 Subject: [PATCH] fix #2515 --- src/config.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index 3db493267e..d25137180a 100644 --- a/src/config.c +++ b/src/config.c @@ -818,10 +818,20 @@ void config_apply_to_old_addresses() RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) = gConfigGeneral.measurement_format; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_TEMPERATURE, sint8) = gConfigGeneral.temperature_format; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8) = gConfigGeneral.construction_marker_colour; - RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (gConfigGeneral.measurement_format + 1) * 256; - if (gConfigGeneral.show_height_as_units) + if (gConfigGeneral.show_height_as_units) { RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0; - + } else { + switch (gConfigGeneral.measurement_format) { + default: + case MEASUREMENT_FORMAT_IMPERIAL: + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 1 * 256; + break; + case MEASUREMENT_FORMAT_METRIC: + case MEASUREMENT_FORMAT_SI: + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 2 * 256; + break; + } + } int configFlags = 0; if (gConfigGeneral.always_show_gridlines) configFlags |= CONFIG_FLAG_ALWAYS_SHOW_GRIDLINES;