OldUnreal / UnrealTournamentPatches

Other
980 stars 29 forks source link

[469b] Teleporter and subclasses work not properly on client side #525

Open SeriousBuggie opened 3 years ago

SeriousBuggie commented 3 years ago

Teleporter on default bNoDelete = False, so this actors replicted to client. On replication Tag not sent. So when in code of Teleport called on local side:

            foreach AllActors( class 'Teleporter', Dest )
                if( string(Dest.tag)~=URL && Dest!=Self )
                    i++;
            i = rand(i);
            foreach AllActors( class 'Teleporter', Dest )
                if( string(Dest.tag)~=URL && Dest!=Self && i-- == 0 )
                    break;

then other side Teleporter can be not relevant to player and not exists locally. Even if it exists, tag not replicated - so all this loops pointless.

As result locally no any prediction work. And because SetClientRotation not called, locally player not correct rotation.

As solution need make on map all teleports bNoDelete = true.

We can not do this as new defaults - it is break network compatibility.

We can only add into UnrealEd some helpers for check and fix common errors if mapper want.

SeriousBuggie commented 3 years ago

Also if you use pickup random dest: // Teleport to a random teleporter in this local level, if more than one pick random. then random picked locally not match with random picked on server.

this can lead to wrong rotation of player. And some flickering when server correct wrong predicted locally position.

this lead us to server side fix. And possible problems with rotation because of ping. or we need send in some way difference for change rotation, for use delta from server and not lost local turn for ping time.