Subs that aren't docked to the main sub aren't saved

This commit is contained in:
Regalis
2016-07-04 17:31:07 +03:00
parent cafeceb6d2
commit e74d5adef4

View File

@@ -225,8 +225,10 @@ namespace Barotrauma
}
else
{
saveElement = new XElement("LinkedSubmarine");
if (!sub.DockedTo.Contains(Submarine.MainSub)) return null;
saveElement = new XElement("LinkedSubmarine");
sub.SaveToXElement(saveElement);
}