mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 11:11:16 +00:00
- the rest of ai.cpp.
This commit is contained in:
parent
48cadbd392
commit
ca58e3fc6b
1 changed files with 3 additions and 3 deletions
|
@ -925,7 +925,7 @@ void aiSetTarget(DBloodActor* actor, DBloodActor* target)
|
|||
{
|
||||
actor->SetTarget(target);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(target->spr.type);
|
||||
double eyeHeight = ((pDudeInfo->eyeHeight * target->spr.yrepeat) << 2) * inttoworld;
|
||||
double eyeHeight = (pDudeInfo->eyeHeight * target->spr.yrepeat) * REPEAT_SCALE;
|
||||
actor->xspr.TargetPos = target->spr.pos.plusZ(-eyeHeight);
|
||||
}
|
||||
}
|
||||
|
@ -1575,11 +1575,11 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
BloodStatIterator it(kStatDude);
|
||||
while (DBloodActor* actor2 = it.Next())
|
||||
{
|
||||
int nDist = approxDist(actor2->spr.pos.XY() - actor->spr.pos.XY());
|
||||
double nDist = (actor2->spr.pos.XY() - actor->spr.pos.XY()).Length();
|
||||
if (actor2->spr.type == kDudeInnocent)
|
||||
{
|
||||
pDudeInfo = getDudeInfo(actor2->spr.type);
|
||||
if (nDist > pDudeInfo->seeDist && nDist > pDudeInfo->hearDist)
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
continue;
|
||||
aiSetTarget(actor, actor2);
|
||||
aiActivateDude(actor);
|
||||
|
|
Loading…
Reference in a new issue