"ReliableMessages", networkevents aren't sent if FillNetworkEvent fails

This commit is contained in:
Regalis
2015-10-19 22:49:38 +03:00
parent c3d1b971dd
commit 5f07d4b0c9
22 changed files with 604 additions and 76 deletions
+5 -2
View File
@@ -83,11 +83,11 @@ namespace Barotrauma
return result;
}
public override void FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
public override bool FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
{
if (type == NetworkEventType.KillCharacter)
{
return;
return true;
}
message.Write((float)NetTime.Now);
@@ -127,6 +127,9 @@ namespace Barotrauma
LargeUpdateTimer = Math.Max(0, LargeUpdateTimer - 1);
}
return true;
}
public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message)