Add stealth mode sync
This commit is contained in:
parent
33244b930f
commit
e1606889f7
@ -303,6 +303,7 @@ namespace RageCoop.Client
|
||||
c.IsOnLadder = flags.HasFlag(PedDataFlags.IsOnLadder);
|
||||
c.IsVaulting = flags.HasFlag(PedDataFlags.IsVaulting);
|
||||
c.IsInCover = flags.HasFlag(PedDataFlags.IsInCover);
|
||||
c.IsInStealthMode = flags.HasFlag(PedDataFlags.IsInStealthMode);
|
||||
c.Heading=packet.Heading;
|
||||
c.LastSynced = Main.Ticked;
|
||||
if (c.IsAiming)
|
||||
|
@ -61,6 +61,7 @@ namespace RageCoop.Client
|
||||
/// </summary>
|
||||
public Ped MainPed { get; internal set; }
|
||||
internal int Health { get; set; }
|
||||
internal bool IsInStealthMode { get; set; }
|
||||
internal byte WeaponTint { get; set; }
|
||||
internal bool _lastEnteringVehicle=false;
|
||||
internal bool _lastSittingInVehicle=false;
|
||||
@ -467,6 +468,8 @@ namespace RageCoop.Client
|
||||
}
|
||||
_lastIsJumping = false;
|
||||
|
||||
Function.Call(Hash.SET_PED_STEALTH_MOVEMENT, MainPed, IsInStealthMode, 0);
|
||||
|
||||
if (IsRagdoll || Health==0)
|
||||
{
|
||||
if (!MainPed.IsRagdoll)
|
||||
|
@ -134,6 +134,11 @@ namespace RageCoop.Client
|
||||
{
|
||||
flags |=PedDataFlags.IsInCover;
|
||||
}
|
||||
|
||||
if(Function.Call<bool>(Hash.GET_PED_STEALTH_MOVEMENT, ped))
|
||||
{
|
||||
flags |= PedDataFlags.IsInStealthMode;
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,8 @@ namespace RageCoop.Core
|
||||
IsParachuteOpen = 1 << 7,
|
||||
IsOnLadder = 1 << 8,
|
||||
IsVaulting = 1 << 9,
|
||||
IsInCover=1<< 10,
|
||||
IsInCover = 1<< 10,
|
||||
IsInStealthMode = 1 << 11,
|
||||
}
|
||||
|
||||
#region ===== VEHICLE DATA =====
|
||||
|
Loading…
x
Reference in New Issue
Block a user