IClientEntity* LocalEntity = g_EntityList->GetClientEntity(g_EngineClient->GetLocalPlayer());
if (!LocalEntity) return;
if (!pInfo.pModel || !LocalEntity)
{
oDrawModelExecute(ecx, thisptr, state, pInfo, pCustomBoneToWorld);
g_MdlRender->ForcedMaterialOverride(NULL);
return;
}
IClientEntity* Entity = g_EntityList->GetClientEntity(pInfo.entity_index);
if (!Entity)
{
oDrawModelExecute(ecx, thisptr, state, pInfo, pCustomBoneToWorld);
g_MdlRender->ForcedMaterialOverride(NULL);
return;
}
ClientClass* EntityClass = Entity->GetClientClass();
if (!Entity)
{
oDrawModelExecute(ecx, thisptr, state, pInfo, pCustomBoneToWorld);
g_MdlRender->ForcedMaterialOverride(NULL);
return;
}