# HG changeset patch # User peter1138 # Date 1134914608 0 # Node ID eab49a86038ec2d4c8f694c3beca5d885ea8d7e3 # Parent f67ac3cafc66c86d1a640e4cfd5159f58addc695 (svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose. diff -r f67ac3cafc66 -r eab49a86038e engine.c --- a/engine.c Sun Dec 18 12:17:53 2005 +0000 +++ b/engine.c Sun Dec 18 14:03:28 2005 +0000 @@ -811,7 +811,7 @@ _engine_custom_names[engine] = strdup(name); } -void UnInitNewgrEngines(void) +void UnloadCustomEngineNames(void) { char **i; for (i = _engine_custom_names; i != endof(_engine_custom_names); i++) { diff -r f67ac3cafc66 -r eab49a86038e engine.h --- a/engine.h Sun Dec 18 12:17:53 2005 +0000 +++ b/engine.h Sun Dec 18 14:03:28 2005 +0000 @@ -212,7 +212,6 @@ void DeleteCustomEngineNames(void); bool IsEngineBuildable(uint engine, byte type); -void UnInitNewgrEngines(void); enum { NUM_NORMAL_RAIL_ENGINES = 54, @@ -283,5 +282,6 @@ void UnloadWagonOverrides(void); void UnloadCustomEngineSprites(void); +void UnloadCustomEngineNames(void); #endif /* ENGINE_H */ diff -r f67ac3cafc66 -r eab49a86038e newgrf.c --- a/newgrf.c Sun Dec 18 12:17:53 2005 +0000 +++ b/newgrf.c Sun Dec 18 14:03:28 2005 +0000 @@ -2455,6 +2455,7 @@ // Unload sprite group data UnloadWagonOverrides(); UnloadCustomEngineSprites(); + UnloadCustomEngineNames(); // Reset price base data ResetPriceBaseMultipliers(); diff -r f67ac3cafc66 -r eab49a86038e openttd.c --- a/openttd.c Sun Dec 18 12:17:53 2005 +0000 +++ b/openttd.c Sun Dec 18 14:03:28 2005 +0000 @@ -255,7 +255,6 @@ static void UnInitializeGame(void) { UnInitWindowSystem(); - UnInitNewgrEngines(); free(_config_file); }