mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-07 02:28:22 +00:00
Fix debug issues in memoverride.cpp
This commit is contained in:
parent
f653b1ec62
commit
8e69335c67
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user