(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.
--- 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++) {
--- 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 */
--- 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();
--- 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);
}