mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CVehicle::SetHornState(...)
This commit is contained in:
parent
587e87d11d
commit
83a85fe44f
@ -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)
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
|
||||
void LinkToInterior(int iInterior);
|
||||
|
||||
void SetHornState(BYTE byteState);
|
||||
|
||||
BOOL IsOccupied();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user