SW: Add the oangdiff field to USER struct as suggested by Hendricks,

and use it in MovePoints. This will be used for interpolating
the angles of sprites carried by SOs soon.
This commit is contained in:
NY00123 2020-05-01 00:56:26 +03:00 committed by Christoph Oelckers
parent d467ce3eb8
commit 890a737152
2 changed files with 5 additions and 0 deletions

View File

@ -1594,6 +1594,8 @@ typedef struct
short Vis; // Shading upgrade, for shooting, etc...
SWBOOL DidAlert; // Has actor done his alert noise before?
int16_t oangdiff; // Used for interpolating sprite angles
uint8_t filler;
} USER,*USERp;

View File

@ -1892,6 +1892,7 @@ PlayerPart:
}
}
int16_t oldang = sp->ang;
sp->ang = u->sang;
if (TEST(u->Flags, SPR_ON_SO_SECTOR))
@ -1931,6 +1932,8 @@ PlayerPart:
setspritez(sop->sp_num[i], (vec3_t *)sp);
}
u->oangdiff += GetDeltaAngle(sp->ang, oldang);
if (TEST(sp->extra, SPRX_BLADE))
{
DoBladeDamage(sop->sp_num[i]);