diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-17 17:08:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 17:08:26 +0200 |
commit | 1c74d111e8cafa4ad70837725c71f6d478390f01 (patch) | |
tree | 818918190bf4403c32137d7348a77e23b643a669 /src/vehicles/Plane.cpp | |
parent | implemented CVector2D::NormaliseSafe for SkidMarks (diff) | |
parent | appveyor setup (diff) | |
download | re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.gz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.bz2 re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.lz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.xz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.zst re3-1c74d111e8cafa4ad70837725c71f6d478390f01.zip |
Diffstat (limited to 'src/vehicles/Plane.cpp')
-rw-r--r-- | src/vehicles/Plane.cpp | 93 |
1 files changed, 36 insertions, 57 deletions
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 49f5d69d..273ac54a 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -1,6 +1,6 @@ #include "common.h" #include "main.h" -#include "patcher.h" + #include "General.h" #include "ModelIndices.h" #include "FileMgr.h" @@ -16,35 +16,35 @@ #include "HandlingMgr.h" #include "Plane.h" -CPlaneNode *pPathNodes;// = *(CPlaneNode**)0x8F1B68; -CPlaneNode *pPath2Nodes;// = *(CPlaneNode**)0x885B8C; -CPlaneNode *pPath3Nodes;// = *(CPlaneNode**)0x885B78; -CPlaneNode *pPath4Nodes;// = *(CPlaneNode**)0x885AD8; -int32 NumPathNodes;// = *(int32*)0x8F2BE4; -int32 NumPath2Nodes;// = *(int32*)0x941498; -int32 NumPath3Nodes;// = *(int32*)0x9414D8; -int32 NumPath4Nodes;// = *(int32*)0x9412C8; -float TotalLengthOfFlightPath;// = *(float*)0x8F2C6C; -float TotalLengthOfFlightPath2;// = *(float*)0x64CFBC; -float TotalLengthOfFlightPath3;// = *(float*)0x64CFD0; -float TotalLengthOfFlightPath4;// = *(float*)0x64CFDC; -float TotalDurationOfFlightPath;// = *(float*)0x64CFB8; -float TotalDurationOfFlightPath2;// = *(float*)0x64CFC0; -float TotalDurationOfFlightPath3;// = *(float*)0x64CFD4; -float TotalDurationOfFlightPath4;// = *(float*)0x64CFE0; -float LandingPoint;// = *(float*)0x8F2C7C; -float TakeOffPoint;// = *(float*)0x8E28A4; -CPlaneInterpolationLine aPlaneLineBits[6]; // = (CPlaneInterpolationLine*)0x734168; - -float PlanePathPosition[3];// = (float*)0x8F5FC8; //[3] -float OldPlanePathPosition[3];// = (float*)0x8F5FBC; //[3] -float PlanePathSpeed[3];// = (float*)0x941538; //[3] -float PlanePath2Position[3];// = (float*)0x64CFC4; //[3] -float PlanePath3Position;// = *(float*)0x64CFD8; -float PlanePath4Position;// = *(float*)0x64CFE4; -float PlanePath2Speed[3];// = (float*)0x8F1A54; //[3] -float PlanePath3Speed;// = *(float*)0x8F1A94; -float PlanePath4Speed;// = *(float*)0x8F1AFC; +CPlaneNode *pPathNodes; +CPlaneNode *pPath2Nodes; +CPlaneNode *pPath3Nodes; +CPlaneNode *pPath4Nodes; +int32 NumPathNodes; +int32 NumPath2Nodes; +int32 NumPath3Nodes; +int32 NumPath4Nodes; +float TotalLengthOfFlightPath; +float TotalLengthOfFlightPath2; +float TotalLengthOfFlightPath3; +float TotalLengthOfFlightPath4; +float TotalDurationOfFlightPath; +float TotalDurationOfFlightPath2; +float TotalDurationOfFlightPath3; +float TotalDurationOfFlightPath4; +float LandingPoint; +float TakeOffPoint; +CPlaneInterpolationLine aPlaneLineBits[6]; + +float PlanePathPosition[3]; +float OldPlanePathPosition[3]; +float PlanePathSpeed[3]; +float PlanePath2Position[3]; +float PlanePath3Position; +float PlanePath4Position; +float PlanePath2Speed[3]; +float PlanePath3Speed; +float PlanePath4Speed; enum @@ -55,12 +55,12 @@ enum CESNA_STATUS_LANDED, }; -int32 &CesnaMissionStatus = *(int32*)0x64CFE8; -int32 &CesnaMissionStartTime = *(int32*)0x64CFEC; -CPlane *&pDrugRunCesna = *(CPlane**)0x8F5F80; -int32 &DropOffCesnaMissionStatus = *(int32*)0x64CFF0; -int32 &DropOffCesnaMissionStartTime = *(int32*)0x64CFF4; -CPlane *&pDropOffCesna = *(CPlane**)0x8E2A38; +int32 CesnaMissionStatus; +int32 CesnaMissionStartTime; +CPlane *pDrugRunCesna; +int32 DropOffCesnaMissionStatus; +int32 DropOffCesnaMissionStartTime; +CPlane *pDropOffCesna; CPlane::CPlane(int32 id, uint8 CreatedBy) @@ -965,24 +965,3 @@ const CVector CPlane::FindDropOffCesnaCoordinates(void) { return pDropOffCesna-> bool CPlane::HasCesnaLanded(void) { return CesnaMissionStatus == CESNA_STATUS_LANDED; } bool CPlane::HasCesnaBeenDestroyed(void) { return CesnaMissionStatus == CESNA_STATUS_DESTROYED; } bool CPlane::HasDropOffCesnaBeenShotDown(void) { return DropOffCesnaMissionStatus == CESNA_STATUS_DESTROYED; } - -#include <new> - -class CPlane_ : public CPlane -{ -public: - void ctor(int32 id, uint8 CreatedBy) { ::new (this) CPlane(id, CreatedBy); } - void dtor(void) { CPlane::~CPlane(); } -}; - -STARTPATCHES - InjectHook(0x54B170, &CPlane_::ctor, PATCH_JUMP); - InjectHook(0x54B270, &CPlane_::dtor, PATCH_JUMP); - InjectHook(0x54B820, CPlane::InitPlanes, PATCH_JUMP); - InjectHook(0x54BCD0, CPlane::Shutdown, PATCH_JUMP); - InjectHook(0x54BD50, CPlane::LoadPath, PATCH_JUMP); - InjectHook(0x54BEC0, CPlane::UpdatePlanes, PATCH_JUMP); - InjectHook(0x54DE90, CPlane::TestRocketCollision, PATCH_JUMP); - InjectHook(0x54E000, CPlane::CreateIncomingCesna, PATCH_JUMP); - InjectHook(0x54E160, CPlane::CreateDropOffCesna, PATCH_JUMP); -ENDPATCHES |