(svn r20708) -Fix [FS#4101]: upon company bankruptcy some objects weren't removed properly
This commit is contained in:
@@ -52,7 +52,12 @@ static void Ptrs_OBJS()
|
||||
Object *o;
|
||||
FOR_ALL_OBJECTS(o) {
|
||||
SlObject(o, _object_desc);
|
||||
Object::IncTypeCount(GetObjectType(o->location.tile));
|
||||
if (CheckSavegameVersion(148) && !IsTileType(o->location.tile, MP_OBJECT)) {
|
||||
/* Due to a small bug stale objects could remain. */
|
||||
delete o;
|
||||
} else {
|
||||
Object::IncTypeCount(GetObjectType(o->location.tile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user