- deleted GetUpAngle

The only caller of this function did not even use its result so it all went to waste
This commit is contained in:
Christoph Oelckers 2022-09-09 19:06:54 +02:00
parent 6caec39afa
commit 6c44728d4a
3 changed files with 1 additions and 25 deletions

View file

@ -233,7 +233,6 @@ int PlotCourseToSprite(DExhumedActor* nSprite1, DExhumedActor* nSprite2);
void CheckSectorFloor(sectortype* pSector, int z, int *x, int *y);
int GetAngleToSprite(DExhumedActor* nSprite1, DExhumedActor* nSprite2);
int GetWallNormal(walltype* nWall);
int GetUpAngle(DExhumedActor* nSprite1, int nVal, DExhumedActor* nSprite2, int ecx);
void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel);
Collision AngleChase(DExhumedActor* nSprite, DExhumedActor* nSprite2, int ebx, int ecx, int push1);
void SetQuake(DExhumedActor* nSprite, int nVal);

View file

@ -344,10 +344,7 @@ void AILavaDude::Tick(RunListEvent* ev)
{
if ((nFlag & 0x80) && pTarget)
{
int nHeight = GetActorHeight(pActor);
GetUpAngle(pActor, -64000, pTarget, (-(nHeight >> 1)));
BuildBullet(pActor, 10, -1, pActor->spr.angle, pTarget, 1);
BuildBullet(pActor, 10, -1, pActor->spr.angle, pTarget, 1);
}
else if (var_1C)
{

View file

@ -735,26 +735,6 @@ void CheckSectorFloor(sectortype* pSector, int z, int *x, int *y)
}
}
int GetUpAngle(DExhumedActor* pActor1, int nVal, DExhumedActor* pActor2, int ecx)
{
int x = pActor2->int_pos().X - pActor1->int_pos().X;
int y = pActor2->int_pos().Y - pActor1->int_pos().Y;
int ebx = (pActor2->int_pos().Z + ecx) - (pActor1->int_pos().Z + nVal);
int edx = (pActor2->int_pos().Z + ecx) - (pActor1->int_pos().Z + nVal);
ebx >>= 4;
edx >>= 8;
ebx = -ebx;
ebx -= edx;
int nSqrt = lsqrt(x * x + y * y);
return getangle(nSqrt, ebx);
}
void InitPushBlocks()
{
nPushBlocks = 0;