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