mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 09:48:13 +08:00
[saco] Implement/match CVehiclePool::FUNC_1001ED70; the plate texture is built by a thiscall on the renderer global
This commit is contained in:
1 parent
e23f696955
commit
ea6365cdc6
1 file changed
+23
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
Reference in new issue
Block a user