From ea6365cdc66be323e7c0718be3466b431fb57e98 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Fri, 4 Sep 2026 20:52:10 +0700 Subject: [PATCH] [saco] Implement/match `CVehiclePool::FUNC_1001ED70`; the plate texture is built by a thiscall on the renderer global --- saco/net/vehiclepool.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/saco/net/vehiclepool.cpp b/saco/net/vehiclepool.cpp index bb31d48..66f2252 100644 --- a/saco/net/vehiclepool.cpp +++ b/saco/net/vehiclepool.cpp @@ -2,6 +2,15 @@ #include "../main.h" #include "../game/util.h" +extern int dword_1026EBA0; + +// the number plate renderer lives on a global, only its texture builder is needed here +class CPlateRenderer +{ +public: + int FUNC_1006D880(char *szPlate); // .text:1006D880 +}; + // layout locks: these fail to compile if a field offset or the size moves typedef char chk_CVehiclePool_size[sizeof(CVehiclePool) == 0x17898 ? 1 : -1]; typedef char chk_field_FA4[offsetof(CVehiclePool, field_FA4) == 0xFA4 ? 1 : -1]; @@ -147,3 +156,17 @@ int CVehiclePool::FUNC_1001EC00() } //---------------------------------------------------- + +void CVehiclePool::FUNC_1001ED70() +{ + if(!field_17894) return; + + if(dword_1026EBA0 && !*(DWORD *)(dword_1026EBA0 + 0x20)) + *(DWORD *)(dword_1026EBA0 + 0x20) = ((CPlateRenderer *)dword_1026EBA0)->FUNC_1006D880("XYZSR998"); + + for(VEHICLEID VehicleID = 0; VehicleID <= field_0; VehicleID++) { + if(field_3074[VehicleID]) ((CVehicle *)field_1134[VehicleID])->FUNC_100B81A0(); + } +} + +//----------------------------------------------------