diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 48eeee9..7bb2f80 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -279,6 +279,17 @@ float CPlayerPed::GetTargetRotation() return fZAngle; } +//----------------------------------------------------------- + +void CPlayerPed::SetTargetRotation(float fRotation) +{ + if(!m_pPed) return; + if(!GamePool_Ped_GetAt(m_dwGTAId)) return; + + m_pPed->fRotation2 = DegToRad(fRotation); + m_pPed->fRotation1 = DegToRad(fRotation); +} + //----------------------------------------------------------- void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo) diff --git a/saco/game/playerped.h b/saco/game/playerped.h index fcb1139..30eb028 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -42,6 +42,7 @@ public: WORD GetAmmo(); float GetTargetRotation(); + void SetTargetRotation(float fRotation); void GiveWeapon(int iWeaponID, int iAmmo); void SetArmedWeapon(int iWeaponType, bool bUnk); WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();