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

This commit is contained in:
RD42 2024-08-20 23:28:09 +08:00
parent 587e87d11d
commit 83a85fe44f
2 changed files with 21 additions and 0 deletions

View File

@ -205,6 +205,25 @@ BOOL CVehicle::HasTurret()
);
}
//-----------------------------------------------------------
// This can currently only be used for setting the alternate
// siren. The way it's coded internally doesn't seem to allow
// us to modify the horn alone.
void CVehicle::SetHornState(BYTE byteState)
{
if(!m_pVehicle) return;
if(!GamePool_Vehicle_GetAt(m_dwGTAId)) return;
if( (GetVehicleSubtype() != VEHICLE_SUBTYPE_BOAT ) &&
(GetVehicleSubtype() != VEHICLE_SUBTYPE_PLANE) &&
(GetVehicleSubtype() != VEHICLE_SUBTYPE_HELI ) )
{
m_pVehicle->byteHorn = byteState;
m_pVehicle->byteHorn2 = byteState;
}
}
//-----------------------------------------------------------
void CVehicle::SetSirenOn(BYTE byteState)

View File

@ -59,6 +59,8 @@ public:
void LinkToInterior(int iInterior);
void SetHornState(BYTE byteState);
BOOL IsOccupied();