diff --git a/game/client/entitysystem.cpp b/game/client/entitysystem.cpp index dc4dd8b..fd3a434 100644 --- a/game/client/entitysystem.cpp +++ b/game/client/entitysystem.cpp @@ -161,21 +161,23 @@ void CEntitySystem::Think() } } -static void *UTIL_GetNetMapData(C_BaseEntity *pEntity, netmap_t *pMap, uint32_t uIndex ) +static void *UTIL_GetNetMapData( C_BaseEntity *pEntity, netmap_t *pMap, uint32_t uIndex ) { netmap_t *pCurrentMap = pMap; uint32_t uCurrentIndex = uIndex; searchIndex: - if (uCurrentIndex >= pCurrentMap->m_uFieldCount || pCurrentMap->m_pBase ) + if ( pCurrentMap ) { - uCurrentIndex -= pCurrentMap->m_uFieldCount; - pCurrentMap = pCurrentMap->m_pBase; - if (!pCurrentMap) - return NULL; - goto searchIndex; + if (uCurrentIndex >= pCurrentMap->m_uFieldCount) + { + uCurrentIndex -= pCurrentMap->m_uFieldCount; + pCurrentMap = pCurrentMap->m_pBase; + goto searchIndex; + } + return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset; } + return NULL; - return (char*)pEntity+pCurrentMap->m_pFields[uCurrentIndex].m_uOffset; } void CEntitySystem::NetRecvPacket( NetPacket_t *pPacket ) diff --git a/game/client/worldrender.cpp b/game/client/worldrender.cpp index 8b5d8e5..5cef572 100644 --- a/game/client/worldrender.cpp +++ b/game/client/worldrender.cpp @@ -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; } diff --git a/game/server/entitysystem.cpp b/game/server/entitysystem.cpp index fb114e4..1902c35 100644 --- a/game/server/entitysystem.cpp +++ b/game/server/entitysystem.cpp @@ -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; } diff --git a/materialsystem/vulkan/commands/draw.cpp b/materialsystem/vulkan/commands/draw.cpp index b96ec93..d80fefa 100644 --- a/materialsystem/vulkan/commands/draw.cpp +++ b/materialsystem/vulkan/commands/draw.cpp @@ -114,9 +114,9 @@ DECLARE_VULKAN_COMMAND(SetViewport) { VkViewport v = { fX, - fY, + fY+fHeight, fWidth, - fHeight, + -fHeight, fDepthMin, fDepthMax };