[saco] Implement/match CVehicle::SetColor(...)

This commit is contained in:
RD42 2024-08-20 23:11:27 +08:00
parent 7ebeab2055
commit ddb991e278
2 changed files with 21 additions and 1 deletions

View File

@ -109,6 +109,19 @@ void CVehicle::SetHealth(float fHealth)
//-----------------------------------------------------------
void CVehicle::SetColor(BYTE byteColor1, BYTE byteColor2)
{
if(m_pVehicle && GamePool_Vehicle_GetAt(m_dwGTAId)) {
m_pVehicle->byteColor1 = byteColor1;
m_pVehicle->byteColor2 = byteColor2;
}
m_byteColor2 = byteColor2;
m_byteColor1 = byteColor1;
m_bHasNewColor = TRUE;
}
//-----------------------------------------------------------
BOOL CVehicle::HasSunk()
{
if(!m_pVehicle) return FALSE;

View File

@ -14,7 +14,13 @@ public:
VEHICLE_TYPE *m_pVehicle;
char _gap50[104];
char _gap50[41];
BYTE m_byteColor1;
BYTE m_byteColor2;
BOOL m_bHasNewColor;
char _gap7F[57];
CVehicle( int iType, float fPosX, float fPosY, float fPosZ, float fRotation = 0.0f, BOOL bKeepModelLoaded = FALSE, int a8 = 0);
@ -24,6 +30,7 @@ public:
float GetHealth();
void SetHealth(float fHealth);
void SetColor(BYTE byteColor1, BYTE byteColor2);
BOOL HasSunk();
BOOL IsWrecked();