mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement/match CVehicle::GetLandingGearState()
This commit is contained in:
parent
eb180a5c80
commit
5c6ef63a74
@ -274,6 +274,23 @@ void CVehicle::SetLandingGearState(eLandingGearState state)
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
eLandingGearState CVehicle::GetLandingGearState()
|
||||
{
|
||||
if(GetVehicleSubtype() != VEHICLE_SUBTYPE_PLANE) return LGS_UP;
|
||||
|
||||
DWORD dwVehiclePtr = (DWORD)m_pVehicle;
|
||||
float fPlaneLandingGear = 0.0f;
|
||||
|
||||
_asm mov eax, dwVehiclePtr
|
||||
_asm mov edx, [eax+0x9CC]
|
||||
_asm mov fPlaneLandingGear, edx
|
||||
|
||||
if(fPlaneLandingGear == 0.0f) return LGS_UP;
|
||||
return LGS_DOWN;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
UINT CVehicle::GetPassengersMax()
|
||||
{
|
||||
return 0;
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
BOOL IsSirenOn();
|
||||
void SetAlarmState(WORD wState);
|
||||
void SetLandingGearState(eLandingGearState state);
|
||||
eLandingGearState GetLandingGearState();
|
||||
|
||||
void SetEngineState(BOOL bState);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user