Initialize these variables

This commit is contained in:
Lactozilla 2023-11-06 19:03:57 -03:00
parent b29a474dee
commit 7121bc717c
2 changed files with 6 additions and 9 deletions

View file

@ -4978,7 +4978,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
spriteinfo_t *sprinfo = NULL; spriteinfo_t *sprinfo = NULL;
#endif #endif
md2_t *md2; md2_t *md2;
unsigned rot; unsigned rot = 0;
UINT16 flip = 0; UINT16 flip = 0;
boolean vflip = (!(thing->eflags & MFE_VERTICALFLIP) != !R_ThingVerticallyFlipped(thing)); boolean vflip = (!(thing->eflags & MFE_VERTICALFLIP) != !R_ThingVerticallyFlipped(thing));
boolean mirrored = thing->mirrored; boolean mirrored = thing->mirrored;
@ -4992,8 +4992,8 @@ static void HWR_ProjectSprite(mobj_t *thing)
float z1, z2; float z1, z2;
patch_t *gpatch = NULL; patch_t *gpatch = NULL;
fixed_t spr_width, spr_height; fixed_t spr_width = 0, spr_height = 0;
fixed_t spr_offset, spr_topoffset; fixed_t spr_offset = 0, spr_topoffset = 0;
#ifdef ROTSPRITE #ifdef ROTSPRITE
patch_t *rotsprite = NULL; patch_t *rotsprite = NULL;
INT32 rollangle = 0; INT32 rollangle = 0;
@ -5204,9 +5204,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
rollangle = R_GetRollAngle(InvAngle(spriterotangle)); rollangle = R_GetRollAngle(InvAngle(spriterotangle));
} }
else else
{
rollangle = R_GetRollAngle(spriterotangle); rollangle = R_GetRollAngle(spriterotangle);
}
if (using_sprite) if (using_sprite)
rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle); rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle);

View file

@ -1549,7 +1549,7 @@ static void R_ProjectSprite(mobj_t *thing)
INT32 trans; INT32 trans;
vissprite_t *vis; vissprite_t *vis;
patch_t *patch; patch_t *patch = NULL;
spritecut_e cut = SC_NONE; spritecut_e cut = SC_NONE;
@ -1577,9 +1577,8 @@ static void R_ProjectSprite(mobj_t *thing)
fixed_t this_scale; fixed_t this_scale;
fixed_t spritexscale, spriteyscale; fixed_t spritexscale, spriteyscale;
// rotsprite fixed_t spr_width = 0, spr_height = 0;
fixed_t spr_width, spr_height; fixed_t spr_offset = 0, spr_topoffset = 0;
fixed_t spr_offset, spr_topoffset;
#ifdef ROTSPRITE #ifdef ROTSPRITE
patch_t *rotsprite = NULL; patch_t *rotsprite = NULL;