Merge branch 'jgrpp' into jgrpp-nrt
This commit is contained in:
@@ -65,6 +65,11 @@ void GamelogStopAction()
|
||||
if (print) GamelogPrintDebug(5);
|
||||
}
|
||||
|
||||
void GamelogStopActionIfStarted()
|
||||
{
|
||||
if (_gamelog_action_type != GLAT_NONE) GamelogStopAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Frees the memory allocated by a gamelog
|
||||
*/
|
||||
|
@@ -404,6 +404,9 @@ static void ShutdownGame()
|
||||
*/
|
||||
static void LoadIntroGame(bool load_newgrfs = true)
|
||||
{
|
||||
Window *v;
|
||||
FOR_ALL_WINDOWS_FROM_FRONT(v) delete v;
|
||||
|
||||
_game_mode = GM_MENU;
|
||||
|
||||
if (load_newgrfs) ResetGRFConfig(false);
|
||||
|
@@ -3496,7 +3496,9 @@ bool AfterLoadGame()
|
||||
/* convert wait for cargo orders to ordinary load if possible */
|
||||
Order *order;
|
||||
FOR_ALL_ORDERS(order) {
|
||||
if (order->GetLoadType() == static_cast<OrderLoadFlags>(1)) order->SetLoadType(OLF_LOAD_IF_POSSIBLE);
|
||||
if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_LOADING) || order->IsType(OT_IMPLICIT)) && order->GetLoadType() == static_cast<OrderLoadFlags>(1)) {
|
||||
order->SetLoadType(OLF_LOAD_IF_POSSIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2657,6 +2657,9 @@ static inline void ClearSaveLoadState()
|
||||
|
||||
delete _sl.lf;
|
||||
_sl.lf = nullptr;
|
||||
|
||||
extern void GamelogStopActionIfStarted();
|
||||
GamelogStopActionIfStarted();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -254,7 +254,12 @@ void AfterLoadVehicles(bool part_of_load)
|
||||
SCOPE_INFO_FMT([&v], "AfterLoadVehicles: %s", scope_dumper().VehicleInfo(v));
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
/* Reinstate the previous pointer */
|
||||
if (v->Next() != nullptr) v->Next()->previous = v;
|
||||
if (v->Next() != nullptr) {
|
||||
v->Next()->previous = v;
|
||||
if (HasBit(v->subtype, GVSF_VIRTUAL) != HasBit(v->Next()->subtype, GVSF_VIRTUAL)) {
|
||||
SlErrorCorrupt("Mixed virtual/non-virtual vehicle consist");
|
||||
}
|
||||
}
|
||||
if (v->NextShared() != nullptr) v->NextShared()->previous_shared = v;
|
||||
|
||||
if (part_of_load) v->fill_percent_te_id = INVALID_TE_ID;
|
||||
|
Reference in New Issue
Block a user