From 61497a1372b9b26b63dc0c935d5e4157248b6992 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Fri, 25 Oct 2024 23:44:31 +0800 Subject: [PATCH] [saco] Implement/match `CActorPed::SetTargetRotation(...)` --- saco/game/actorped.cpp | 8 ++++++++ saco/game/actorped.h | 1 + 2 files changed, 9 insertions(+) diff --git a/saco/game/actorped.cpp b/saco/game/actorped.cpp index 522d6b8..b7ec013 100644 --- a/saco/game/actorped.cpp +++ b/saco/game/actorped.cpp @@ -89,6 +89,14 @@ void CActorPed::ClearAnimations() //----------------------------------------------------------- +void CActorPed::SetTargetRotation(float fRotation) +{ + if(!m_pPed) return; + if(!GamePool_Ped_GetAt(m_dwGTAId)) return; + + m_pPed->fRotation2 = DegToRad(fRotation); +} + //----------------------------------------------------------- float CActorPed::GetHealth() diff --git a/saco/game/actorped.h b/saco/game/actorped.h index 26587da..1534ceb 100644 --- a/saco/game/actorped.h +++ b/saco/game/actorped.h @@ -13,6 +13,7 @@ public: void Destroy(); + void SetTargetRotation(float fRotation); float GetHealth(); float GetArmour(); void SetArmour(float fArmour);