mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-03-03 17:25:27 +03:00
Fix sprites not obeying view hide flags
This commit is contained in:
parent
dccd6974e5
commit
8dc9e9ab0d
@ -399,10 +399,38 @@ int C_SpriteRenderer::DrawSprite(
|
||||
if ( group == RENDER_GROUP_VIEW_MODEL_TRANSLUCENT || group == RENDER_GROUP_VIEW_MODEL_OPAQUE )
|
||||
return 0;
|
||||
}
|
||||
#ifdef MAPBASE
|
||||
if (ent->m_iViewHideFlags > 0)
|
||||
{
|
||||
// Hide this entity if it's not supposed to be drawn in this view.
|
||||
if (ent->m_iViewHideFlags & (1 << CurrentViewID()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
QAngle temp;
|
||||
ent->GetAttachment( attachmentindex, effect_origin, temp );
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
if ( entity )
|
||||
{
|
||||
C_BaseEntity *ent = entity->GetBaseEntity();
|
||||
if ( ent )
|
||||
{
|
||||
if (ent->m_iViewHideFlags > 0)
|
||||
{
|
||||
// Hide this entity if it's not supposed to be drawn in this view.
|
||||
if (ent->m_iViewHideFlags & (1 << CurrentViewID()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( rendermode != kRenderNormal )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user