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:
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user