From d23fafbbdea9dbd7582960ef6fe33bdc7904d869 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 15 Jun 2019 19:44:34 +0300 Subject: [PATCH] (9ebb872ae) Fixed typo --- .../BarotraumaClient/Source/Map/MapEntity.cs | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs index 38d0135f5..215e2db4d 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs @@ -667,94 +667,6 @@ namespace Barotrauma } } } - - if ((PlayerInput.KeyDown(Keys.LeftControl) || PlayerInput.KeyDown(Keys.RightControl))) - { - if (PlayerInput.KeyHit(Keys.N)) - { - float minX = selectedList[0].WorldRect.X, maxX = selectedList[0].WorldRect.Right; - for (int i = 0; i < selectedList.Count; i++) - { - minX = Math.Min(minX, selectedList[i].WorldRect.X); - maxX = Math.Max(maxX, selectedList[i].WorldRect.Right); - } - - float centerX = (minX + maxX) / 2.0f; - foreach (MapEntity me in selectedList) - { - me.FlipX(false); - me.Move(new Vector2((centerX - me.WorldPosition.X) * 2.0f, 0.0f)); - } - } - else if (PlayerInput.KeyHit(Keys.M)) - { - float minY = selectedList[0].WorldRect.Y - selectedList[0].WorldRect.Height, maxY = selectedList[0].WorldRect.Y; - for (int i = 0; i < selectedList.Count; i++) - { - minY = Math.Min(minY, selectedList[i].WorldRect.Y - selectedList[i].WorldRect.Height); - maxY = Math.Max(maxY, selectedList[i].WorldRect.Y); - } - - float centerY = (minY + maxY) / 2.0f; - foreach (MapEntity me in selectedList) - { - me.FlipY(false); - me.Move(new Vector2(0.0f, (centerY - me.WorldPosition.Y) * 2.0f)); - } - } - } - FilteredSelectedList.Clear(); - if (selectedList.Count == 0) return; - foreach (var e in selectedList) - { - if (e is Gap) { continue; } - FilteredSelectedList.Add(e); - } - var first = FilteredSelectedList.FirstOrDefault(); - if (first != null) - { - first.UpdateEditing(cam); - if (first.ResizeHorizontal || first.ResizeVertical) - { - first.UpdateResizing(cam); - } - } - - if ((PlayerInput.KeyDown(Keys.LeftControl) || PlayerInput.KeyDown(Keys.RightControl))) - { - if (PlayerInput.KeyHit(Keys.N)) - { - float minX = selectedList[0].WorldRect.X, maxX = selectedList[0].WorldRect.Right; - for (int i = 0; i < selectedList.Count; i++) - { - minX = Math.Min(minX, selectedList[i].WorldRect.X); - maxX = Math.Max(maxX, selectedList[i].WorldRect.Right); - } - - float centerX = (minX + maxX) / 2.0f; - foreach (MapEntity me in selectedList) - { - me.FlipX(false); - me.Move(new Vector2((centerX - me.WorldPosition.X) * 2.0f, 0.0f)); - } - } - else if (PlayerInput.KeyHit(Keys.M)) - { - float minY = selectedList[0].WorldRect.Y - selectedList[0].WorldRect.Height, maxY = selectedList[0].WorldRect.Y; - for (int i = 0; i < selectedList.Count; i++) - { - minY = Math.Min(minY, selectedList[i].WorldRect.Y - selectedList[i].WorldRect.Height); - maxY = Math.Max(maxY, selectedList[i].WorldRect.Y); - } - - float centerY = (minY + maxY) / 2.0f; - foreach (MapEntity me in selectedList) - { - me.FlipY(false); - me.Move(new Vector2(0.0f, (centerY - me.WorldPosition.Y) * 2.0f)); - } - } - } } public static void DrawEditor(SpriteBatch spriteBatch, Camera cam)