Some CharacterMovement clarification needed

Ugh I keep confusing Character Movement with my own one - so yeah for characters it doesn’t look like the server moves a client until they get an update from them. This perplexed me at first but I guess for character movement you won’t notice it so long as the connection is decent.

So what should happen is, client will call ServerMove - which runs on the Server and calls MoveAutonomous with the input provided by the client, and then calls ServerMoveHandleClientError, which determines whether or not to send corrections.

Corrections are dispatched via SendCorrections() (called from the player controller of all places, part of the INetworkPredictionInterface) - which then either acks a good move or sends the adjustment. At 300 ping acks and adjustments will likely always fail and especially at high framerates, because the move buffer will be overflowing on the client anyway (default is 96 moves) and that move you sent will have expired - so they won’t be able to find and replay subsequent moves:



    // Ack move if not expired
    int32 MoveIndex = ClientData->GetSavedMoveIndex(TimeStamp);
    if (MoveIndex == INDEX_NONE)
    {
        if (ClientData->LastAckedMove.IsValid())
        {
            UE_LOG(LogOrbMovement, Warning, TEXT("ClientAdjustPosition could not find Move for TimeStamp: %f, LastAckedTimeStamp: %f, CurrentTimeStamp: %f"), TimeStamp, ClientData->LastAckedMove->TimeStamp, ClientData->CurrentTimeStamp);
        }

        return;
    }


You could hard-set the position here if you wanted to, but I could have sworn however that this was handled somewhere else… if not, there’s probably a reason for it. One issue would be that any move you already sent to the server would be out of date before it even arrives.

If you turn on verbose logging for character movement, I’m betting you’ll see log-spam regarding expired moves and timestamps.