mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-30 00:49:34 +03:00
Fix sprites not obeying view hide flags
This commit is contained in:
parent
dccd6974e5
commit
8dc9e9ab0d
@ -399,11 +399,39 @@ int C_SpriteRenderer::DrawSprite(
|
|||||||
if ( group == RENDER_GROUP_VIEW_MODEL_TRANSLUCENT || group == RENDER_GROUP_VIEW_MODEL_OPAQUE )
|
if ( group == RENDER_GROUP_VIEW_MODEL_TRANSLUCENT || group == RENDER_GROUP_VIEW_MODEL_OPAQUE )
|
||||||
return 0;
|
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;
|
QAngle temp;
|
||||||
ent->GetAttachment( attachmentindex, effect_origin, 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 )
|
if ( rendermode != kRenderNormal )
|
||||||
{
|
{
|
||||||
float blend = render->GetBlend();
|
float blend = render->GetBlend();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user