Description

After dispossessing an NP-simulated pawn, it appears that the last frame of input is used for the continued simulation of the pawn.  

For example, a client player may be holding down continuous input for the pawn to 'move forward'. If the pawn is un-possessed at this time, it will continue to move forward indefinitely or until possessed again. 

Of note, the NP Prediction Component uses 3 different proxies for the possible net roles (authority, autonomous, and simulated).  In the case of dispossession, the actor switches roles from autonomous to simulated.  The client should no longer be producing NP InputCmd states for the pawn.

This issue only occurs for client-controlled pawns.

Steps to Reproduce

This can be reproduced in any scenario by possessing an NP-simulated pawn, holding some kind of continuous input down, and telling the controller to un-possess the pawn. 

  1. In the NetworkPredictionExtras plugin, open the TestMap level
  2. In the Project Settings, go to Input and create a new Action Mapping. Name it "UnpossessCurrentPawn" and map it to the 'U' key.
  3. Create a new controller type with PlayerController as the parent (TestPlayerController)
  4. Open this new controller in the BP editor
  5. Add an event mapping for "UnpossessCurrentPawn" input and handle it with a server-only custom event that performs the un-possession. (see below)
  6. Set TestPlayerController as the default controller type in NetworkPredictionExtras_TestGameMode
  7. Run PIE as standalone or listen server
  8. Use 'W' to start moving forward, then press 'U' while still holding 'W'
  9. Observe the pawn continue to move forward indefinitely

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-147892 in the post.

2
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.265.0
Target Fix5.2
Fix Commit23455373
Main Commit23455373
CreatedApr 1, 2022
ResolvedDec 8, 2022
UpdatedFeb 13, 2023
View Jira Issue