Decals: Avoid attempting to cache and display decals with no yet-defined texture.
This commit is contained in:
parent
b6e9aceb02
commit
365ac0a5fa
1 changed files with 9 additions and 0 deletions
|
@ -82,6 +82,10 @@ decal::predraw(void)
|
||||||
return PREDRAW_NEXT;
|
return PREDRAW_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* skip empty decals */
|
||||||
|
if (!dcl.m_strShader)
|
||||||
|
return;
|
||||||
|
|
||||||
/* don't draw us, unnecessary */
|
/* don't draw us, unnecessary */
|
||||||
/*if (checkpvs(getproperty(VF_ORIGIN), this) == FALSE) {
|
/*if (checkpvs(getproperty(VF_ORIGIN), this) == FALSE) {
|
||||||
return PREDRAW_NEXT;
|
return PREDRAW_NEXT;
|
||||||
|
@ -96,6 +100,11 @@ void
|
||||||
decal::BuildShader(void)
|
decal::BuildShader(void)
|
||||||
{
|
{
|
||||||
string shader_buff;
|
string shader_buff;
|
||||||
|
|
||||||
|
/* skip empty decals */
|
||||||
|
if (!m_strTexture)
|
||||||
|
return;
|
||||||
|
|
||||||
m_strShader = sprintf("decal_%s", m_strTexture);
|
m_strShader = sprintf("decal_%s", m_strTexture);
|
||||||
shader_buff = sprintf(g_decal_shader, m_strTexture);
|
shader_buff = sprintf(g_decal_shader, m_strTexture);
|
||||||
shaderforname(m_strShader, shader_buff);
|
shaderforname(m_strShader, shader_buff);
|
||||||
|
|
Loading…
Reference in a new issue