mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +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
|
// TODO: Size stuff
|
||||||
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
|
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
|
||||||
LinearGradientMode.Horizontal) {Height = Scale};
|
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
|
||||||
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, Scale, new List<Color>(),
|
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
|
||||||
LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale};
|
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};
|
LinearGradientMode.Horizontal) {Height = (MainModel.ActiveKeyboard.Height*Scale) - Scale};
|
||||||
MainModel.GameStateWebServer.GameDataReceived += HandleGameData;
|
MainModel.GameStateWebServer.GameDataReceived += HandleGameData;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
if (health > 25 || health < 1)
|
if (health > 25 || health < 1)
|
||||||
return;
|
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()
|
private void UpdateSmoke()
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Artemis.Utilities.GameState
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_listener.Prefixes.Clear();
|
_listener.Prefixes.Clear();
|
||||||
Port = FreeTcpPort();
|
Port = Settings.General.Default.GamestatePort;
|
||||||
_listener.Prefixes.Add($"http://127.0.0.1:{Port}/");
|
_listener.Prefixes.Add($"http://127.0.0.1:{Port}/");
|
||||||
|
|
||||||
_listener.Start();
|
_listener.Start();
|
||||||
@ -84,15 +84,6 @@ namespace Artemis.Utilities.GameState
|
|||||||
File.WriteAllText(path + @"\coreProps.json", content);
|
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)
|
private string HandleRequest(HttpListenerRequest request)
|
||||||
{
|
{
|
||||||
object json;
|
object json;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user