This object is in archive! 

[1.188.025] [DS] Manual Terminal updates cause desync with Server (Verified on Keen DE #9)

LordTylus shared this bug 5 years ago
Solved

Hello there,

for quite some time I noticed that manual block updates made with the client terminal cause the client to ignore server side changes. So when you do something in the terminal and a sensor, timer, or programmable block which is executed by the server does something to the very same block your view is not updated. And your client still things its in the same state it was before.

Here are a few examples with steps to reproduce:


1. Enabling Medbay using Sensor:

  1. Join Dedicated Server
  2. Build Sensor and set it to enable Medbay
  3. Disable your Medbay manually
  4. Enter Sensor Field

You will notice the Status indicator Lights on the Medbay are still shown as red for disabled. Same when you go into the terminal you will notice that the Medbay is still shown as disabled, but you are able to recharge your suit and spawn there anyway. Which is correct because the Medbay is enabled but it would be nice if your client would show it that way.

2. Changing Light Colors using PB

  1. Join Dedicated Server
  2. Setup a few Lights on a Stationary Grid
  3. Set up a PB with Code Below
  4. Have a Disco
  5. Stop Script
  6. Manually setup any color to the Lights
  7. Run Script again

This one does exactly what I meant by doing things manually blocks the server from doing so for the client. Lights update perfectly every tick. But as soon as the client sets up a color manually this client will no longer see any color changes. Only a reconnect will help.

Random rnd = new Random();   

List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();   

public Program() {
Runtime.UpdateFrequency = UpdateFrequency.Update1;
}

void Main()   
{   
    blocks.Clear();   
    IMyBlockGroup blockGroup = GridTerminalSystem.GetBlockGroupWithName("DiscoDisco");

    if(blockGroup == null)
        return;

    blockGroup.GetBlocks(blocks);
    
    for (int i =0; i < blocks.Count;++i) {   

        if(!(blocks[i] is IMyLightingBlock))
            continue;

        Color lightColor = blocks[i].GetValue<Color>("Color");   
        lightColor.R = (byte)rnd.Next(0,255);  
        lightColor.G = (byte)rnd.Next(0,255);  
        lightColor.B = (byte)rnd.Next(0,255);  
        
        blocks[i].SetValue("Color", lightColor);  
    }   
        
}


3. Opening Disabled Door Using PB or Timer

  1. Join Dedicated Server
  2. Build Door and Programmable Block
  3. Close Door and turn it Off
  4. Use PB with Code below, or setup a timer that enables and opens the door
  5. Execute

public void Main(string argument, UpdateType updateSource) {
    var block = GridTerminalSystem.GetBlockWithName("Sliding Door");
    block.ApplyAction("OnOff_On");
    block.ApplyAction("Open_On");
}

This one is a bit funny. Both on its own seems to work fine,. You can open an enabled door, or enable a disabled door, but enabling and opening in the same step causes the visual to update so the door looks enabled but it does not really show as open. But still you can "glitch" through it, as the server knows the door is open. But the Client doesnt.

4. Enabling Thrusters Using Timer

  1. Join Dedicated Server
  2. Go into any ship of your choice and start moving into any direction
  3. Disable all your thrusters / or intertia dampeners
  4. Set up Timer to enable enable thrusters / or inertia dampeners
  5. Execute Timer

You will notice that your ship starts to slow down but thrusters are still shown as disabled. Also while your client thinks the thrusters are still disabled it behaves weird in natural gravity. It for example shows your ship falling down but then it will be set back by the server.

You have to disable and enable the thrusters / or dampeners manually again to be aligned with the server. but then you have the same problem if a timer or PB disables the thrusters.

Final words

I checked all on my own Dedicated Server and also verified everything that can be done with Timers and Sensors and didnt require PBs on Public Keen DE #9 Server.


Please fix :-)

Replies (2)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.


Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards


Keen Software House: QA Department

photo
1

Dont mind the comment... wrong Issue commented on

photo
1

Retested in 189.0Still present there

photo
1

Retested everything today and it appears to be working as intended now.

photo
1

Door state desync is still present for both sliding and hangar door, and it's so so annoying.

Such a bug has been in "considered" state for 5 months, and now we're "released game", really?

Replies have been locked on this page!