Use tuple to store vehicle colors

Array allocation is somewhat expensive
This commit is contained in:
Sardelka9515
2023-03-20 17:02:56 +08:00
parent e6c6e5ceff
commit 7cd0fd22af
5 changed files with 9 additions and 13 deletions

View File

@ -126,7 +126,7 @@ namespace RageCoop.Client
}
packet.Flags |= VehicleDataFlags.IsFullSync;
packet.Colors = new[] { primaryColor, secondaryColor };
packet.Colors = (primaryColor, secondaryColor);
packet.DamageModel = veh.GetVehicleDamageModel();
packet.LandingGear = veh.IsAircraft ? (byte)veh.LandingGearState : (byte)0;
packet.RoofState = (byte)veh.RoofState;