mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
CS:GO fixes
This commit is contained in:
parent
2ffb94c099
commit
81c5b82177
@ -48,10 +48,10 @@ namespace Artemis.Modules.Games.CounterStrike
|
||||
{
|
||||
// TODO: Size stuff
|
||||
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = Scale};
|
||||
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, Scale, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
|
||||
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale};
|
||||
EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, Scale, new List<Color>(),
|
||||
EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
|
||||
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> {Color.Red, Color.DarkOrange, Color.Red, Color.DarkOrange};
|
||||
TeamRect.Colors = new List<Color> {Color.Red, Color.OrangeRed, Color.Red, Color.OrangeRed };
|
||||
}
|
||||
|
||||
private void UpdateSmoke()
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user