Fixed NotImplementedException when attempting to clone linked submarines

This commit is contained in:
Joonas Rikkonen
2018-09-10 11:40:06 +03:00
parent 8e7cd8e5f3
commit 2b3c0d103b
2 changed files with 7 additions and 5 deletions

View File

@@ -99,7 +99,12 @@ namespace Barotrauma
{
return Vector2.Distance(position, WorldPosition) < 50.0f;
}
public override MapEntity Clone()
{
return CreateDummy(Submarine, filePath, Position);
}
private void GenerateWallVertices(XElement rootElement)
{
List<Vector2> points = new List<Vector2>();

View File

@@ -163,10 +163,7 @@ namespace Barotrauma
return (Submarine.RectContains(WorldRect, position));
}
public virtual MapEntity Clone()
{
throw new NotImplementedException();
}
public abstract MapEntity Clone();
public static List<MapEntity> Clone(List<MapEntity> entitiesToClone)
{