mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(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.
This commit is contained in:
parent
3561a3068e
commit
3532b91eef
2
engine.c
2
engine.c
@ -811,7 +811,7 @@ void SetCustomEngineName(EngineID engine, const char *name)
|
||||
_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++) {
|
||||
|
2
engine.h
2
engine.h
@ -212,7 +212,6 @@ void LoadCustomEngineNames(void);
|
||||
void DeleteCustomEngineNames(void);
|
||||
|
||||
bool IsEngineBuildable(uint engine, byte type);
|
||||
void UnInitNewgrEngines(void);
|
||||
|
||||
enum {
|
||||
NUM_NORMAL_RAIL_ENGINES = 54,
|
||||
@ -283,5 +282,6 @@ static inline const RoadVehicleInfo* RoadVehInfo(EngineID e)
|
||||
|
||||
void UnloadWagonOverrides(void);
|
||||
void UnloadCustomEngineSprites(void);
|
||||
void UnloadCustomEngineNames(void);
|
||||
|
||||
#endif /* ENGINE_H */
|
||||
|
1
newgrf.c
1
newgrf.c
@ -2455,6 +2455,7 @@ static void ResetNewGRFData(void)
|
||||
// Unload sprite group data
|
||||
UnloadWagonOverrides();
|
||||
UnloadCustomEngineSprites();
|
||||
UnloadCustomEngineNames();
|
||||
|
||||
// Reset price base data
|
||||
ResetPriceBaseMultipliers();
|
||||
|
Loading…
Reference in New Issue
Block a user