"ReliableMessages", networkevents aren't sent if FillNetworkEvent fails
This commit is contained in:
@@ -279,12 +279,14 @@ namespace Barotrauma
|
||||
spriteBatch.DrawString(GUI.Font, (int)item.Condition + " %", new Vector2(rect.X + rect.Width / 2, rect.Y + rect.Height / 2), Color.Red);
|
||||
}
|
||||
|
||||
public override void FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
|
||||
public override bool FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
|
||||
{
|
||||
for (int i = 0; i<capacity; i++)
|
||||
{
|
||||
message.Write((items[i] == null) ? -1 : items[i].ID);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message)
|
||||
|
||||
Reference in New Issue
Block a user