- Blood: replaced the remaining spr.pos with int_pos()

This commit is contained in:
Christoph Oelckers 2022-01-30 18:09:26 +01:00
parent 458fc219ed
commit 4a3e9f6df1
4 changed files with 74 additions and 74 deletions

View file

@ -84,8 +84,8 @@ static void burnThinkGoto(DBloodActor* actor)
{
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
@ -157,8 +157,8 @@ static void burnThinkChase(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
auto target = actor->GetTarget();
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
aiChooseDirection(actor, getangle(dx, dy));
if (target->xspr.health == 0)
{
@ -195,7 +195,7 @@ static void burnThinkChase(DBloodActor* actor)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
if (cansee(target->spr.pos.X, target->spr.pos.Y, target->spr.pos.Z, target->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - height, actor->sector()))
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
{

View file

@ -94,8 +94,8 @@ static void calebThinkGoto(DBloodActor* actor)
auto pSector = actor->sector();
auto pXSector = pSector->hasX() ? &pSector->xs() : nullptr;
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
@ -126,8 +126,8 @@ static void calebThinkChase(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
auto target = actor->GetTarget();
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
aiChooseDirection(actor, getangle(dx, dy));
if (target->xspr.health == 0)
{
@ -153,15 +153,15 @@ static void calebThinkChase(DBloodActor* actor)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
if (cansee(target->spr.pos.X, target->spr.pos.Y, target->spr.pos.Z, target->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - height, actor->sector()))
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
{
aiSetTarget(actor, actor->GetTarget());
actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->spr.pos.Z - actor->spr.pos.Z, nDist, 10);
actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->int_pos().Z - actor->int_pos().Z, nDist, 10);
if (nDist < 0x599 && abs(nDeltaAngle) < 28)
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -212,8 +212,8 @@ static void calebThinkSwimGoto(DBloodActor* actor)
{
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
@ -233,8 +233,8 @@ static void calebThinkSwimChase(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
auto target = actor->GetTarget();
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
aiChooseDirection(actor, getangle(dx, dy));
if (target->xspr.health == 0)
{
@ -250,10 +250,10 @@ static void calebThinkSwimChase(DBloodActor* actor)
if (nDist <= pDudeInfo->seeDist)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
int height = pDudeInfo->eyeHeight + actor->spr.pos.Z;
int height = pDudeInfo->eyeHeight + actor->int_pos().Z;
int top, bottom;
GetActorExtents(actor, &top, &bottom);
if (cansee(target->spr.pos.X, target->spr.pos.Y, target->spr.pos.Z, target->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - height, actor->sector()))
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
{
@ -284,8 +284,8 @@ static void sub_65D04(DBloodActor* actor)
return;
if (actor->GetTarget() == nullptr)
actor->spr.ang = (actor->spr.ang + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (Random(64) < 32 && nDist <= 0x400)
return;
@ -310,8 +310,8 @@ static void sub_65F44(DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int z = actor->spr.pos.Z + getDudeInfo(actor->spr.type)->eyeHeight;
int z2 = target->spr.pos.Z + getDudeInfo(target->spr.type)->eyeHeight;
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.ang) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.ang = (actor->spr.ang + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
@ -321,8 +321,8 @@ static void sub_65F44(DBloodActor* actor)
actor->xspr.goalAng = (actor->spr.ang + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int dz = z2 - z;
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
@ -346,8 +346,8 @@ static void sub_661E0(DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int z = actor->spr.pos.Z + getDudeInfo(actor->spr.type)->eyeHeight;
int z2 = target->spr.pos.Z + getDudeInfo(target->spr.type)->eyeHeight;
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.ang) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.ang = (actor->spr.ang + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
@ -357,8 +357,8 @@ static void sub_661E0(DBloodActor* actor)
actor->spr.ang = (actor->spr.ang + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int dz = (z2 - z) << 3;
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)

View file

@ -65,7 +65,7 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor)
}
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int dz = target->spr.pos.Z - actor->spr.pos.Z;
int dz = target->int_pos().Z - actor->int_pos().Z;
actFireVector(actor, 350, -100, dx, dy, dz, kVectorCerberusHack);
actFireVector(actor, -350, 0, dx, dy, dz, kVectorCerberusHack);
actFireVector(actor, 0, 0, dx, dy, dz, kVectorCerberusHack);
@ -77,8 +77,8 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
int height = pDudeInfo->eyeHeight * actor->spr.yrepeat;
if (!actor->ValidateTarget(__FUNCTION__)) return;
int x = actor->spr.pos.X;
int y = actor->spr.pos.Y;
int x = actor->int_pos().X;
int y = actor->int_pos().Y;
int z = height; // ???
TARGETTRACK tt1 = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
@ -91,9 +91,9 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
{
if (actor == actor2 || !(actor2->spr.flags & 8))
continue;
int x2 = actor2->spr.pos.X;
int y2 = actor2->spr.pos.Y;
int z2 = actor2->spr.pos.Z;
int x2 = actor2->int_pos().X;
int y2 = actor2->int_pos().Y;
int z2 = actor2->int_pos().Z;
int nDist = approxDist(x2 - x, y2 - y);
if (nDist == 0 || nDist > 0x2800)
continue;
@ -122,7 +122,7 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
int nDeltaAngle = ((nAngle - actor->spr.ang + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt1.at8)
{
int tz1 = actor2->spr.pos.Z - actor->spr.pos.Z;
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
if (cansee(x, y, z, actor->sector(), x2, y2, z2, actor2->sector()))
{
nClosest = nDist2;
@ -152,8 +152,8 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int height = pDudeInfo->eyeHeight * actor->spr.yrepeat;
int x = actor->spr.pos.X;
int y = actor->spr.pos.Y;
int x = actor->int_pos().X;
int y = actor->int_pos().Y;
int z = height; // ???
TARGETTRACK tt1 = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
@ -168,9 +168,9 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
{
if (actor == actor2 || !(actor2->spr.flags & 8))
continue;
int x2 = actor2->spr.pos.X;
int y2 = actor2->spr.pos.Y;
int z2 = actor2->spr.pos.Z;
int x2 = actor2->int_pos().X;
int y2 = actor2->int_pos().Y;
int z2 = actor2->int_pos().Z;
int nDist = approxDist(x2 - x, y2 - y);
if (nDist == 0 || nDist > 0x2800)
continue;
@ -259,16 +259,16 @@ static void cerberusThinkTarget(DBloodActor* actor)
PLAYER* pPlayer = &gPlayer[p];
if (pPlayer->actor->xspr.health == 0 || powerupCheck(pPlayer, kPwUpShadowCloak) > 0)
continue;
int x = pPlayer->actor->spr.pos.X;
int y = pPlayer->actor->spr.pos.Y;
int z = pPlayer->actor->spr.pos.Z;
int x = pPlayer->actor->int_pos().X;
int y = pPlayer->actor->int_pos().Y;
int z = pPlayer->actor->int_pos().Z;
auto pSector = pPlayer->actor->sector();
int dx = x - actor->spr.pos.X;
int dy = y - actor->spr.pos.Y;
int dx = x - actor->int_pos().X;
int dy = y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (nDist > pDudeInfo->seeDist && nDist > pDudeInfo->hearDist)
continue;
if (!cansee(x, y, z, pSector, actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
continue;
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
@ -297,8 +297,8 @@ static void cerberusThinkGoto(DBloodActor* actor)
return;
}
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
@ -341,8 +341,8 @@ static void cerberusThinkChase(DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
aiChooseDirection(actor, getangle(dx, dy));
if (target->xspr.health == 0) {
@ -374,7 +374,7 @@ static void cerberusThinkChase(DBloodActor* actor)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
if (cansee(target->spr.pos.X, target->spr.pos.Y, target->spr.pos.Z, target->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - height, actor->sector()))
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery) {
aiSetTarget(actor, actor->GetTarget());
@ -402,7 +402,7 @@ static void cerberusThinkChase(DBloodActor* actor)
}
else if (nDist < 0x200 && abs(nDeltaAngle) < 85)
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (actor->spr.type) {
case kDudeCerberusTwoHead:
switch (hit) {

View file

@ -131,9 +131,9 @@ void cultThrowSeqCallback(int, DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dz = target->spr.pos.Z - actor->spr.pos.Z;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
int dz = target->int_pos().Z - actor->int_pos().Z;
int nDist = approxDist(dx, dy);
int nDist2 = nDist / 540;
if (nDist > 0x1e00)
@ -164,9 +164,9 @@ void sub_68230(int, DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dz = target->spr.pos.Z - actor->spr.pos.Z;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
int dz = target->int_pos().Z - actor->int_pos().Z;
int nDist = approxDist(dx, dy);
int nDist2 = nDist / 540;
auto pMissile = actFireThing(actor, 0, 0, dz / 128 - 14500, nMissile, (nDist2 << 17) / 120);
@ -194,8 +194,8 @@ static void cultThinkGoto(DBloodActor* actor)
{
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int dx = actor->xspr.TargetPos.X - actor->spr.pos.X;
int dy = actor->xspr.TargetPos.Y - actor->spr.pos.Y;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
@ -235,8 +235,8 @@ static void cultThinkChase(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
auto target = actor->GetTarget();
int dx = target->spr.pos.X - actor->spr.pos.X;
int dy = target->spr.pos.Y - actor->spr.pos.Y;
int dx = target->int_pos().X - actor->int_pos().X;
int dy = target->int_pos().Y - actor->int_pos().Y;
aiChooseDirection(actor, getangle(dx, dy));
if (target->xspr.health == 0)
{
@ -275,19 +275,19 @@ static void cultThinkChase(DBloodActor* actor)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
if (cansee(target->spr.pos.X, target->spr.pos.Y, target->spr.pos.Z, target->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - height, actor->sector()))
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
{
aiSetTarget(actor, actor->GetTarget());
actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->spr.pos.Z - actor->spr.pos.Z, nDist, 10);
actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->int_pos().Z - actor->int_pos().Z, nDist, 10);
switch (actor->spr.type) {
case kDudeCultistTommy:
if (nDist < 0x1e00 && nDist > 0xe00 && abs(nDeltaAngle) < 85 && !TargetNearExplosion(target->sector())
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000))
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -308,7 +308,7 @@ static void cultThinkChase(DBloodActor* actor)
}
else if (nDist < 0x4600 && abs(nDeltaAngle) < 28)
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -355,7 +355,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty >= 2 && target->IsPlayerActor() && !gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000))
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -376,7 +376,7 @@ static void cultThinkChase(DBloodActor* actor)
}
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -423,7 +423,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000))
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -445,7 +445,7 @@ static void cultThinkChase(DBloodActor* actor)
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{
AISTATE *pCultistTsProneFire = !cl_bloodvanillaenemies && !VanillaMode() ? &cultistTsProneFireFixed : &cultistTsProneFire;
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -491,7 +491,7 @@ static void cultThinkChase(DBloodActor* actor)
if (nDist < 0x2c00 && nDist > 0x1400 && abs(nDeltaAngle) < 85
&& (target->spr.flags & 2) && target->IsPlayerActor())
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -512,7 +512,7 @@ static void cultThinkChase(DBloodActor* actor)
else if (nDist < 0x1400 && abs(nDeltaAngle) < 85
&& (target->spr.flags & 2) && target->IsPlayerActor())
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -536,7 +536,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000))
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1:
@ -557,7 +557,7 @@ static void cultThinkChase(DBloodActor* actor)
}
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{
int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit)
{
case -1: