[saco] Implement/match CVehicle::GetLandingGearState()

This commit is contained in:
RD42 2024-08-20 23:33:35 +08:00
parent eb180a5c80
commit 5c6ef63a74
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -61,6 +61,7 @@ public:
BOOL IsSirenOn();
void SetAlarmState(WORD wState);
void SetLandingGearState(eLandingGearState state);
eLandingGearState GetLandingGearState();
void SetEngineState(BOOL bState);