Fix debug issues in memoverride.cpp

This commit is contained in:
GAMMACASE 2023-10-20 06:20:18 +03:00
parent f653b1ec62
commit 8e69335c67
2 changed files with 9 additions and 2 deletions

View File

@ -14,7 +14,7 @@ CBaseEntity* CEntitySystem::GetBaseEntity(CEntityIndex entnum)
if (!pIdentity)
return nullptr;
if (pIdentity->m_EHandle.GetEntryIndex() != entnum.Get())
if (pIdentity->GetEntityIndex() != entnum)
return nullptr;
return static_cast<CBaseEntity*>(pIdentity->m_pInstance);
@ -33,7 +33,7 @@ CBaseEntity* CEntitySystem::GetBaseEntity(const CEntityHandle& hEnt)
if (!pIdentity)
return nullptr;
if (pIdentity->m_EHandle != hEnt)
if (pIdentity->GetRefEHandle() != hEnt)
return nullptr;
return static_cast<CBaseEntity*>(pIdentity->m_pInstance);

View File

@ -450,7 +450,12 @@ private:
};
#ifdef PREVENT_DEBUG_USAGE
#define AttribIfCrt()
#else
#define AttribIfCrt() CAttibCRT _attrib(nBlockUse)
#endif
#elif defined(POSIX)
#define AttribIfCrt()
#endif // _WIN32
@ -976,11 +981,13 @@ void __cdecl _aligned_free_dbg( void * memblock)
_aligned_free(memblock);
}
#if 0
size_t __cdecl _CrtSetDebugFillThreshold( size_t _NewDebugFillThreshold)
{
Assert(0);
return 0;
}
#endif
//===========================================
// NEW!!! 64-bit