mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement/match CVehicle::SetLandingGearState(...)
This commit is contained in:
parent
83a85fe44f
commit
eb180a5c80
@ -247,6 +247,33 @@ void CVehicle::SetAlarmState(WORD wState)
|
|||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
|
void CVehicle::SetLandingGearState(eLandingGearState state)
|
||||||
|
{
|
||||||
|
if(GetVehicleSubtype() != VEHICLE_SUBTYPE_PLANE) return;
|
||||||
|
|
||||||
|
DWORD dwVehiclePtr = (DWORD)m_pVehicle;
|
||||||
|
float fPlaneLandingGear = 0.0f;
|
||||||
|
|
||||||
|
_asm mov eax, dwVehiclePtr
|
||||||
|
_asm mov edx, [eax+0x9CC]
|
||||||
|
_asm mov fPlaneLandingGear, edx
|
||||||
|
|
||||||
|
if (state == LGS_DOWN && fPlaneLandingGear == 0.0f)
|
||||||
|
{
|
||||||
|
_asm mov ecx, dwVehiclePtr
|
||||||
|
_asm mov edx, 0x6CAC20
|
||||||
|
_asm call edx
|
||||||
|
}
|
||||||
|
else if(state == LGS_UP && fPlaneLandingGear == 1.0f)
|
||||||
|
{
|
||||||
|
_asm mov ecx, dwVehiclePtr
|
||||||
|
_asm mov edx, 0x6CAC70
|
||||||
|
_asm call edx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
UINT CVehicle::GetPassengersMax()
|
UINT CVehicle::GetPassengersMax()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
|
||||||
|
enum eLandingGearState
|
||||||
|
{
|
||||||
|
LGS_UP,
|
||||||
|
LGS_DOWN,
|
||||||
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
class CVehicle : public CEntity
|
class CVehicle : public CEntity
|
||||||
@ -54,6 +60,7 @@ public:
|
|||||||
void SetSirenOn(BYTE byteState);
|
void SetSirenOn(BYTE byteState);
|
||||||
BOOL IsSirenOn();
|
BOOL IsSirenOn();
|
||||||
void SetAlarmState(WORD wState);
|
void SetAlarmState(WORD wState);
|
||||||
|
void SetLandingGearState(eLandingGearState state);
|
||||||
|
|
||||||
void SetEngineState(BOOL bState);
|
void SetEngineState(BOOL bState);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user