diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:54:46 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:54:46 +0100 |
commit | a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1 (patch) | |
tree | 147d551bbb7f0de6d6048566405956f18252bfff /src/core | |
parent | script 900-999 (diff) | |
parent | Merge pull request #326 from erorcun/erorcun (diff) | |
download | re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.gz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.bz2 re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.lz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.xz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.zst re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/Camera.h | 1 | ||||
-rw-r--r-- | src/core/ControllerConfig.h | 2 | ||||
-rw-r--r-- | src/core/Frontend.cpp | 2 | ||||
-rw-r--r-- | src/core/Pad.h | 2 | ||||
-rw-r--r-- | src/core/Wanted.cpp | 1 | ||||
-rw-r--r-- | src/core/Wanted.h | 1 | ||||
-rw-r--r-- | src/core/World.cpp | 5 | ||||
-rw-r--r-- | src/core/ZoneCull.cpp | 6 | ||||
-rw-r--r-- | src/core/re3.cpp | 1 |
9 files changed, 13 insertions, 8 deletions
diff --git a/src/core/Camera.h b/src/core/Camera.h index 3e67903f..6b631ee2 100644 --- a/src/core/Camera.h +++ b/src/core/Camera.h @@ -515,6 +515,7 @@ int m_iModeObbeCamIsInForCar; void dtor(void) { this->CCamera::~CCamera(); } }; +static_assert(offsetof(CCamera, DistanceToWater) == 0xe4, "CCamera: error"); static_assert(offsetof(CCamera, m_WideScreenOn) == 0x70, "CCamera: error"); static_assert(offsetof(CCamera, WorldViewerBeingUsed) == 0x75, "CCamera: error"); static_assert(offsetof(CCamera, m_uiNumberOfTrainCamNodes) == 0x84, "CCamera: error"); diff --git a/src/core/ControllerConfig.h b/src/core/ControllerConfig.h index e04f9583..458e457c 100644 --- a/src/core/ControllerConfig.h +++ b/src/core/ControllerConfig.h @@ -116,6 +116,8 @@ public: #ifdef __DINPUT_INCLUDED__ DIJOYSTATE2 m_OldState; DIJOYSTATE2 m_NewState; +#else + uint8 ___padd[0x110 * 2]; #endif wchar m_aActionNames[MAX_CONTROLLERACTIONS][ACTIONNAME_LENGTH]; bool m_aButtonStates[MAX_BUTTONS]; diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 113ae345..751ca23f 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -448,7 +448,7 @@ void CMenuManager::Draw() str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName); break; case MENUPAGE_SAVE_OVERWRITE_CONFIRM: - if (Slots[m_nCurrSaveSlot] == SLOT_EMPTY) + if (Slots[m_nCurrSaveSlot + 1] == SLOT_EMPTY) str = TheText.Get("FESZ_QZ"); else str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName); diff --git a/src/core/Pad.h b/src/core/Pad.h index 03b734cb..f4a07cae 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -389,6 +389,8 @@ public: bool GetRightShoulder1JustDown() { return !!(NewState.RightShoulder1 && !OldState.RightShoulder1); } bool GetRightShoulder2JustDown() { return !!(NewState.RightShoulder2 && !OldState.RightShoulder2); } bool GetStartJustDown() { return !!(NewState.Start && !OldState.Start); } + bool GetLeftStickXJustDown() { return !!(NewState.LeftStickX && !OldState.LeftStickX); } + bool GetLeftStickYJustDown() { return !!(NewState.LeftStickY && !OldState.LeftStickY); } bool GetTriangle() { return !!NewState.Triangle; } bool GetCircle() { return !!NewState.Circle; } diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp index bafe0ae1..7af753e8 100644 --- a/src/core/Wanted.cpp +++ b/src/core/Wanted.cpp @@ -13,6 +13,7 @@ int32 &CWanted::MaximumWantedLevel = *(int32*)0x5F7714; // 6 int32 &CWanted::nMaximumWantedLevel = *(int32*)0x5F7718; // 6400 WRAPPER void CWanted::Reset() { EAXJMP(0x4AD790) }; +WRAPPER void CWanted::Update() { EAXJMP(0x4AD7B0) }; void CWanted::Initialise() diff --git a/src/core/Wanted.h b/src/core/Wanted.h index c908a4e5..f6dbe8d0 100644 --- a/src/core/Wanted.h +++ b/src/core/Wanted.h @@ -78,6 +78,7 @@ public: void ReportCrimeNow(eCrimeType type, const CVector &coors, bool policeDoesntCare); void UpdateWantedLevel(); void Reset(); + void Update(); bool IsIgnored(void) { return m_bIgnoredByCops || m_bIgnoredByEveryone; } diff --git a/src/core/World.cpp b/src/core/World.cpp index d026e971..70e526e8 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -866,10 +866,9 @@ CVehicle* FindPlayerVehicle(void) { CPlayerPed *ped = FindPlayerPed(); - if(ped->InVehicle()) + if(ped && ped->InVehicle()) return ped->m_pMyVehicle; - else - return nil; + return nil; } CVehicle* diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp index 7b22a550..4a2bea4f 100644 --- a/src/core/ZoneCull.cpp +++ b/src/core/ZoneCull.cpp @@ -462,7 +462,7 @@ CCullZone::DoStuffEnteringZone_OneBuilding(uint16 i) }else{ i -= 6000; for(j = 0; j < 3; j++) - DoStuffLeavingZone_OneBuilding(CCullZones::aIndices[i+j]); + DoStuffEnteringZone_OneBuilding(CCullZones::aIndices[i+j]); } } @@ -481,7 +481,7 @@ CCullZone::DoStuffEnteringZone_OneTreadablePlus10m(uint16 i) }else{ i -= 6000; for(j = 0; j < 3; j++) - DoStuffLeavingZone_OneBuilding(CCullZones::aIndices[i+j]); + DoStuffEnteringZone_OneTreadablePlus10m(CCullZones::aIndices[i+j]); } } @@ -499,7 +499,7 @@ CCullZone::DoStuffEnteringZone_OneTreadable(uint16 i) }else{ i -= 6000; for(j = 0; j < 3; j++) - DoStuffLeavingZone_OneBuilding(CCullZones::aIndices[i+j]); + DoStuffEnteringZone_OneTreadable(CCullZones::aIndices[i+j]); } } diff --git a/src/core/re3.cpp b/src/core/re3.cpp index d3b8200d..989a05b5 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -350,7 +350,6 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Debug", "Make peds follow you in formation", LetThemFollowYou); #ifdef TOGGLEABLE_BETA_FEATURES - DebugMenuAddVarBool8("Debug", "Toggle unused fight feature", (int8*)&CPed::bUnusedFightThingOnPlayer, nil); DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil); DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil); DebugMenuAddVarBool8("Debug", "Toggle peds running to phones to report crimes", (int8*)&CPed::bMakePedsRunToPhonesToReportCrimes, nil); |