DarklightGames / DarkestHour

Darkest Hour: Europe '44-'45
https://store.steampowered.com/app/1280/Darkest_Hour_Europe_4445/
69 stars 21 forks source link

Players animations can get permanently broken when changing positions in vehicle with new cannon animation driver system #1705

Open cmbasnett opened 5 months ago

cmbasnett commented 5 months ago
  1. Enter the Semovente 47/32 as a driver.
  2. Go to the gunner position.
  3. Raise up to stance 3 (raised, but not binocs)
  4. Go back to driver position.
  5. Go back to the gunner position.
  6. Cycle up one stance.

Enter third person view, and note that your player model will not be animating when yawing the gun. Furthermore, when you get out of the vehicle, your animations become totally busted. The only way to "fix" it is to get back in the gunner seat and then cycle up until one of the transition animations play.

Image

cmbasnett commented 4 months ago

There are two separate issues here, though they are related.

  1. A player moving in-between positions does not deactivate the animation drivers, causing the player to end up in a broken state if they ever re-enter the same position.
  2. A player leaving the vehicle does not have its animation drivers deactivated, causing the player to float around.

After investigation, it was discovered that the issue is that we are triggering DeactivateAllAnimationDrivers within the client's DriverStatusChanged. The issue is that the Driver reference is already None by that point, so the drivers are not actually disabled.

The fix is to find a reliable way to trigger driver deactivation. It's possible that we may need to move the handling of the animation drivers to the DHPawn itself, so that we can properly deactivate any drivers even if the VehiclePawn reference loses track of the Driver.