When calculating which rotation to use for CON action viewtype 7, offset the frame intervals by 15 degrees instead of 22.5, clearly a copypaste error from viewtypes 5 or 8. Now these are properly centered.

git-svn-id: https://svn.eduke32.com/eduke32@6304 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-27 11:01:26 +00:00
parent 01b6047377
commit f55758bc2e
1 changed files with 3 additions and 2 deletions

View File

@ -3437,12 +3437,13 @@ static int32_t getofs_viewtype5(const uspritetype *pSprite, uspritetype *pTSprit
static int32_t getofs_viewtype7(const uspritetype *pSprite, uspritetype *pTSprite, int viewAng, uint8_t invertp)
{
int angDiff = invertp ? viewAng - pSprite->ang : pSprite->ang - viewAng;
int frameOffset = ((angDiff + 3072 + 128) & 2047) / 170;
int frameOffset = ((angDiff + 3072 + 85) & 2047) / 170;
if (frameOffset > 6)
{
if (frameOffset < 12)
pTSprite->cstat |= 4;
frameOffset = 12 - frameOffset;
pTSprite->cstat |= 4;
}
else
pTSprite->cstat &= ~4;