fixed some stuff

This commit is contained in:
2026-03-08 21:12:47 +02:00
parent 321a2f31a9
commit 690132996c
4 changed files with 21 additions and 18 deletions

View File

@@ -132,20 +132,22 @@ void CEntitySystem::Think( float fDelta )
}
}
static void *UTIL_GetNetMapData(CBaseEntity *pEntity, netmap_t *pMap, uint32_t uIndex )
static void *UTIL_GetNetMapData( CBaseEntity *pEntity, netmap_t *pMap, uint32_t uIndex )
{
netmap_t *pCurrentMap = pMap;
uint32_t uCurrentIndex = uIndex;
searchIndex:
if ( uCurrentIndex < pCurrentMap->m_uFieldCount )
if ( pCurrentMap )
{
if (uCurrentIndex >= pCurrentMap->m_uFieldCount)
{
uCurrentIndex -= pCurrentMap->m_uFieldCount;
pCurrentMap = pCurrentMap->m_pBase;
goto searchIndex;
}
return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset;
}
uCurrentIndex -= pCurrentMap->m_uFieldCount;
pCurrentMap = pCurrentMap->m_pBase;
if (!pCurrentMap)
return NULL;
goto searchIndex;
return NULL;
}