mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: initialize variables in SPR_Width/Height/Frames functions, in case R_GetSpriteParms fails
This commit is contained in:
parent
774ced312f
commit
3a956a1ad3
@ -1372,7 +1372,7 @@ pfnSPR_Frames
|
|||||||
*/
|
*/
|
||||||
int EXPORT pfnSPR_Frames( HSPRITE hPic )
|
int EXPORT pfnSPR_Frames( HSPRITE hPic )
|
||||||
{
|
{
|
||||||
int numFrames;
|
int numFrames = 0;
|
||||||
|
|
||||||
ref.dllFuncs.R_GetSpriteParms( NULL, NULL, &numFrames, 0, CL_GetSpritePointer( hPic ));
|
ref.dllFuncs.R_GetSpriteParms( NULL, NULL, &numFrames, 0, CL_GetSpritePointer( hPic ));
|
||||||
|
|
||||||
@ -1387,7 +1387,7 @@ pfnSPR_Height
|
|||||||
*/
|
*/
|
||||||
static int GAME_EXPORT pfnSPR_Height( HSPRITE hPic, int frame )
|
static int GAME_EXPORT pfnSPR_Height( HSPRITE hPic, int frame )
|
||||||
{
|
{
|
||||||
int sprHeight;
|
int sprHeight = 0;
|
||||||
|
|
||||||
ref.dllFuncs.R_GetSpriteParms( NULL, &sprHeight, NULL, frame, CL_GetSpritePointer( hPic ));
|
ref.dllFuncs.R_GetSpriteParms( NULL, &sprHeight, NULL, frame, CL_GetSpritePointer( hPic ));
|
||||||
|
|
||||||
@ -1402,7 +1402,7 @@ pfnSPR_Width
|
|||||||
*/
|
*/
|
||||||
static int GAME_EXPORT pfnSPR_Width( HSPRITE hPic, int frame )
|
static int GAME_EXPORT pfnSPR_Width( HSPRITE hPic, int frame )
|
||||||
{
|
{
|
||||||
int sprWidth;
|
int sprWidth = 0;
|
||||||
|
|
||||||
ref.dllFuncs.R_GetSpriteParms( &sprWidth, NULL, NULL, frame, CL_GetSpritePointer( hPic ));
|
ref.dllFuncs.R_GetSpriteParms( &sprWidth, NULL, NULL, frame, CL_GetSpritePointer( hPic ));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user