mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
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:
parent
01b6047377
commit
f55758bc2e
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
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 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 > 6)
|
||||||
{
|
{
|
||||||
|
if (frameOffset < 12)
|
||||||
|
pTSprite->cstat |= 4;
|
||||||
frameOffset = 12 - frameOffset;
|
frameOffset = 12 - frameOffset;
|
||||||
pTSprite->cstat |= 4;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pTSprite->cstat &= ~4;
|
pTSprite->cstat &= ~4;
|
||||||
|
|
Loading…
Reference in a new issue