diff --git a/Client/game_sa/CPtrNodeSingleLinkPoolSA.h b/Client/game_sa/CPtrNodeSingleLinkPoolSA.h index fb2818cc8c..4f1537e171 100644 --- a/Client/game_sa/CPtrNodeSingleLinkPoolSA.h +++ b/Client/game_sa/CPtrNodeSingleLinkPoolSA.h @@ -28,6 +28,7 @@ class CPtrNodeSingleLinkPoolSA final : public CPtrNodeSingleLinkPool std::size_t GetUsedSize() const override { return m_customPool->GetUsedSize(); } bool Resize(std::size_t newSize) override { return m_customPool->SetCapacity(newSize); }; + void ResetCapacity() override { m_customPool->SetCapacity(MAX_POINTER_SINGLE_LINKS); }; static auto* GetPoolInstance() { return m_customPool; } static void StaticSetHooks(); diff --git a/Client/mods/deathmatch/logic/CClientGame.cpp b/Client/mods/deathmatch/logic/CClientGame.cpp index e860393472..9e09185eb9 100644 --- a/Client/mods/deathmatch/logic/CClientGame.cpp +++ b/Client/mods/deathmatch/logic/CClientGame.cpp @@ -515,6 +515,7 @@ CClientGame::~CClientGame() g_pGame->SetPreWeaponFireHandler(NULL); g_pGame->SetPostWeaponFireHandler(NULL); g_pGame->SetTaskSimpleBeHitHandler(NULL); + g_pGame->GetPools()->GetPtrNodeSingleLinkPool().ResetCapacity(); g_pGame->GetAudioEngine()->SetWorldSoundHandler(NULL); g_pCore->SetMessageProcessor(NULL); g_pCore->GetKeyBinds()->SetKeyStrokeHandler(NULL); diff --git a/Client/sdk/game/CPtrNodeSingleLinkPool.h b/Client/sdk/game/CPtrNodeSingleLinkPool.h index 56fb87ef83..125820edf8 100644 --- a/Client/sdk/game/CPtrNodeSingleLinkPool.h +++ b/Client/sdk/game/CPtrNodeSingleLinkPool.h @@ -13,7 +13,8 @@ class CPtrNodeSingleLinkPool { public: - virtual bool Resize(std::size_t size) = 0; + virtual bool Resize(std::size_t size) = 0; + virtual void ResetCapacity() = 0; virtual std::size_t GetCapacity() const = 0; virtual std::size_t GetUsedSize() const = 0; };