diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index 451eab3d..e8bde1fc 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -2928,10 +2928,14 @@ void CL_PlayerDecal( int playernum, int customIndex, int entityIndex, float *pos { if( !pCust->nUserData1 ) { - qboolean updateSprayTexture; + int sprayTextureIndex; const char *decalname = va( "player%dlogo%d", playernum, customIndex ); - updateSprayTexture = ref.dllFuncs.GL_FindTexture( decalname ) != 0; - pCust->nUserData1 = ref.dllFuncs.GL_LoadTextureFromBuffer( decalname, pCust->pInfo, TF_DECAL, updateSprayTexture ); + sprayTextureIndex = ref.dllFuncs.GL_FindTexture( decalname ); + if( sprayTextureIndex != 0 ) + { + ref.dllFuncs.GL_FreeTexture( sprayTextureIndex ); + } + pCust->nUserData1 = GL_LoadTextureInternal( decalname, pCust->pInfo, TF_DECAL ); } textureIndex = pCust->nUserData1; }