Other small changes

This commit is contained in:
EntenKoeniq
2022-04-14 12:18:07 +02:00
parent d2bb91edcc
commit 146cc709eb
4 changed files with 93 additions and 84 deletions

View File

@ -226,7 +226,6 @@ namespace CoopClient.Entities.Player
MainVehicle.IsEngineRunning = VehIsEngineRunning;
}
if (MainVehicle.IsPlane)
{
if (VehLandingGear != (byte)MainVehicle.LandingGearState)
@ -252,6 +251,15 @@ namespace CoopClient.Entities.Player
Function.Call(Hash._TRANSFORM_SUBMARINE_TO_VEHICLE, MainVehicle.Handle, false);
}
}
if (MainVehicle.HasRoof)
{
bool roofOpened = MainVehicle.RoofState == VehicleRoofState.Opened || MainVehicle.RoofState == VehicleRoofState.Opening;
if (roofOpened != VehRoofOpened)
{
MainVehicle.RoofState = VehRoofOpened ? VehicleRoofState.Opening : VehicleRoofState.Closing;
}
}
if (VehAreLightsOn != MainVehicle.AreLightsOn)
{
@ -283,23 +291,14 @@ namespace CoopClient.Entities.Player
_lastHornActive = false;
MainVehicle.SoundHorn(1);
}
if (MainVehicle.HasRoof)
{
bool roofOpened = MainVehicle.RoofState == VehicleRoofState.Opened || MainVehicle.RoofState == VehicleRoofState.Opening;
if (roofOpened != VehRoofOpened)
{
MainVehicle.RoofState = VehRoofOpened ? VehicleRoofState.Opening : VehicleRoofState.Closing;
}
}
}
}
MainVehicle.CurrentRPM = VehRPM;
}
private void UpdateVehiclePosition()
{
MainVehicle.CurrentRPM = VehRPM;
float avrLat = Math.Min(1.5f, (Util.GetTickCount64() - LastUpdateReceived) / AverageLatency);
if (_lastVehicleSteeringAngle != VehicleSteeringAngle)