- eliminate GetActorHeight

This commit is contained in:
Christoph Oelckers 2022-09-10 21:24:03 +02:00
parent 55d01509fa
commit c65c317665
2 changed files with 3 additions and 8 deletions

View file

@ -214,11 +214,7 @@ DExhumedActor* UpdateEnemy(DExhumedActor** ppEnemy);
Collision MoveCreature(DExhumedActor* nSprite);
Collision MoveCreatureWithCaution(DExhumedActor* actor);
DVector3 WheresMyMouth(int nPlayer, sectortype** sectnum);
int GetActorHeight(DExhumedActor* nSprite);
double GetActorHeightF(DExhumedActor* nSprite)
{
return GetActorHeight(nSprite) * zinttoworld;
}
double GetActorHeightF(DExhumedActor* nSprite);
DExhumedActor* insertActor(sectortype* s, int st);
DExhumedActor* GrabBody();
DExhumedActor* GrabBodyGunSprite();

View file

@ -382,9 +382,9 @@ Collision movespritez(DExhumedActor* pActor, double z, double height, int clipdi
return nRet;
}
int GetActorHeight(DExhumedActor* actor)
double GetActorHeightF(DExhumedActor* actor)
{
return tileHeight(actor->spr.picnum) * actor->spr.yrepeat * 4;
return tileHeight(actor->spr.picnum) * actor->spr.yrepeat * REPEAT_SCALE;
}
DExhumedActor* insertActor(sectortype* s, int st)
@ -914,7 +914,6 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int threshol
else
{
double nHeight = GetActorHeightF(pActor2) / 2;
int nHeight1 = GetActorHeight(pActor2) / 2;
auto vect = pActor2->spr.pos.XY() - pActor->spr.pos.XY();
DAngle nMyAngle = VecToAngle(vect);
double nSqrt = vect.Length();