diff --git a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeModel.cs b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeModel.cs index 64f6447a0..1a35993f6 100644 --- a/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeModel.cs +++ b/Artemis/Artemis/Modules/Games/CounterStrike/CounterStrikeModel.cs @@ -48,10 +48,10 @@ namespace Artemis.Modules.Games.CounterStrike { // TODO: Size stuff AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List(), - LinearGradientMode.Horizontal) {Height = Scale}; - TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, Scale, new List(), + LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false}; + TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List(), LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale}; - EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, Scale, new List(), + EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List(), LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale}; MainModel.GameStateWebServer.GameDataReceived += HandleGameData; } @@ -82,7 +82,7 @@ namespace Artemis.Modules.Games.CounterStrike if (health > 25 || health < 1) return; - TeamRect.Colors = new List {Color.Red, Color.DarkOrange, Color.Red, Color.DarkOrange}; + TeamRect.Colors = new List {Color.Red, Color.OrangeRed, Color.Red, Color.OrangeRed }; } private void UpdateSmoke() diff --git a/Artemis/Artemis/Utilities/GameState/GameStateWebServer.cs b/Artemis/Artemis/Utilities/GameState/GameStateWebServer.cs index 30a21c494..1021bf93d 100644 --- a/Artemis/Artemis/Utilities/GameState/GameStateWebServer.cs +++ b/Artemis/Artemis/Utilities/GameState/GameStateWebServer.cs @@ -31,7 +31,7 @@ namespace Artemis.Utilities.GameState return; _listener.Prefixes.Clear(); - Port = FreeTcpPort(); + Port = Settings.General.Default.GamestatePort; _listener.Prefixes.Add($"http://127.0.0.1:{Port}/"); _listener.Start(); @@ -84,15 +84,6 @@ namespace Artemis.Utilities.GameState File.WriteAllText(path + @"\coreProps.json", content); } - private int FreeTcpPort() - { - var l = new TcpListener(IPAddress.Loopback, 0); - l.Start(); - var port = ((IPEndPoint) l.LocalEndpoint).Port; - l.Stop(); - return port; - } - private string HandleRequest(HttpListenerRequest request) { object json;