mirror of https://github.com/OpenTTD/OpenTTD
(svn r15656) -Fix: Changing dynamic_engines also requires reloading newgrfs as well as resetting the OverrideManager.
parent
e982100fe6
commit
aa7a19fd49
|
@ -58,6 +58,8 @@
|
||||||
#include "settings_func.h"
|
#include "settings_func.h"
|
||||||
#include "ini_type.h"
|
#include "ini_type.h"
|
||||||
#include "ai/ai_config.hpp"
|
#include "ai/ai_config.hpp"
|
||||||
|
#include "newgrf.h"
|
||||||
|
#include "engine_base.h"
|
||||||
|
|
||||||
#include "void_map.h"
|
#include "void_map.h"
|
||||||
#include "station_base.h"
|
#include "station_base.h"
|
||||||
|
@ -1151,6 +1153,11 @@ static bool ChangeDynamicEngines(int32 p1)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset the engines, they will get new EngineIDs */
|
||||||
|
_engine_mngr.ResetToDefaultMapping();
|
||||||
|
ReloadNewGRFData();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue