From a059fe1b3bb8d3c6b4c58647d5f620ba2445e573 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sun, 30 Aug 2026 12:52:31 +0700 Subject: [PATCH] [saco] Implement/match `CRenderer__RenderEverythingBarRoads_Hook` --- saco/game/hooks.cpp | 19 ++++++++++++++++++- saco/net/netgame.h | 1 + saco/net/objectpool.h | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/saco/game/hooks.cpp b/saco/game/hooks.cpp index af9d9e6..23ee714 100644 --- a/saco/game/hooks.cpp +++ b/saco/game/hooks.cpp @@ -9,6 +9,7 @@ extern int iGtaVersion; extern CNetGame* pNetGame; extern CGame* pGame; extern CChatWindow *pChatWindow; +extern CObjectPool *unnamed_1014FFAC; // 0x1014FFAC, lives in another translation unit extern DWORD dwGraphicsLoop; // Used for the external dll game loop. @@ -54,6 +55,8 @@ DWORD unnamed_10151814; DWORD unnamed_10151818; DWORD unnamed_10151824; +CObjectPool *unnamed_1015177C; + WORD wLastRendObj=0; BYTE Unk1_JmpCode[] = {0xFF,0x19,0xD1,0xBE,0x35,0x00}; @@ -861,7 +864,21 @@ NUDE CWorld__ProcessAttachedEntities__PositionAttachedEntity_Hook() NUDE CRenderer__RenderEverythingBarRoads_Hook() { - // TODO: CRenderer__RenderEverythingBarRoads_Hook + _asm mov eax, 0x553AA0 ;// CRenderer::RenderEverythingBarRoads + _asm call eax + + if(pNetGame) { + unnamed_1015177C = pNetGame->GetObjectPool(); + if(unnamed_1015177C) { + unnamed_1015177C->FUNC_10012B90(); + } + } + + if(unnamed_1014FFAC) { + unnamed_1014FFAC->FUNC_10012B90(); + } + + _asm ret } //----------------------------------------------------------- diff --git a/saco/net/netgame.h b/saco/net/netgame.h index 7e44c89..7ec83b5 100644 --- a/saco/net/netgame.h +++ b/saco/net/netgame.h @@ -78,6 +78,7 @@ public: CVehiclePool * GetVehiclePool() { return m_pPools->pVehiclePool; }; CPlayerPool * GetPlayerPool() { return m_pPools->pPlayerPool; }; CPickupPool * GetPickupPool() { return m_pPools->pPickupPool; }; + CObjectPool * GetObjectPool() { return m_pPools->pObjectPool; }; CGangZonePool * GetGangZonePool() { return m_pPools->pGangZonePool; }; RakClientInterface * GetRakClient() { return m_pRakClient; }; diff --git a/saco/net/objectpool.h b/saco/net/objectpool.h index c0b04f7..2a1b1e7 100644 --- a/saco/net/objectpool.h +++ b/saco/net/objectpool.h @@ -10,4 +10,7 @@ private: public: CObjectPool(); + void FUNC_10012B90(); // .text:10012B90 + void FUNC_10012BD0(); // .text:10012BD0 + };