Ghosts synced with some issues
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user