mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Match VehicleHorn_Hook()
This commit is contained in:
parent
249b3e13ec
commit
c09dde988d
@ -258,15 +258,16 @@ NUDE VehicleHorn_Hook()
|
||||
_asm mov eax, [edx+16]
|
||||
_asm mov _pHornVehicle, eax
|
||||
|
||||
if( _pHornVehicle && _pHornVehicle->pDriver &&
|
||||
IN_VEHICLE(_pHornVehicle->pDriver) &&
|
||||
_pHornVehicle->pDriver->dwPedType == 4 )
|
||||
_byteSavedControlFlags = _pHornVehicle->entity.nControlFlags;
|
||||
|
||||
if( _pHornVehicle->pDriver &&
|
||||
IN_VEHICLE(_pHornVehicle->pDriver) )
|
||||
{
|
||||
_byteSavedControlFlags = _pHornVehicle->entity.nControlFlags;
|
||||
_pHornVehicle->entity.nControlFlags = 0x02;
|
||||
_iHasSetHornHookFix = 1;
|
||||
//_iHasSetHornHookFix = 1;
|
||||
} else {
|
||||
_iHasSetHornHookFix = 0;
|
||||
_pHornVehicle->entity.nControlFlags = 0x22;
|
||||
//_iHasSetHornHookFix = 0;
|
||||
}
|
||||
|
||||
_asm push _dwVehicleParams
|
||||
@ -274,9 +275,7 @@ NUDE VehicleHorn_Hook()
|
||||
_asm mov edx, 0x5002C0
|
||||
_asm call edx
|
||||
|
||||
if(_iHasSetHornHookFix) {
|
||||
_pHornVehicle->entity.nControlFlags = _byteSavedControlFlags;
|
||||
}
|
||||
_pHornVehicle->entity.nControlFlags = _byteSavedControlFlags;
|
||||
|
||||
_asm retn 4
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user