Some classes for syncing entity state changes. Similar to the NetworkEvents in the old netcode, but the logic is split into separate classes which prevent the server from reading updates for entities that aren't IClientSerializable.

todo: add NetEntityEventManagers to server & client, some logic to prevent sending events that don't need to be sent (e.g. duplicate event state updates)
This commit is contained in:
Regalis
2016-11-12 20:56:06 +02:00
parent 17a7cb70ed
commit c314b37029
23 changed files with 293 additions and 29 deletions

View File

@@ -845,7 +845,7 @@ namespace Barotrauma
return newBody;
}
public void ServerWrite(NetOutgoingMessage msg, Client c)
public void ServerWrite(NetBuffer msg, Client c)
{
for (int i = 0; i < sections.Length; i++)
{

View File

@@ -1163,7 +1163,7 @@ namespace Barotrauma
DockedTo.Clear();
}
public void ServerWrite(NetOutgoingMessage msg, Client c)
public void ServerWrite(NetBuffer msg, Client c)
{
msg.Write(ID);
//length in bytes