From 0723dade768ad6118db00c7bb908f39949fb7970 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Fri, 3 Jan 2020 19:48:13 +0300 Subject: script 800-899 --- src/peds/Ped.h | 2 +- src/peds/PlayerPed.cpp | 12 ++++++++++++ src/peds/PlayerPed.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/peds') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 49803418..f8a063f3 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -340,7 +340,7 @@ public: uint8 bWanderPathAfterExitingCar : 1; uint8 bIsLeader : 1; - uint8 bDontDragMeOutCar : 1; + uint8 bDontDragMeOutCar : 1; // unfinished feature uint8 m_ped_flagF8 : 1; uint8 bWillBeQuickJacked : 1; uint8 bCancelEnteringCar : 1; // after door is opened or couldn't be opened due to it's locked diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 7c946dda..a4ffdc7c 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -7,6 +7,7 @@ #include "World.h" #include "RpAnimBlend.h" #include "General.h" +#include "Pools.h" CPlayerPed::~CPlayerPed() { @@ -73,6 +74,17 @@ CPlayerPed::SetWantedLevelNoDrop(int32 level) m_pWanted->SetWantedLevelNoDrop(level); } +void +CPlayerPed::MakeObjectTargettable(int32 handle) +{ + for (int i = 0; i < ARRAY_SIZE(m_nTargettableObjects); i++) { + if (CPools::GetObjectPool()->GetAt(m_nTargettableObjects[i]) == nil) { + m_nTargettableObjects[i] = handle; + return; + } + } +} + // I don't know the actual purpose of parameter void CPlayerPed::AnnoyPlayerPed(bool annoyedByPassingEntity) diff --git a/src/peds/PlayerPed.h b/src/peds/PlayerPed.h index 1de1b442..6a794d41 100644 --- a/src/peds/PlayerPed.h +++ b/src/peds/PlayerPed.h @@ -56,6 +56,7 @@ public: void UseSprintEnergy(void); class CPlayerInfo *GetPlayerInfoForThisPlayerPed(); void SetRealMoveAnim(void); + void MakeObjectTargettable(int32); static void SetupPlayerPed(int32); static void DeactivatePlayerPed(int32); -- cgit v1.2.3