Skip to content

Commit 5454969

Browse files
committed
Remove old hacks
1 parent abee415 commit 5454969

File tree

5 files changed

+2
-72
lines changed

5 files changed

+2
-72
lines changed

Client/mods/deathmatch/logic/CClientObjectManager.cpp

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,7 @@ void CClientObjectManager::OnDestruction(CClientObject* pObject)
230230
void CClientObjectManager::UpdateLimitInfo()
231231
{
232232
m_iEntryInfoNodeEntries = g_pMultiplayer->EntryInfoNodePool_NoOfUsedSpaces();
233-
m_iPointerNodeSingleLinkEntries = g_pMultiplayer->PtrNodeSingleLinkPool_NoOfUsedSpaces();
234233
m_iPointerNodeDoubleLinkEntries = g_pMultiplayer->PtrNodeDoubleLinkPool_NoOfUsedSpaces();
235-
236-
/*
237-
CPools* pPools = g_pGame->GetPools();
238-
unsigned int nEntryInfoNodeEntries = pPools->GetEntryInfoNodePool()->GetNumberOfUsedSpaces();
239-
unsigned int nPointerNodeSingleLinkEntries = pPools->GetPointerNodeSingleLinkPool()->GetNumberOfUsedSpaces();
240-
unsigned int nPointerNodeDoubleLinkEntries = pPools->GetPointerNodeDoubleLinkPool()->GetNumberOfUsedSpaces();
241-
242-
g_pCore->ChatPrintf("%d = %d ### %d = %d ### %d = %d", false, nEntryInfoNodeEntries, m_iEntryInfoNodeEntries, nPointerNodeSingleLinkEntries,
243-
m_iPointerNodeSingleLinkEntries, nPointerNodeDoubleLinkEntries, m_iPointerNodeDoubleLinkEntries);
244-
245-
assert(nEntryInfoNodeEntries == m_iEntryInfoNodeEntries);
246-
assert(nPointerNodeSingleLinkEntries == m_iPointerNodeSingleLinkEntries);
247-
assert(nPointerNodeDoubleLinkEntries == m_iPointerNodeDoubleLinkEntries);
248-
*/
249234
}
250235

251236
bool CClientObjectManager::StaticIsObjectLimitReached()
@@ -278,18 +263,16 @@ bool CClientObjectManager::IsHardObjectLimitReached()
278263
return true;
279264

280265
// If we've run out of either of these limit, don't allow more objects
281-
if (m_iEntryInfoNodeEntries >= MAX_ENTRY_INFO_NODES_MTA || m_iPointerNodeSingleLinkEntries >= MAX_POINTER_SINGLE_LINKS_MTA ||
282-
m_iPointerNodeDoubleLinkEntries >= MAX_POINTER_DOUBLE_LINKS_MTA)
266+
if (m_iEntryInfoNodeEntries >= MAX_ENTRY_INFO_NODES_MTA || m_iPointerNodeDoubleLinkEntries >= MAX_POINTER_DOUBLE_LINKS_MTA)
283267
{
284268
if (!m_bDoneLimitWarning)
285269
{
286270
m_bDoneLimitWarning = true;
287271
SString strMessage(
288272
"CClientObjectManager reached limit -"
289273
" ENTRY_INFO_NODES:%d/%d"
290-
" POINTER_SINGLE_LINKS:%d/%d"
291274
" POINTER_DOUBLE_LINKS:%d/%d",
292-
m_iEntryInfoNodeEntries, MAX_ENTRY_INFO_NODES_MTA, m_iPointerNodeSingleLinkEntries, MAX_POINTER_SINGLE_LINKS_MTA,
275+
m_iEntryInfoNodeEntries, MAX_ENTRY_INFO_NODES_MTA,
293276
m_iPointerNodeDoubleLinkEntries, MAX_POINTER_DOUBLE_LINKS_MTA);
294277
g_pCore->GetConsole()->Echo(strMessage);
295278
AddReportLog(7430, strMessage);

Client/mods/deathmatch/logic/CClientObjectManager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class CClientObjectManager
5656
void UpdateLimitInfo();
5757

5858
int m_iEntryInfoNodeEntries;
59-
int m_iPointerNodeSingleLinkEntries;
6059
int m_iPointerNodeDoubleLinkEntries;
6160
uint m_uiMaxStreamedInCount;
6261
uint m_uiMaxLowLodStreamedInCount;

Client/multiplayer_sa/CMultiplayerSA.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ class CMultiplayerSA : public CMultiplayer
354354
DWORD GetLastAnimArrayAddress() { return m_dwLastAnimArrayAddress; }
355355

356356
unsigned int EntryInfoNodePool_NoOfUsedSpaces() const noexcept override;
357-
unsigned int PtrNodeSingleLinkPool_NoOfUsedSpaces() const noexcept override;
358357
unsigned int PtrNodeDoubleLinkPool_NoOfUsedSpaces() const noexcept override;
359358

360359
CVector m_vecAkimboTarget;

Client/multiplayer_sa/CMultiplayerSA_ObjectStreamerOptimization.cpp

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "StdInc.h"
1212

1313
static unsigned int CEntryInfoNodePool_UsedSpaces = 0;
14-
static unsigned int CPtrNodeSingleLinkPool_UsedSpaces = 0;
1514
static unsigned int CPtrNodeDoubleLinkPool_UsedSpaces = 0;
1615

1716
#define HOOKPOS_CEntryInfoNodePool__New 0x536D6E
@@ -55,46 +54,6 @@ static void _declspec(naked) HOOK_CEntryInfoList__Flush()
5554
}
5655
}
5756

