From 546b2cdeef491b5cae66dc10c65b03be7d4cbdcb Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:26:18 +0800 Subject: [PATCH] [saco] Implement/match CActorPed destructor --- saco/game/actorped.cpp | 7 +++++++ saco/game/actorped.h | 1 + 2 files changed, 8 insertions(+) diff --git a/saco/game/actorped.cpp b/saco/game/actorped.cpp index 94f4f09..356aab8 100644 --- a/saco/game/actorped.cpp +++ b/saco/game/actorped.cpp @@ -34,6 +34,13 @@ CActorPed::CActorPed(int iSkin, float fX, float fY,float fZ,float fRotation) //----------------------------------------------------------- +CActorPed::~CActorPed() +{ + Destroy(); +} + +//----------------------------------------------------------- + void CActorPed::Destroy() { DWORD dwPedPtr = (DWORD)m_pPed; diff --git a/saco/game/actorped.h b/saco/game/actorped.h index fdd5871..6cc5bf6 100644 --- a/saco/game/actorped.h +++ b/saco/game/actorped.h @@ -9,6 +9,7 @@ public: // Constructor/Destructor. CActorPed(int iSkin, float fPosX, float fPosY, float fPosZ, float fRotation = 0.0f); + virtual ~CActorPed(); void Destroy();