Moving sector improvements
Sectors currently move very smoothly client-side with the exception of sectors that are moved by the local player.
Local player has a 250ms ping to the server and therefore is predicting his own movement 125ms ahead of the server receiving the movement input. The player opens a door and the prediction code begins opening the door immediately. If the door is moving up 4 units every tic, the player can successfully walk underneath the opening door 392ms later.
However, when the server receives the player's input to open the door, it will send a message telling all clients to begin opening the door. So 250ms after the local player started to predict opening the door, he receives a message from the server to begin opening the door. Currently in Odamex, this causes the local player to put aside its initial prediction of the door and accept the server's state message for the door, essentially resetting the door to the state where it was when it began to open. This causes a visual jitter in the movement of the door and also causes the client to mis-predict his own position when he tries to move through the door since the client will think the door is at the wrong height in relation to his prediction.
I had a wild theory the other night as to why a jitter happens on a moving platform when a player is on it (it happens to doors/crushers too)
A client only receives an update to a sector every so often, so the sector keeps moving clientside even if there are no updates, next it receives the update and therefore moves the sector back to the servers position (which is slightly in the past on the client)
Is this correct?