Smoother ped heading calibration

This commit is contained in:
Sardelka9515 2022-08-20 12:33:55 +08:00
parent fa4fe2c10f
commit 87dfc18d91
2 changed files with 8 additions and 1 deletions

View File

@ -694,7 +694,12 @@ namespace RageCoop.Client
{
if (!IsAiming && !MainPed.IsGettingUp)
{
MainPed.Heading=Heading;
var cur=MainPed.Heading;
var diff=Heading-cur;
if (diff > 180) { diff = diff - 360; }
else if (diff < -180) { diff = 360 + diff; }
MainPed.Heading=cur+diff/2;
}
MainPed.Velocity=Velocity+5*dist*(Position-MainPed.ReadPosition());
}

View File

@ -93,6 +93,8 @@ namespace RageCoop.Client
public static bool AddPlayer()
{
Ped p = Game.Player.Character;
// var clipset=p.Gender==Gender.Male? "MOVE_M@TOUGH_GUY@" : "MOVE_F@TOUGH_GUY@";
// Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET,p,clipset,1f);
SyncedPed player = GetPedByID(Main.LocalPlayerID);
if (player==null)
{