mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 15:11:04 +00:00
- Exhumed: Get rid of GetAngleToSprite()
in favour of backend utility.
This commit is contained in:
parent
eaa58e6687
commit
e2d3c4dceb
4 changed files with 2 additions and 17 deletions
|
@ -227,7 +227,6 @@ DExhumedActor* FindPlayer(DExhumedActor* nSprite, int nDistance, bool dontengage
|
|||
DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial = false);
|
||||
double PlotCourseToSprite(DExhumedActor* nSprite1, DExhumedActor* nSprite2);
|
||||
void CheckSectorFloor(sectortype* pSector, double z, DVector2& xy);
|
||||
DAngle GetAngleToSprite(DExhumedActor* nSprite1, DExhumedActor* nSprite2);
|
||||
void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& vel);
|
||||
Collision AngleChase(DExhumedActor* nSprite, DExhumedActor* nSprite2, int ebx, int ecx, DAngle push1);
|
||||
void SetQuake(DExhumedActor* nSprite, int nVal);
|
||||
|
|
|
@ -585,20 +585,6 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DAngle GetAngleToSprite(DExhumedActor* a1, DExhumedActor* a2)
|
||||
{
|
||||
if (!a1 || !a2)
|
||||
return -minAngle;
|
||||
|
||||
return (a2->spr.pos - a1->spr.pos).Angle();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
double PlotCourseToSprite(DExhumedActor* pActor1, DExhumedActor* pActor2)
|
||||
{
|
||||
if (pActor1 == nullptr || pActor2 == nullptr)
|
||||
|
|
|
@ -1265,7 +1265,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
if (nTotalPlayers <= 1)
|
||||
{
|
||||
setForcedSyncInput(nPlayer);
|
||||
pPlayerActor->spr.Angles = DRotator(nullAngle, GetAngleToSprite(pPlayerActor, pSpiritSprite), nullAngle);
|
||||
pPlayerActor->spr.Angles = DRotator(nullAngle, (pSpiritSprite->spr.pos.XY() - pPlayerActor->spr.pos.XY()).Angle(), nullAngle);
|
||||
pPlayerActor->backupang();
|
||||
|
||||
pPlayer->vel.Zero();
|
||||
|
|
|
@ -297,7 +297,7 @@ DExhumedActor* FindSnakeEnemy(int nSnake)
|
|||
{
|
||||
if (pAct2 != pPlayerActor && !(pAct2->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
DAngle nAngle2 = absangle(nAngle, GetAngleToSprite(pActor, pAct2));
|
||||
DAngle nAngle2 = absangle(nAngle, (pAct2->spr.pos.XY() - pActor->spr.pos.XY()).Angle());
|
||||
if (nAngle2 < maxangle)
|
||||
{
|
||||
pEnemy = pAct2;
|
||||
|
|
Loading…
Reference in a new issue