diff --git a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs index cd6f5624a..a49b60add 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs @@ -504,12 +504,12 @@ namespace Barotrauma { foreach (MapEntity e in selectedList) { - e.prefab.DrawPlacing(spriteBatch, + e.prefab?.DrawPlacing(spriteBatch, new Rectangle(e.WorldRect.Location + new Point((int)moveAmount.X, (int)-moveAmount.Y), e.WorldRect.Size)); GUI.DrawRectangle(spriteBatch, new Vector2(e.WorldRect.X, -e.WorldRect.Y) + moveAmount, new Vector2(e.rect.Width, e.rect.Height), - Color.DarkRed, false, 0, (int)Math.Max(1.5f / GameScreen.Selected.Cam.Zoom, 1.0f)); + Color.White, false, 0, (int)Math.Max(3.0f / GameScreen.Selected.Cam.Zoom, 2.0f)); } //stop dragging the "selection rectangle" diff --git a/Barotrauma/BarotraumaClient/Source/Map/MapEntityPrefab.cs b/Barotrauma/BarotraumaClient/Source/Map/MapEntityPrefab.cs index f8ab3faa8..2d2a03e2b 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/MapEntityPrefab.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/MapEntityPrefab.cs @@ -44,7 +44,7 @@ namespace Barotrauma drawRect.Location -= Submarine.MainSub.Position.ToPoint(); } drawRect.Y = -drawRect.Y; - GUI.DrawRectangle(spriteBatch, drawRect, Color.DarkBlue); + GUI.DrawRectangle(spriteBatch, drawRect, Color.White); } public void DrawListLine(SpriteBatch spriteBatch, Vector2 pos, Color color) { diff --git a/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs b/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs index 6072beef8..f932497b4 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/WayPoint.cs @@ -101,8 +101,14 @@ namespace Barotrauma } } + public WayPoint(Rectangle newRect, Submarine submarine) - : base (null, submarine) + : this (MapEntityPrefab.Find(null, "waypoint"), newRect, submarine) + { + } + + public WayPoint(MapEntityPrefab prefab, Rectangle newRect, Submarine submarine) + : base (prefab, submarine) { rect = newRect; linkedTo = new ObservableCollection(); @@ -602,11 +608,14 @@ namespace Barotrauma int.Parse(element.Attribute("y").Value), (int)Submarine.GridSize.X, (int)Submarine.GridSize.Y); - WayPoint w = new WayPoint(rect, submarine); - w.ID = (ushort)int.Parse(element.Attribute("ID").Value); + Enum.TryParse(element.GetAttributeString("spawn", "Path"), out SpawnType spawnType); + WayPoint w = new WayPoint(MapEntityPrefab.Find(null, spawnType == SpawnType.Path ? "waypoint" : "spawnpoint"), rect, submarine) + { + ID = (ushort)int.Parse(element.Attribute("ID").Value) + }; - Enum.TryParse(element.GetAttributeString("spawn", "Path"), out w.spawnType); + w.spawnType = spawnType; string idCardDescString = element.GetAttributeString("idcarddesc", ""); if (!string.IsNullOrWhiteSpace(idCardDescString))