Compare commits

..

No commits in common. "386c211de5baf32669564d87b5a9c9cc63063702" and "04be9d6fab96ea9c64a795e06412800ac6f6360c" have entirely different histories.

3 changed files with 1 additions and 15 deletions

View File

@ -28,5 +28,4 @@ public enum CS2Event : byte {
OnBombExploded = 24,
AnyEvent = 25,
AnyMessage = 26,
OnActivityChange = 27
}

View File

@ -15,9 +15,6 @@ internal static class CS2EventGenerator
if(events.Count > 0)
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyEvent, new CS2EventArgs(events.Count)));
if (lastGameState.Player?.Activity != newGameState.Player?.Activity)
events.Add(new(CS2Event.OnActivityChange, new CS2EventArgs(newGameState.Player?.Activity)));
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyMessage, new CS2EventArgs()));
return events;

View File

@ -1,6 +1,5 @@
using CS2GSI.GameState;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace CS2GSI;
@ -37,13 +36,6 @@ public class CS2GSI
JObject jsonObject = JObject.Parse(messageJson);
CS2GameState newState = CS2GameState.ParseFromJObject(jsonObject);
this._logger?.Log(LogLevel.Debug, $"{Resources.Received_State}:\n{newState.ToString()}");
#if DEBUG
long time = DateTime.Now.ToFileTime();
Directory.CreateDirectory("states");
File.WriteAllText(Path.Join("states", $"{time}.json"), JsonConvert.SerializeObject(newState, Formatting.Indented, new Newtonsoft.Json.Converters.StringEnumConverter()));
Directory.CreateDirectory("messages");
File.WriteAllText(Path.Join("messages", $"{time}.json"), messageJson);
#endif
if (_lastLocalGameState is not null && _allGameStates.Count > 0)
{
@ -99,7 +91,6 @@ public class CS2GSI
CS2Event.OnBombExploded => this.OnBombExploded,
CS2Event.AnyEvent => this.AnyEvent,
CS2Event.AnyMessage => this.AnyMessage,
CS2Event.OnActivityChange => this.OnActivityChange,
_ => throw new ArgumentException(Resources.Unknown_Event, nameof(cs2Event))
};
}
@ -134,7 +125,6 @@ public class CS2GSI
OnBombDefused,
OnBombExploded,
AnyEvent,
AnyMessage,
OnActivityChange;
AnyMessage;
}