1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 19:32:54 +01:00

(svn r16539) [0.7] -Backport from trunk:

- Fix: When finding duplicate graphics sets favour the more complete one (r16538)
- Fix: [Squirrel] Crash that occured when an AI was halted while one or more generators were still in a 'running' state [FS#2942] (r16534)
- Fix: [Squirrel] Do not copy an object when we just checked that the pointer to it is NULL (r16532)
- Fix: Notify small UFOs on deletion of road vehicles, so they can head for somewhere else instead of stumbling over a ghost (r16525)
- Update: a few languages.
This commit is contained in:
rubidium
2009-06-08 22:53:39 +00:00
parent b1d2a8876b
commit a00a4b5ad8
18 changed files with 361 additions and 194 deletions

View File

@@ -8,6 +8,7 @@
#include "../window_func.h"
#include "../fios.h"
#include "../train.h"
#include "../roadveh.h"
#include "../string_func.h"
#include "../gamelog.h"
#include "../network/network.h"
@@ -1822,6 +1823,19 @@ bool AfterLoadGame()
}
}
if (CheckSavegameVersion(121)) {
/* Delete small ufos heading for non-existing vehicles */
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->type == VEH_DISASTER && v->subtype == 2/*ST_SMALL_UFO*/ && v->current_order.GetDestination() != 0) {
const Vehicle *u = IsValidVehicleID(v->dest_tile) ? GetVehicle(v->dest_tile) : NULL;
if (u == NULL || u->type != VEH_ROAD || !IsRoadVehFront(u)) {
delete v;
}
}
}
}
GamelogPrintDebug(1);
bool ret = InitializeWindowsAndCaches();