Ghosts synced with some issues

This commit is contained in:
2026-01-24 15:04:54 +01:00
parent 9554d1c512
commit 1433b9bdfc
11 changed files with 1489 additions and 1168 deletions

View File

@@ -439,7 +439,7 @@ namespace Marro.PacManUdon
var timestampBytes = BitConverter.GetBytes(timestamp);
Array.Copy(timestampBytes, 0, data, HeaderTimestampIndex, timestampBytes.Length);
data[HeaderEventIdIndex] = eventId;
data[HeaderEventTypeIndex] = Int32ToByte((int)eventType);
data[HeaderEventTypeIndex] = ((int)eventType).ToByte();
index = HeaderLength;
}
@@ -926,9 +926,6 @@ namespace Marro.PacManUdon
Array.Copy(data, start, result, 0, length);
return result;
}
public static byte Int32ToByte(int value) =>
(byte)value; // Doing this inline causes an error...?
#endregion
#region Debug
@@ -969,6 +966,11 @@ namespace Marro.PacManUdon
{
SendEventSoon(NetworkEventType.SyncPellets);
}
public void DoGhostSync()
{
SendEventSoon(NetworkEventType.GhostUpdate);
}
#endregion
}
}