Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60d009c

Browse files
Merge pull request#261 from ICantReadYourMind/master
(III) Fix CHud variables and limit adjuster compatible modelinfoptrs
2 parentsf3cd3cf +49b8fbf commit60d009c

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

‎plugin_III/game_III/CHud.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ float &CHud::m_HelpMessageDisplayTime = *(float*)0x8E2C28;
1616
float &CHud::m_fTextBoxNumLines = *(float*)0x8E2C28;
1717
float &CHud::m_fHelpMessageTime = *(float *)0x8E2C28;
1818
bool &CHud::m_HelpMessageQuick = *(bool *)0x95CCF7;
19-
int CHud::m_ZoneState = *(int*)0x8F29AC;
20-
int CHud::m_ZoneFadeTimer;
21-
int CHud::m_ZoneNameTimer = *(int*)0x8F1A50;
19+
int&CHud::m_ZoneState = *(int*)0x8F29AC;
20+
int&CHud::m_ZoneFadeTimer = *(int*)0x9430F8;
21+
int&CHud::m_ZoneNameTimer = *(int*)0x8F1A50;
2222
wchar_t *&CHud::m_pZoneName = *(wchar_t **)0x8E2C2C;
2323
wchar_t *CHud::m_pLastZoneName = (wchar_t*)0x8F432C;
2424
wchar_t *CHud::m_ZoneToPrint;
25-
int CHud::m_VehicleState = *(int*)0x940560;
26-
int CHud::m_VehicleFadeTimer;
27-
int CHud::m_VehicleNameTimer = *(int*)0x8F2A14;
25+
int&CHud::m_VehicleState = *(int*)0x940560;
26+
int&CHud::m_VehicleFadeTimer = *(int*)0x941510;
27+
int&CHud::m_VehicleNameTimer = *(int*)0x8F2A14;
2828
wchar_t *&CHud::m_VehicleName = *(wchar_t **)0x942FB4;
2929
wchar_t *CHud::m_pLastVehicleName = *(wchar_t **)0x8E2DD8;
3030
wchar_t *CHud::m_pVehicleNameToPrint;

‎plugin_III/game_III/CHud.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ class PLUGIN_API CHud {
4848
staticfloat &m_fTextBoxNumLines;
4949
staticfloat &m_fHelpMessageTime;
5050
staticbool&m_HelpMessageQuick;
51-
staticint m_ZoneState;
52-
staticint m_ZoneFadeTimer;
53-
staticint m_ZoneNameTimer;
51+
staticint&m_ZoneState;
52+
staticint&m_ZoneFadeTimer;
53+
staticint&m_ZoneNameTimer;
5454
staticwchar_t *&m_pZoneName;
5555
staticwchar_t *m_pLastZoneName;
5656
staticwchar_t *m_ZoneToPrint;
5757
staticwchar_t *&m_VehicleName;
5858
staticwchar_t *m_pLastVehicleName;
5959
staticwchar_t *m_pVehicleNameToPrint;
60-
staticint m_VehicleState;
61-
staticint m_VehicleFadeTimer;
62-
staticint m_VehicleNameTimer;
60+
staticint&m_VehicleState;
61+
staticint&m_VehicleFadeTimer;
62+
staticint&m_VehicleNameTimer;
6363
staticwchar_t *m_Message;
6464
staticwchar_t *m_PagerMessage;
6565
staticbool &m_Wants_To_Draw_Hud;

‎plugin_III/game_III/CModelInfo.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
PLUGIN_SOURCE_FILE
1010

1111
PLUGIN_VARIABLE CStore<CClumpModelInfo,5> &CModelInfo::ms_clumpModelStore = *reinterpret_cast<CStore<CClumpModelInfo,5> *>(GLOBAL_ADDRESS_BY_VERSION(0x6FA108,0x6FA108,0x70A248));
12-
PLUGIN_VARIABLE CBaseModelInfo *(&CModelInfo::ms_modelInfoPtrs)[5500] = *reinterpret_cast<CBaseModelInfo *(*)[5500]>(GLOBAL_ADDRESS_BY_VERSION(0x83D408,0x83D408,0x84D548));
1312
PLUGIN_VARIABLE CStore<CSimpleModelInfo,5000> &CModelInfo::ms_simpleModelStore = *reinterpret_cast<CStore<CSimpleModelInfo,5000> *>(GLOBAL_ADDRESS_BY_VERSION(0x885BB4,0x885B64,0x895CA4));
1413
PLUGIN_VARIABLE CStore<CInstance,1> &CModelInfo::ms_mloInstanceStore = *reinterpret_cast<CStore<CInstance,1> *>(GLOBAL_ADDRESS_BY_VERSION(0x8E2B84,0x8E2C38,0x8F2D78));
1514
PLUGIN_VARIABLE CStore<CVehicleModelInfo,120> &CModelInfo::ms_vehicleModelStore = *reinterpret_cast<CStore<CVehicleModelInfo,120> *>(GLOBAL_ADDRESS_BY_VERSION(0x8E2DE0,0x8E2E94,0x8F2FD4));

‎plugin_III/game_III/CModelInfo.h‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
classPLUGIN_API CModelInfo {
2424
public:
2525
SUPPORTED_10EN_11EN_STEAMstatic CStore<CClumpModelInfo,5> &ms_clumpModelStore;
26-
SUPPORTED_10EN_11EN_STEAMstatic CBaseModelInfo *(&ms_modelInfoPtrs)[5500];// static CBaseModelInfo *ms_modelInfoPtrs[5500]
26+
#ifdef LIMIT_ADJUSTER_COMPATIBLE_MODELINFOPTRS
27+
SUPPORTED_10EN_11EN_STEAM PLUGIN_VARIABLEstaticinline CBaseModelInfo* *ms_modelInfoPtrs =reinterpret_cast<CBaseModelInfo**>(GLOBAL_ADDRESS_BY_VERSION(0x83D408,0x83D408,0x84D548));
28+
#else
29+
SUPPORTED_10EN_11EN_STEAM PLUGIN_VARIABLEstaticinline CBaseModelInfo* (&ms_modelInfoPtrs)[5500] = *reinterpret_cast<CBaseModelInfo * (*)[5500]>(GLOBAL_ADDRESS_BY_VERSION(0x83D408,0x83D408,0x84D548));
30+
#endif
2731
SUPPORTED_10EN_11EN_STEAMstatic CStore<CSimpleModelInfo,5000> &ms_simpleModelStore;
2832
SUPPORTED_10EN_11EN_STEAMstatic CStore<CInstance,1> &ms_mloInstanceStore;
2933
SUPPORTED_10EN_11EN_STEAMstatic CStore<CVehicleModelInfo,120> &ms_vehicleModelStore;
@@ -81,7 +85,11 @@ class PLUGIN_API CModelInfo {
8185
// 0 - car, 1 - boat, 2 - train, 3 - heli, 4 - plane
8286
staticinlineintIsVehicleModelType(int index) {
8387
int result;
84-
if (index <5500 && ms_modelInfoPtrs[index]) {
88+
if (
89+
#ifndef LIMIT_ADJUSTER_COMPATIBLE_MODELINFOPTRS
90+
index <5500 &&
91+
#endif
92+
ms_modelInfoPtrs[index]) {
8593
if (ms_modelInfoPtrs[index]->m_nType == MODEL_INFO_VEHICLE)
8694
result =reinterpret_cast<CVehicleModelInfo *>(ms_modelInfoPtrs[index])->m_nVehicleType;
8795
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp