mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-15 13:16:58 +00:00
add source-sdk-2013
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user