Commit Graph

4 Commits

Author SHA1 Message Date
Ryan Gerleve
bf23eaa8ea Fix behavior, and related ensure, of simulated proxies controlled by the network prediction plugin when there's no autonomous proxy, such as when a client unpossesses a pawn and doesn't immediately possess another one.
Interpolation now uses the maximum of the LatestRecvFrame between autonomous and simulated proxies, instead of just autonomous proxies (if it's ever been set). Allows interpolation to continue while there's no local autonomous proxy.
Enabled the possession test by default now that it passes.

#jira UE-170936
#rb justin.hare
#preflight 6435b0422909bc56c8e76d81

[CL 24996399 by Ryan Gerleve in ue5-main branch]
2023-04-11 15:31:04 -04:00
Ryan Gerleve
04eb6c3ae6 Update network prediction tests. Emulate only sending changed properties of the prediction driver, which fixes an issue in the tests where serializing the FNetworkPredictionProxy every tick was causing it to be reconfigured every tick. As a result, frames of the frame data buffer were being overwritten unnecessarily, due to the PendingFrame check in UNetworkPredictionWorldManager::ConfigureInstance.
#jira UE-170936
#rb justin.hare
#preflight 6435a51a1f33a0b34ad00a6c

[CL 24995447 by Ryan Gerleve in ue5-main branch]
2023-04-11 14:42:05 -04:00
Ryan Gerleve
05fe661f71 Added NetworkPrediction plugin unit tests and utilities covering basic simulation ticking in forward prediction and interpolation modes.
Added some APIs to the plugin to support unit testing without needing a UWorld, actors, etc.

#jira UE-182327
#rb mattias.hornlund
#preflight 642da9944d26bcd1eb1200b9

[CL 24931730 by Ryan Gerleve in ue5-main branch]
2023-04-05 13:25:07 -04:00
Ryan Gerleve
4fdbfce9a0 Add a stub low-level tests program for the NetworkPrediction plugin.
Migrated and updated the only test code I found in the plugin, some basic predicted cue functionality, to the test program.
Low-level test runner InitAll helper function now sets GIsRunning to true, NetworkPrediction is checking for this during initialization.

#jira none
#rb brian.bekich, chris.constantinescu
#preflight 6413818332723d4a20e515c8

[CL 24679630 by Ryan Gerleve in ue5-main branch]
2023-03-16 17:08:41 -04:00