Make RageTexture::GetTextureCoordRect wrap instead of seg fault when given an out of range frame.
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ void RageTexture::GetFrameDimensionsFromFileName( RString sPath, int* piFramesWi
|
|||||||
|
|
||||||
const RectF *RageTexture::GetTextureCoordRect( int iFrameNo ) const
|
const RectF *RageTexture::GetTextureCoordRect( int iFrameNo ) const
|
||||||
{
|
{
|
||||||
return &m_TextureCoordRects[iFrameNo];
|
return &m_TextureCoordRects[iFrameNo % GetNumFrames()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
|
|||||||
Reference in New Issue
Block a user