[saco] Implement/match CVehicle::ResetPointers()

This commit is contained in:
RD42
2024-08-20 22:48:22 +08:00
parent c57b99ceac
commit 003f3f22d0
2 changed files with 21 additions and 1 deletions
+13
View File
@@ -22,3 +22,16 @@ void CVehicle::LinkToInterior(int iInterior)
}
//-----------------------------------------------------------
// If the game has internally destroyed the vehicle
// during this frame, the vehicle pointer should become 0
void CVehicle::ResetPointers()
{
if(!m_pVehicle) return;
m_pVehicle = GamePool_Vehicle_GetAt(m_dwGTAId);
m_pEntity = (ENTITY_TYPE *)m_pVehicle;
}
//-----------------------------------------------------------
+8 -1
View File
@@ -10,10 +10,17 @@ class CVehicle : public CEntity
{
public:
char _gap48[112];
char _gap48[4];
VEHICLE_TYPE *m_pVehicle;
char _gap50[104];
CVehicle( int iType, float fPosX, float fPosY, float fPosZ, float fRotation = 0.0f, BOOL bKeepModelLoaded = FALSE, int a8 = 0);
void ResetPointers();
void LinkToInterior(int iInterior);
};