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
+2
View File
@@ -225,6 +225,8 @@ namespace Barotrauma
} }
else else
{ {
if (!sub.DockedTo.Contains(Submarine.MainSub)) return null;
saveElement = new XElement("LinkedSubmarine"); saveElement = new XElement("LinkedSubmarine");
sub.SaveToXElement(saveElement); sub.SaveToXElement(saveElement);