(svn r20708) -Fix [FS#4101]: upon company bankruptcy some objects weren't removed properly

This commit is contained in:
rubidium
2010-09-01 06:15:26 +00:00
parent df0f8fdd28
commit a8d00c2ac0
2 changed files with 20 additions and 8 deletions

View File

@@ -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));
}
}
}