Fix entity fire

This commit is contained in:
Sardelka
2022-07-17 20:12:25 +08:00
parent 10bd54a785
commit 809c935d37
4 changed files with 18 additions and 5 deletions

View File

@ -465,12 +465,11 @@ namespace RageCoop.Client
if (IsOnFire && !MainPed.IsOnFire)
{
MainPed.SetOnFire(true);
Function.Call(Hash.START_ENTITY_FIRE, MainPed);
}
else if (!IsOnFire && MainPed.IsOnFire)
{
MainPed.SetOnFire(false);
Function.Call(Hash.STOP_ENTITY_FIRE, MainPed);
}
if (IsJumping)
@ -492,7 +491,6 @@ namespace RageCoop.Client
{
MainPed.Ragdoll();
}
SmoothTransition();
if (!_lastRagdoll)
{

View File

@ -158,6 +158,17 @@ namespace RageCoop.Client
MainVehicle.Repair();
}
}
if (MainVehicle.IsOnFire)
{
if (!Flags.HasVehFlag(VehicleDataFlags.IsOnFire))
{
Function.Call(Hash.STOP_ENTITY_FIRE, MainVehicle);
}
}
else if (Flags.HasVehFlag(VehicleDataFlags.IsOnFire))
{
Function.Call(Hash.START_ENTITY_FIRE, MainVehicle);
}
if (EngineRunning != MainVehicle.IsEngineRunning)
{
@ -247,7 +258,6 @@ namespace RageCoop.Client
#endregion
#endregion
if (LastFullSynced>=LastUpdated)
{
#region -- SYNC STATE --

View File

@ -76,6 +76,10 @@ namespace RageCoop.Client
{
flags|=VehicleDataFlags.HasRoof;
}
if (veh.IsOnFire)
{
flags|=VehicleDataFlags.IsOnFire;
}
return flags;

View File

@ -116,6 +116,7 @@ namespace RageCoop.Core
IsDeluxoHovering=1 << 11,
HasRoof=1 << 12,
IsFullSync = 1<<13,
IsOnFire = 1<<14,
}
internal enum PlayerConfigFlags : byte