ItemComponent syncing fixes:

- Relay and lightcomponent states are synced (otherwise clients won't be notified if the state is, for example, toggled by a signal from a button).
- Clients don't play door sounds if a signal attempts to set the state to the same value as the predicted state, but DO play if a correction from the server changes the state from the predicted one.
- Clients are notified if a reactor receives a shutdown signal.
- Powercontainer updates are sent if the charge changes by 1%, not by 1 unit.
This commit is contained in:
Regalis
2017-04-11 20:36:52 +03:00
parent 347f549ac1
commit 9a36df0f52
5 changed files with 49 additions and 16 deletions
@@ -545,7 +545,11 @@ namespace Barotrauma.Items.Components
switch (connection.Name)
{
case "shutdown":
shutDownTemp = 0.0f;
if (shutDownTemp > 0.0f)
{
unsentChanges = true;
shutDownTemp = 0.0f;
}
break;
}
}