mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement/match CVehicle::UpdateColor()
This commit is contained in:
parent
ddb991e278
commit
4e78bc6599
@ -122,6 +122,23 @@ void CVehicle::SetColor(BYTE byteColor1, BYTE byteColor2)
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CVehicle::UpdateColor()
|
||||
{
|
||||
if(!m_pVehicle) return;
|
||||
if(!GamePool_Vehicle_GetAt(m_dwGTAId)) return;
|
||||
|
||||
if(m_bHasNewColor) {
|
||||
if(!field_71) {
|
||||
if(m_byteColor1 != m_pVehicle->byteColor1 || m_byteColor2 != m_pVehicle->byteColor2) {
|
||||
m_pVehicle->byteColor1 = m_byteColor1;
|
||||
m_pVehicle->byteColor2 = m_byteColor2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
BOOL CVehicle::HasSunk()
|
||||
{
|
||||
if(!m_pVehicle) return FALSE;
|
||||
|
@ -14,7 +14,11 @@ public:
|
||||
|
||||
VEHICLE_TYPE *m_pVehicle;
|
||||
|
||||
char _gap50[41];
|
||||
char _gap50[33];
|
||||
|
||||
int field_71;
|
||||
|
||||
char _gap75[4];
|
||||
|
||||
BYTE m_byteColor1;
|
||||
BYTE m_byteColor2;
|
||||
@ -31,6 +35,7 @@ public:
|
||||
float GetHealth();
|
||||
void SetHealth(float fHealth);
|
||||
void SetColor(BYTE byteColor1, BYTE byteColor2);
|
||||
void UpdateColor();
|
||||
|
||||
BOOL HasSunk();
|
||||
BOOL IsWrecked();
|
||||
|
Loading…
x
Reference in New Issue
Block a user