sync with upstream

This commit is contained in:
Nikolay Korolev
2020-02-15 14:54:46 +03:00
33 changed files with 2027 additions and 937 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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()

View File

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

View File

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

View File

@ -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]);
}
}

View File

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