58-
#define HOOKPOS_CPtrNodeSingleLinkPool__New 0x55229B
59-
#define HOOKSIZE_CPtrNodeSingleLinkPool__New 0x5
60-
static void _declspec(naked) HOOK_CPtrNodeSingleLinkPool__New()
61-
{
62-
_asm {
63-
inc CPtrNodeSingleLinkPool_UsedSpaces
64-
65-
lea eax, [ecx+eax*8]
66-
pop esi
67-
ret
68-
}
69-
}
70-
#define HOOKPOS_CPtrNodeSingleLink__operator_delete 0x5523AA
71-
#define HOOKSIZE_CPtrNodeSingleLink__operator_delete 0x5
72-
static const unsigned int RETURN_CPtrNodeSingleLink__operator_delete = 0x5523AF;
73-
static void _declspec(naked) HOOK_CPtrNodeSingleLink__operator_delete()
74-
{
75-
_asm {
76-
dec CPtrNodeSingleLinkPool_UsedSpaces
77-
78-
or bl, 0x80
79-
mov [ecx], bl
80-
jmp RETURN_CPtrNodeSingleLink__operator_delete
81-
}
82-
}
83-
84-
#define HOOKPOS_CPtrListSingleLink__Flush 0x55244D
85-
#define HOOKSIZE_CPtrListSingleLink__Flush 0x6
86-
static const unsigned int RETURN_CPtrListSingleLink__Flush = 0x552453;
87-
static void _declspec(naked) HOOK_CPtrListSingleLink__Flush()
88-
{
89-
_asm {
90-
dec CPtrNodeSingleLinkPool_UsedSpaces
91-
92-
or byte ptr [edx+eax], 0x80
93-
add edx, eax
94-
jmp RETURN_CPtrListSingleLink__Flush
95-
}
96-
}
97-
9857
#define HOOKPOS_CPtrNodeDoubleLinkPool__New 0x55233E
9958
#define HOOKSIZE_CPtrNodeDoubleLinkPool__New 0x6
10059
static void _declspec(naked) HOOK_CPtrNodeDoubleLinkPool__New()
@@ -142,10 +101,6 @@ void CMultiplayerSA::InitHooks_ObjectStreamerOptimization()
142101
EZHookInstall(CEntryInfoNode__operator_delete);
143102
EZHookInstall(CEntryInfoList__Flush);
144103

145-
EZHookInstall(CPtrNodeSingleLinkPool__New);
146-
EZHookInstall(CPtrNodeSingleLink__operator_delete);
147-
EZHookInstall(CPtrListSingleLink__Flush);
148-
149104
EZHookInstall(CPtrNodeDoubleLinkPool__New);
150105
EZHookInstall(CPtrNodeDoubleLink__operator_delete);
151106
EZHookInstall(CPtrListDoubleLink__Flush);
@@ -156,11 +111,6 @@ unsigned int CMultiplayerSA::EntryInfoNodePool_NoOfUsedSpaces() const noexcept
156111
return CEntryInfoNodePool_UsedSpaces;
157112
}
158113

159-
unsigned int CMultiplayerSA::PtrNodeSingleLinkPool_NoOfUsedSpaces() const noexcept
160-
{
161-
return CPtrNodeSingleLinkPool_UsedSpaces;
162-
}
163-
164114
unsigned int CMultiplayerSA::PtrNodeDoubleLinkPool_NoOfUsedSpaces() const noexcept
165115
{
166116
return CPtrNodeDoubleLinkPool_UsedSpaces;

Client/sdk/multiplayer/CMultiplayer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,5 @@ class CMultiplayer
460460
virtual DWORD GetLastAnimArrayAddress() = 0;
461461

462462
virtual unsigned int EntryInfoNodePool_NoOfUsedSpaces() const noexcept = 0;
463-
virtual unsigned int PtrNodeSingleLinkPool_NoOfUsedSpaces() const noexcept = 0;
464463
virtual unsigned int PtrNodeDoubleLinkPool_NoOfUsedSpaces() const noexcept = 0;
465464
};

0 commit comments

Comments
 (0)