Delay vehicle repair, fix vehicle if BodyHealth increased
This commit is contained in:
@ -122,6 +122,11 @@ namespace RageCoop.Client
|
||||
{
|
||||
packet.RadioStation=Util.GetPlayerRadioIndex();
|
||||
}
|
||||
if (packet.EngineHealth>v.LastEngineHealth)
|
||||
{
|
||||
packet.Flags |= VehicleDataFlags.Repaired;
|
||||
}
|
||||
v.LastEngineHealth=packet.EngineHealth;
|
||||
}
|
||||
Send(packet, ConnectionChannel.VehicleSync);
|
||||
}
|
||||
|
@ -308,6 +308,10 @@ namespace RageCoop.Client
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
if (Flags.HasVehFlag(VehicleDataFlags.Repaired))
|
||||
{
|
||||
MainVehicle.Repair();
|
||||
}
|
||||
if (Colors != null && Colors != _lastVehicleColors)
|
||||
{
|
||||
Function.Call(Hash.SET_VEHICLE_COLOURS, MainVehicle, Colors[0], Colors[1]);
|
||||
@ -459,6 +463,8 @@ namespace RageCoop.Client
|
||||
|
||||
#region OUTGOING
|
||||
internal float LastNozzleAngle { get; set; }
|
||||
|
||||
internal float LastEngineHealth { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
@ -117,6 +117,7 @@ namespace RageCoop.Core
|
||||
HasRoof=1 << 12,
|
||||
IsFullSync = 1<<13,
|
||||
IsOnFire = 1<<14,
|
||||
Repaired = 1<<15,
|
||||
}
|
||||
|
||||
internal enum PlayerConfigFlags : byte
|
||||
|
Reference in New Issue
Block a user