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

@@ -166,17 +166,19 @@ static void *UTIL_GetNetMapData(C_BaseEntity *pEntity, netmap_t *pMap, uint32_t
netmap_t *pCurrentMap = pMap;
uint32_t uCurrentIndex = uIndex;
searchIndex:
if (uCurrentIndex >= pCurrentMap->m_uFieldCount || pCurrentMap->m_pBase )
if ( pCurrentMap )
{
if (uCurrentIndex >= pCurrentMap->m_uFieldCount)
{
uCurrentIndex -= pCurrentMap->m_uFieldCount;
pCurrentMap = pCurrentMap->m_pBase;
if (!pCurrentMap)
return NULL;
goto searchIndex;
}
return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset;
}
return NULL;
}
void CEntitySystem::NetRecvPacket( NetPacket_t *pPacket )
{

View File

@@ -103,7 +103,6 @@ void CFunnyMeshInstance::Frame()
v[2] = m_vScale.z;
glm_scale_make(m, v);
glm_mat4_mul(m_data.m_matTranslation, m, m_data.m_matTranslation);
glm_mat4_inv(m_data.m_matTranslation, m_data.m_matTranslation);
m_data.m_uAlbedo = 1;
}

View File

@@ -137,15 +137,17 @@ static void *UTIL_GetNetMapData(CBaseEntity *pEntity, netmap_t *pMap, uint32_t u
netmap_t *pCurrentMap = pMap;
uint32_t uCurrentIndex = uIndex;
searchIndex:
if ( uCurrentIndex < pCurrentMap->m_uFieldCount )
if ( pCurrentMap )
{
if (uCurrentIndex >= pCurrentMap->m_uFieldCount)
{
return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset;
}
uCurrentIndex -= pCurrentMap->m_uFieldCount;
pCurrentMap = pCurrentMap->m_pBase;
if (!pCurrentMap)
return NULL;
goto searchIndex;
}
return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset;
}
return NULL;
}

View File

@@ -114,9 +114,9 @@ DECLARE_VULKAN_COMMAND(SetViewport)
{
VkViewport v = {
fX,
fY,
fY+fHeight,
fWidth,
fHeight,
-fHeight,
fDepthMin,
fDepthMax
};