Client-side door state prediction fix: the clients wouldn't set the door to the correct state if the predicted state was the same as the door's previous known correct state, even if the latest state sent by the server was different (= a convoluted way of saying that door syncing works correctly now with complex door setups like the ones in SS Odyssey, see #579).
This commit is contained in:
@@ -471,8 +471,10 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public void SetState(bool open, bool isNetworkMessage, bool sendNetworkMessage = false)
|
||||
{
|
||||
if (isStuck || (predictedState == null && isOpen == open) || (predictedState != null && isOpen == predictedState.Value)) return;
|
||||
|
||||
if (isStuck ||
|
||||
(predictedState == null && isOpen == open) ||
|
||||
(predictedState != null && isOpen == predictedState.Value && isOpen == open)) return;
|
||||
|
||||
if (GameMain.Client != null && !isNetworkMessage)
|
||||
{
|
||||
//clients can "predict" that the door opens/closes when a signal is received
|
||||
|
||||
Reference in New Issue
Block a user