mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: do not alter the state if invalid HANDLE was passed to pfnSPR_Set. Fixes Half-Life: MMod
This commit is contained in:
parent
3a956a1ad3
commit
1630d87c0d
@ -1417,7 +1417,13 @@ pfnSPR_Set
|
|||||||
*/
|
*/
|
||||||
static void GAME_EXPORT pfnSPR_Set( HSPRITE hPic, int r, int g, int b )
|
static void GAME_EXPORT pfnSPR_Set( HSPRITE hPic, int r, int g, int b )
|
||||||
{
|
{
|
||||||
clgame.ds.pSprite = CL_GetSpritePointer( hPic );
|
const model_t *sprite = CL_GetSpritePointer( hPic );
|
||||||
|
|
||||||
|
// a1ba: do not alter the state if invalid HSPRITE was passed
|
||||||
|
if( !sprite )
|
||||||
|
return;
|
||||||
|
|
||||||
|
clgame.ds.pSprite = sprite;
|
||||||
clgame.ds.spriteColor[0] = bound( 0, r, 255 );
|
clgame.ds.spriteColor[0] = bound( 0, r, 255 );
|
||||||
clgame.ds.spriteColor[1] = bound( 0, g, 255 );
|
clgame.ds.spriteColor[1] = bound( 0, g, 255 );
|
||||||
clgame.ds.spriteColor[2] = bound( 0, b, 255 );
|
clgame.ds.spriteColor[2] = bound( 0, b, 255 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user