mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[saco] Implement/match CVehicle::ResetPointers()
This commit is contained in:
@@ -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
@@ -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);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user