Satisfy rollangle table with a 3deg angle

This commit is contained in:
Jaime Passos 2019-12-23 12:17:39 -03:00
parent 551828607c
commit 6779c508e7
2 changed files with 6 additions and 5 deletions

View file

@ -1180,8 +1180,7 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
leftoffset = width - leftoffset;
}
// Don't cache angle = 0
for (angle = 1; angle < ROTANGLES; angle++)
for (angle = 0; angle < ROTANGLES; angle++)
{
INT32 newwidth, newheight;

View file

@ -500,7 +500,7 @@ void R_InitSprites(void)
{
size_t i;
#ifdef ROTSPRITE
INT32 angle, realangle = 0;
INT32 angle, ra;
float fa;
#endif
@ -510,10 +510,12 @@ void R_InitSprites(void)
#ifdef ROTSPRITE
for (angle = 0; angle < ROTANGLES; angle++)
{
fa = ANG2RAD(FixedAngle(realangle<<FRACBITS));
ra = (ROTANGDIFF * angle);
if (!ra)
ra = (ROTANGDIFF / 2) + 1;
fa = ANG2RAD(FixedAngle(ra<<FRACBITS));
cosang2rad[angle] = FLOAT_TO_FIXED(cos(-fa));
sinang2rad[angle] = FLOAT_TO_FIXED(sin(-fa));
realangle += ROTANGDIFF;
}
#endif