com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
fix: initializing the LastSentState when spawning the NetworkTransform [MTT-3044]
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.
cc @NoelStephensUnity since you're looking at this same code right now.
@LPLafontaineB I am closing this out because of PR-2110