mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- floatified 2 functions in aicaleb.cpp
This commit is contained in:
parent
1c23a2aa32
commit
64619478fa
1 changed files with 6 additions and 6 deletions
|
@ -94,10 +94,10 @@ static void calebThinkGoto(DBloodActor* actor)
|
|||
auto pXSector = pSector->hasX() ? &pSector->xs() : nullptr;
|
||||
|
||||
auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY();
|
||||
int nAngle = getangle(dvec);
|
||||
DAngle nAngle = VecToAngle(dvec);
|
||||
double nDist = dvec.Length();
|
||||
aiChooseDirection(actor, DAngle::fromBuild(nAngle));
|
||||
if (nDist < 32 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
|
||||
aiChooseDirection(actor, nAngle);
|
||||
if (nDist < 32 && absangle(actor->spr.angle, nAngle) < pDudeInfo->Periphery())
|
||||
{
|
||||
if (pXSector && pXSector->Underwater)
|
||||
aiNewState(actor, &tinycalebSwimSearch);
|
||||
|
@ -213,10 +213,10 @@ static void calebThinkSwimGoto(DBloodActor* actor)
|
|||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY();
|
||||
int nAngle = getangle(dvec);
|
||||
DAngle nAngle = VecToAngle(dvec);
|
||||
double nDist = dvec.Length();
|
||||
aiChooseDirection(actor, DAngle::fromBuild(nAngle));
|
||||
if (nDist < 32 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
|
||||
aiChooseDirection(actor, nAngle);
|
||||
if (nDist < 32 && absangle(actor->spr.angle, nAngle) < pDudeInfo->Periphery())
|
||||
aiNewState(actor, &tinycalebSwimSearch);
|
||||
aiThinkTarget(actor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue