networking i guess

This commit is contained in:
2026-02-28 21:07:44 +02:00
parent e83f7cd448
commit 03c560c2b7
68 changed files with 1348 additions and 121 deletions

View File

@@ -0,0 +1,34 @@
#include "basemodelentity.h"
void C_BaseModelEntity::Precache()
{
}
void C_BaseModelEntity::Spawn()
{
BaseClass::Spawn();
SetThink(Think);
}
void C_BaseModelEntity::Think( float fDelta )
{
m_pInstance->SetPosition(GetAbsOrigin());
m_pInstance->SetRotation(GetAbsAngles());
m_pInstance->SetScale({GetScale(),GetScale(),GetScale()});
}
void C_BaseModelEntity::SetModel( const char *szName )
{
if (m_uModelIndex)
{
g_pAssetManager->UnrefModel(m_uModelIndex);
}
m_uModelIndex = g_pAssetManager->LoadModel(szName);
m_pModel = g_pAssetManager->GetModelByIndex(m_uModelIndex);
m_pInstance = g_pWorldRenderer->CreateInstance(m_pModel->m_pMesh);
}
BEGIN_DATADESC(C_BaseModelEntity)
END_DATADESC()