Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Utils/LilOSC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@
}
#pragma warning restore CS8600,CS8602 // Converting null literal or possible null value to non-nullable type.

static OSCQueryService OscQuery;

Check warning on line 40 in Utils/LilOSC.cs

View workflow job for this annotation

GitHub Actions / build (Release)

The field 'OSCLib.OscQuery' is never used

static OSCLib() {

Check warning on line 42 in Utils/LilOSC.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable field 'OscQuery' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
PortTCP = GetAvailableTcpPort();
PortUDP = GetAvailableUdpPort();

OscConnectionSettings.ReceivePort = PortUDP;

/*
IDiscovery discovery = new MeaModDiscovery();

OscQuery = new OSCQueryServiceBuilder()
Expand All @@ -64,6 +65,7 @@
OscQuery.RefreshServices();

Logger.Info($"OSC QUERY - TCP:{PortTCP} UDP:{PortUDP}");
*/

}

Expand Down Expand Up @@ -113,13 +115,15 @@

internal static void SetAvatar(string id) => Send("/avatar/change", id);

private static Action<string, object?[]>? MonitorCallback;

Check warning on line 118 in Utils/LilOSC.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Field 'OSCLib.MonitorCallback' is never assigned to, and will always have its default value null

internal static void StartOSCMonitor(Action<string, object?[]>? callback) {
/*
MonitorCallback = callback;
if (MonitorCallback != null) {
OscUtility.RegisterMonitorCallback(ReceiveMessage);
}
*/
}

static void ReceiveMessage(BlobString address, OscMessageValues values) {
Expand Down Expand Up @@ -156,7 +160,7 @@
}

internal static void Dispose() {
OscQuery.Dispose();
// OscQuery.Dispose();
}
}

Expand Down
2 changes: 1 addition & 1 deletion Utils/LogParser/ToNLogContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ public void SetRoundActive(bool roundActive) {

IsRoundActive = roundActive;
SetIsAlive(IsOptedIn || !roundActive);
SetIsReborn(false);

if (IsRecent) ToNGameState.SetRoundActive(IsRoundActive);
}

public void SetIsAlive(bool alive) {
if (IsAlive == alive) return;

SetIsReborn(false);
IsAlive = alive;
if (IsRecent) ToNGameState.SetAlive(IsAlive);
}
Expand Down