mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- renamed Heardist to HearDist.
This had to wait until the variable was refactored out.
This commit is contained in:
parent
94403684b2
commit
e8718826ba
10 changed files with 21 additions and 21 deletions
|
@ -1499,7 +1499,7 @@ void aiThinkTarget(DBloodActor* actor)
|
|||
auto pSector = pPlayer->actor->sector();
|
||||
|
||||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -1512,7 +1512,7 @@ void aiThinkTarget(DBloodActor* actor)
|
|||
aiActivateDude(actor);
|
||||
return;
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
aiSetTarget(actor, ppos);
|
||||
aiActivateDude(actor);
|
||||
|
@ -1544,7 +1544,7 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
auto pSector = pPlayer->actor->sector();
|
||||
|
||||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -1556,7 +1556,7 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
aiActivateDude(actor);
|
||||
return;
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
aiSetTarget(actor, ppos);
|
||||
aiActivateDude(actor);
|
||||
|
@ -1575,7 +1575,7 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
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);
|
||||
|
|
|
@ -102,7 +102,7 @@ static void batThinkTarget(DBloodActor* actor)
|
|||
auto pSector = pPlayer->actor->sector();
|
||||
|
||||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -113,7 +113,7 @@ static void batThinkTarget(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
aiSetTarget(actor, ppos);
|
||||
aiActivateDude(actor);
|
||||
|
|
|
@ -113,7 +113,7 @@ static void eelThinkTarget(DBloodActor* actor)
|
|||
auto dvect = ppos.XY() - actor->spr.pos;
|
||||
auto pSector = pPlayer->actor->sector();
|
||||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -125,7 +125,7 @@ static void eelThinkTarget(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
aiSetTarget(actor, ppos);
|
||||
|
|
|
@ -244,7 +244,7 @@ static void cerberusThinkTarget(DBloodActor* actor)
|
|||
auto dvect = ppos.XY() - actor->spr.pos;
|
||||
auto pSector = pPlayer->actor->sector();
|
||||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -256,7 +256,7 @@ static void cerberusThinkTarget(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
aiSetTarget(actor, ppos);
|
||||
|
|
|
@ -200,7 +200,7 @@ static void gargThinkTarget(DBloodActor* actor)
|
|||
auto dvect = ppos.XY() - actor->spr.pos;
|
||||
auto pSector = pPlayer->actor->sector();
|
||||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -212,7 +212,7 @@ static void gargThinkTarget(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
aiSetTarget(actor, ppos);
|
||||
|
|
|
@ -181,7 +181,7 @@ static void ghostThinkTarget(DBloodActor* actor)
|
|||
auto dvect = ppos.XY() - actor->spr.pos;
|
||||
auto pSector = pPlayer->actor->sector();
|
||||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -194,7 +194,7 @@ static void ghostThinkTarget(DBloodActor* actor)
|
|||
aiActivateDude(actor);
|
||||
return;
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
aiSetTarget(actor, ppos);
|
||||
|
|
|
@ -207,7 +207,7 @@ static void sub_725A4(DBloodActor* actor)
|
|||
DAngle nAngle = VecToAngle(dvect);
|
||||
double nDist = dvect.Length();
|
||||
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -219,7 +219,7 @@ static void sub_725A4(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
aiSetTarget(actor, ppos);
|
||||
|
|
|
@ -217,7 +217,7 @@ static void myThinkTarget(DBloodActor* actor)
|
|||
auto dvect = ppos.XY() - actor->spr.pos;
|
||||
auto pSector = pPlayer->actor->sector();
|
||||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->Heardist())
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -228,7 +228,7 @@ static void myThinkTarget(DBloodActor* actor)
|
|||
aiSetTarget(actor, pPlayer->actor);
|
||||
aiActivateDude(actor);
|
||||
}
|
||||
else if (nDist < pDudeInfo->Heardist())
|
||||
else if (nDist < pDudeInfo->HearDist())
|
||||
{
|
||||
aiSetTarget(actor, ppos);
|
||||
aiActivateDude(actor);
|
||||
|
|
|
@ -54,7 +54,7 @@ struct DUDEINFO {
|
|||
int at90; // unused ?
|
||||
|
||||
// converters to floating point format
|
||||
inline double Heardist() const
|
||||
inline double HearDist() const
|
||||
{
|
||||
return hearDist * maptoworld;
|
||||
}
|
||||
|
|
|
@ -8423,7 +8423,7 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
|
|||
auto dv = pos.XY() - actor->spr.pos.XY();
|
||||
double nDistf = dv.Length();
|
||||
double seeDistf = (stealth) ? pDudeInfo->SeeDist() / 3 : pDudeInfo->SeeDist() / 4;
|
||||
double hearDistf = pDudeInfo->Heardist();
|
||||
double hearDistf = pDudeInfo->HearDist();
|
||||
double feelDistf = hearDistf / 2;
|
||||
|
||||
// TO-DO: is there any dudes that sees this patrol dude and sees target?
|
||||
|
|
Loading…
Reference in a new issue