The server maintains a list of unique EntityEvents created during the round and sends them to clients who join mid-round

This commit is contained in:
Regalis
2017-02-18 15:09:13 +02:00
parent 0e66f2a69c
commit 6c8f5b8999
7 changed files with 160 additions and 37 deletions
+4 -3
View File
@@ -646,7 +646,7 @@ namespace Barotrauma.Networking
bool isTraitor = inc.ReadBoolean();
string traitorTargetName = isTraitor ? inc.ReadString() : null;
GameModePreset gameMode = GameModePreset.list.Find(gm => gm.Name == modeName);
if (gameMode == null)
@@ -900,8 +900,9 @@ namespace Barotrauma.Networking
inc.ReadPadBits();
break;
case ServerNetObject.ENTITY_STATE:
entityEventManager.Read(inc, sendingTime);
case ServerNetObject.ENTITY_EVENT:
case ServerNetObject.ENTITY_EVENT_INITIAL:
entityEventManager.Read(objHeader, inc, sendingTime);
break;
case ServerNetObject.CHAT_MESSAGE:
ChatMessage.ClientRead(inc);