mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-12-11 21:22:36 +00:00
send only the current wheel state, and prevent memory leak bug in Mirror
This commit is contained in:
parent
626567e289
commit
a6713c24da
1 changed files with 1 additions and 0 deletions
|
@ -147,6 +147,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
m_net_angularVelocity = m_vehicle.RigidBody.angularVelocity;
|
||||
|
||||
// wheels
|
||||
m_net_wheelsData.Flush(); // remove current list of changes - this ensures that only the current wheel state is sent, and prevents memory leak bug in Mirror
|
||||
m_net_wheelsData.Clear();
|
||||
foreach (var wheel in m_vehicle.Wheels) {
|
||||
m_net_wheelsData.Add(new WheelSyncData() {
|
||||
|
|
Loading…
Reference in a new issue