Smoother ped heading calibration
This commit is contained in:
@ -694,7 +694,12 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
if (!IsAiming && !MainPed.IsGettingUp)
|
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());
|
MainPed.Velocity=Velocity+5*dist*(Position-MainPed.ReadPosition());
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,8 @@ namespace RageCoop.Client
|
|||||||
public static bool AddPlayer()
|
public static bool AddPlayer()
|
||||||
{
|
{
|
||||||
Ped p = Game.Player.Character;
|
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);
|
SyncedPed player = GetPedByID(Main.LocalPlayerID);
|
||||||
if (player==null)
|
if (player==null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user