- previous networkevent of an item isn't overridden if the event is for a different itemcomponent

- batteries are restored to full capacity and all items repaired when resetting the respawn shuttle
- some respawnmanager refactoring (characters/items arent created in WriteNetworkEvent anymore)
- syncing respawnmanager state with clients who join mid-round
- LOS is turned back on when respawning
This commit is contained in:
Regalis
2016-08-13 18:42:55 +03:00
parent aa2dbab579
commit fbe6c91d67
4 changed files with 136 additions and 72 deletions

View File

@@ -120,7 +120,15 @@ namespace Barotrauma.Networking
if (overridePrevious[(int)type])
{
if (Events.Any(e => e.id == id && e.eventType == type)) return;
if (type == NetworkEventType.ComponentUpdate || type == NetworkEventType.ImportantComponentUpdate)
{
if (Events.Any(e => e.id == id && e.eventType == type && data == e.data)) return;
}
else
{
if (Events.Any(e => e.id == id && e.eventType == type)) return;
}
}
this.id = id;