com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

fix: initializing the LastSentState when spawning the NetworkTransform [MTT-3044]

Open LPLafontaineB opened this issue 3 years ago • 1 comments

This simply makes sure that m_LastSentState is initialized when the NetworkTransform is spawned. Not initializing it caused an issue with the ClientNetworkTransform where spawning it with client ownership would have the client send the uninitialized m_LastSentState to the server during the first Update, which could lead to the client and server versions having different rotations.

Changelog

  • Fixed the NetworkTransform's m_LastSentState being uninitialized at spawn

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

LPLafontaineB avatar Aug 04 '22 18:08 LPLafontaineB

cc @NoelStephensUnity since you're looking at this same code right now.

JesseOlmer avatar Aug 04 '22 19:08 JesseOlmer

@LPLafontaineB I am closing this out because of PR-2110

NoelStephensUnity avatar Aug 17 '22 22:08 NoelStephensUnity