add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+5 -7
View File
@@ -201,7 +201,7 @@ static void AdjustSubRect(CEngineSprite *pSprite, int frame, float *pfLeft, floa
*pw = rc.right - rc.left;
*ph = rc.bottom - rc.top;
f = 1.0 / (float)pSprite->GetWidth();
f = 1.0 / (float)pSprite->GetWidth();;
*pfLeft = ((float)rc.left + 0.5) * f;
*pfRight = ((float)rc.right - 0.5) * f;
@@ -415,14 +415,12 @@ IMaterial *CEngineSprite::GetMaterial( RenderMode_t nRenderMode, int nFrame )
m_VideoMaterial->SetFrame( nFrame );
}
IMaterial *pMaterial = m_material[nRenderMode];
if ( pMaterial )
IMaterialVar* pFrameVar = pMaterial->FindVarFast( "$frame", &frameCache );
if ( pFrameVar )
{
IMaterialVar* pFrameVar = pMaterial->FindVarFast( "$frame", &frameCache );
if ( pFrameVar )
{
pFrameVar->SetIntValue( nFrame );
}
pFrameVar->SetIntValue( nFrame );
}
return pMaterial;