Add Tick scale plumbing

This commit is contained in:
teinarss
2021-10-09 19:02:10 +02:00
committed by abcdefg30
parent 7f3130c7a6
commit 1a56cee9a1
8 changed files with 62 additions and 11 deletions

View File

@@ -638,6 +638,17 @@ namespace OpenRA.Server
return ms.GetBuffer();
}
byte[] CreateTickScaleFrame(float scale)
{
var ms = new MemoryStream(17);
ms.WriteArray(BitConverter.GetBytes(9));
ms.WriteArray(BitConverter.GetBytes(0));
ms.WriteArray(BitConverter.GetBytes(0));
ms.WriteByte((byte)OrderType.TickScale);
ms.Write(scale);
return ms.GetBuffer();
}
void DispatchOrdersToClient(Connection c, int client, int frame, byte[] data)
{
DispatchFrameToClient(c, client, CreateFrame(client, frame, data));