Download

Impossible use UE4 for a coop or mp listen server game due the unfixed network errors since 4 years

As of August 2020 this is STILL broken, I applied 6 different fixes from the numerous forum topics on this, none of them work.

I don’t know if it’s been posted here or elsewhere but listen server couldn’t rotate another player’s character mesh and I found out why. Linear fixes all my issues and just works so much better on both dedicated and listen server.

It turns out, Epic has decided you’re not allowed to use linear on listen server, even though this breaks heaps of ****.

Here is my solution:


void UMyCharacterMovementComponent::OnRegister()
{
    Super::OnRegister();

    // Bloody Epic forces this back to exponential which BREAKS turn in place and any mesh rotation!
    const bool bIsReplay = (GetWorld() && GetWorld()->IsPlayingReplay());
    if (!bIsReplay && GetNetMode() == NM_ListenServer)
    {
        NetworkSmoothingMode = ENetworkSmoothingMode::Linear;
    }
}

Here is where the problem lies, at the last few lines in the UCharacterMovementComponent::OnRegister function


else if (NetMode == NM_ListenServer)
{
    // Linear smoothing works on listen servers, but makes a lot less sense under the typical high update rate.
    if (NetworkSmoothingMode == ENetworkSmoothingMode::Linear)
    {
        NetworkSmoothingMode = ENetworkSmoothingMode::Exponential;
    }
}