[saco] Implement/match CPlayerPed::ForceTargetRotation(...)

This commit is contained in:
RD42 2024-08-05 18:14:12 +08:00
parent e56e35f94e
commit a75303c645
3 changed files with 16 additions and 0 deletions

View File

@ -290,6 +290,19 @@ void CPlayerPed::SetTargetRotation(float fRotation)
m_pPed->fRotation1 = DegToRad(fRotation);
}
//-----------------------------------------------------------
void CPlayerPed::ForceTargetRotation(float fRotation)
{
if(!m_pPed) return;
if(!GamePool_Ped_GetAt(m_dwGTAId)) return;
m_pPed->fRotation1 = DegToRad(fRotation);
m_pPed->fRotation2 = DegToRad(fRotation);
ScriptCommand(&set_actor_z_angle,m_dwGTAId,fRotation);
}
//-----------------------------------------------------------
void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)

View File

@ -43,6 +43,8 @@ public:
float GetTargetRotation();
void SetTargetRotation(float fRotation);
void ForceTargetRotation(float fRotation);
void GiveWeapon(int iWeaponID, int iAmmo);
void SetArmedWeapon(int iWeaponType, bool bUnk);
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();

View File

@ -68,6 +68,7 @@ const SCRIPT_COMMAND enable_train_traffic = { 0x06d7, "i" };
const SCRIPT_COMMAND put_train_at = { 0x07c7, "ifff" };
const SCRIPT_COMMAND get_active_interior = { 0x077e, "v" };
const SCRIPT_COMMAND set_actor_z_angle = { 0x0173, "if" };
const SCRIPT_COMMAND refresh_streaming_at = { 0x04E4, "ff" };