- eliminated AngleChase inline.

This commit is contained in:
Christoph Oelckers 2021-10-21 19:57:46 +02:00
parent be19dbb2ce
commit 49c1163a33
2 changed files with 6 additions and 10 deletions

View file

@ -277,11 +277,7 @@ int GetUpAngle(DExhumedActor* nSprite1, int nVal, DExhumedActor* nSprite2, int e
return GetUpAngle(nSprite1->GetSpriteIndex(), nVal, nSprite2->GetSpriteIndex(), ecx);
}
void MoveSector(short nSector, int nAngle, int *nXVel, int *nYVel);
int AngleChase(int nSprite, int nSprite2, int ebx, int ecx, int push1);
inline Collision AngleChase(DExhumedActor* nSprite, DExhumedActor* nSprite2, int ebx, int ecx, int push1)
{
return Collision(AngleChase(nSprite->GetSpriteIndex(), nSprite2? nSprite2->GetSpriteIndex() : -1, ebx, ecx, push1));
}
Collision AngleChase(DExhumedActor* nSprite, DExhumedActor* nSprite2, int ebx, int ecx, int push1);
void SetQuake(short nSprite, int nVal);
void SetQuake(DExhumedActor* nSprite, int nVal)
{

View file

@ -1207,9 +1207,9 @@ void SetQuake(short nSprite, int nVal)
}
}
int AngleChase(int nSprite, int nSprite2, int ebx, int ecx, int push1)
Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int ecx, int push1)
{
auto pSprite = &sprite[nSprite];
auto pSprite = &pActor->s();
int nClipType = pSprite->statnum != 107;
/* bjd - need to handle cliptype to clipmask change that occured in later build engine version */
@ -1222,14 +1222,14 @@ int AngleChase(int nSprite, int nSprite2, int ebx, int ecx, int push1)
short nAngle;
if (nSprite2 < 0)
if (pActor2 == nullptr)
{
pSprite->zvel = 0;
nAngle = pSprite->ang;
}
else
{
auto pSprite2 = &sprite[nSprite2];
auto pSprite2 = &pActor2->s();
int nHeight = tileHeight(pSprite2->picnum) * pSprite2->yrepeat * 2;
@ -1300,7 +1300,7 @@ int AngleChase(int nSprite, int nSprite2, int ebx, int ecx, int push1)
int z = bsin(pSprite->zvel) * ksqrt(sqrtNum);
return movesprite(nSprite, x >> 2, y >> 2, (z >> 13) + bsin(ecx, -5), 0, 0, nClipType);
return movesprite(pActor, x >> 2, y >> 2, (z >> 13) + bsin(ecx, -5), 0, 0, nClipType);
}
int GetWallNormal(short nWall)