- partial HitScan parameter change

The really easy stuff…
This commit is contained in:
Christoph Oelckers 2022-08-23 22:45:42 +02:00
parent f45e6317ab
commit 478672879e
13 changed files with 38 additions and 34 deletions

View file

@ -6819,7 +6819,7 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
a4 += Random3(4000); a4 += Random3(4000);
a5 += Random3(4000); a5 += Random3(4000);
a6 += Random3(4000); a6 += Random3(4000);
if (HitScan(actor, gHitInfo.int_hitpos().Z, a4, a5, a6, CLIPMASK1, tt) == 0) if (HitScan(actor, gHitInfo.hitpos.Z, a4, a5, a6, CLIPMASK1, tt) == 0)
{ {
if (approxDist(gHitInfo.hitpos.XY() - actor->spr.pos.XY()) <= tt) if (approxDist(gHitInfo.hitpos.XY() - actor->spr.pos.XY()) <= tt)
{ {

View file

@ -89,7 +89,7 @@ void StompSeqCallback(int, DBloodActor* actor)
int v10 = 25 + 30 * gGameOptions.nDifficulty; int v10 = 25 + 30 * gGameOptions.nDifficulty;
const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode(); // use new sector checking logic const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode(); // use new sector checking logic
auto sectorMap = GetClosestSpriteSectors(pSector, actor->spr.pos.XY(), vc, nullptr, newSectCheckMethod); auto sectorMap = GetClosestSpriteSectors(pSector, actor->spr.pos.XY(), vc, nullptr, newSectCheckMethod);
int hit = HitScan(actor, actor->int_pos().Z, angx, angy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, angx, angy, 0, CLIPMASK1, 0);
DBloodActor* actorh = nullptr; DBloodActor* actorh = nullptr;
actHitcodeToData(hit, &gHitInfo, &actorh); actHitcodeToData(hit, &gHitInfo, &actorh);
@ -243,7 +243,7 @@ static void beastThinkChase(DBloodActor* actor)
if (nDist < 0x1400 && nDist > 0xa00 && abs(nDeltaAngle) < 85 && (target->spr.flags & 2) if (nDist < 0x1400 && nDist > 0xa00 && abs(nDeltaAngle) < 85 && (target->spr.flags & 2)
&& target->IsPlayerActor() && Chance(0x8000)) && target->IsPlayerActor() && Chance(0x8000))
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
if (target->xspr.health > (unsigned)gPlayerTemplate[0].startHealth / 2) if (target->xspr.health > (unsigned)gPlayerTemplate[0].startHealth / 2)
{ {
switch (hit) switch (hit)
@ -275,7 +275,7 @@ static void beastThinkChase(DBloodActor* actor)
} }
if (nDist < 921 && abs(nDeltaAngle) < 28) if (nDist < 921 && abs(nDeltaAngle) < 28)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -163,7 +163,7 @@ static void calebThinkChase(DBloodActor* actor)
{ {
int dx = dvec.X * worldtoint; int dx = dvec.X * worldtoint;
int dy = dvec.Y * worldtoint; int dy = dvec.Y * worldtoint;
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -401,7 +401,7 @@ static void cerberusThinkChase(DBloodActor* actor)
{ {
int dx = dvec.X * worldtoint; int dx = dvec.X * worldtoint;
int dy = dvec.Y * worldtoint; int dy = dvec.Y * worldtoint;
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (actor->spr.type) { switch (actor->spr.type) {
case kDudeCerberusTwoHead: case kDudeCerberusTwoHead:
switch (hit) { switch (hit) {

View file

@ -286,7 +286,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning && (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000)) && Chance(0x8000))
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -307,7 +307,7 @@ static void cultThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x4600 && abs(nDeltaAngle) < 28) else if (nDist < 0x4600 && abs(nDeltaAngle) < 28)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -354,7 +354,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty >= 2 && target->IsPlayerActor() && !gPlayer[target->spr.type - kDudePlayer1].isRunning && (target->spr.flags & 2) && gGameOptions.nDifficulty >= 2 && target->IsPlayerActor() && !gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000)) && Chance(0x8000))
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -375,7 +375,7 @@ static void cultThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28) else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -422,7 +422,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning && (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000)) && Chance(0x8000))
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -444,7 +444,7 @@ static void cultThinkChase(DBloodActor* actor)
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28) else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{ {
AISTATE *pCultistTsProneFire = !cl_bloodvanillaenemies && !VanillaMode() ? &cultistTsProneFireFixed : &cultistTsProneFire; AISTATE *pCultistTsProneFire = !cl_bloodvanillaenemies && !VanillaMode() ? &cultistTsProneFireFixed : &cultistTsProneFire;
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -490,7 +490,7 @@ static void cultThinkChase(DBloodActor* actor)
if (nDist < 0x2c00 && nDist > 0x1400 && abs(nDeltaAngle) < 85 if (nDist < 0x2c00 && nDist > 0x1400 && abs(nDeltaAngle) < 85
&& (target->spr.flags & 2) && target->IsPlayerActor()) && (target->spr.flags & 2) && target->IsPlayerActor())
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -511,7 +511,7 @@ static void cultThinkChase(DBloodActor* actor)
else if (nDist < 0x1400 && abs(nDeltaAngle) < 85 else if (nDist < 0x1400 && abs(nDeltaAngle) < 85
&& (target->spr.flags & 2) && target->IsPlayerActor()) && (target->spr.flags & 2) && target->IsPlayerActor())
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -535,7 +535,7 @@ static void cultThinkChase(DBloodActor* actor)
&& (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning && (target->spr.flags & 2) && gGameOptions.nDifficulty > 2 && target->IsPlayerActor() && gPlayer[target->spr.type - kDudePlayer1].isRunning
&& Chance(0x8000)) && Chance(0x8000))
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -556,7 +556,7 @@ static void cultThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28) else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -371,7 +371,7 @@ static void gargThinkChase(DBloodActor* actor)
case kDudeGargoyleFlesh: case kDudeGargoyleFlesh:
if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85) if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -396,7 +396,7 @@ static void gargThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x400 && abs(nDeltaAngle) < 85) else if (nDist < 0x400 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -430,7 +430,7 @@ static void gargThinkChase(DBloodActor* actor)
case kDudeGargoyleStone: case kDudeGargoyleStone:
if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85) if (nDist < 0x1800 && nDist > 0xc00 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -455,7 +455,7 @@ static void gargThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x400 && abs(nDeltaAngle) < 85) else if (nDist < 0x400 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -348,7 +348,7 @@ static void ghostThinkChase(DBloodActor* actor)
switch (actor->spr.type) { switch (actor->spr.type) {
case kDudePhantasm: case kDudePhantasm:
if (nDist < 0x2000 && nDist > 0x1000 && abs(nDeltaAngle) < 85) { if (nDist < 0x2000 && nDist > 0x1000 && abs(nDeltaAngle) < 85) {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -368,7 +368,7 @@ static void ghostThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x400 && abs(nDeltaAngle) < 85) else if (nDist < 0x400 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -148,7 +148,7 @@ static void gillThinkChase(DBloodActor* actor)
actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->int_pos().Z - actor->int_pos().Z, nDist, 10); actor->dudeSlope = nDist == 0 ? 0 : DivScale(target->int_pos().Z - actor->int_pos().Z, nDist, 10);
if (nDist < 921 && abs(nDeltaAngle) < 28) if (nDist < 921 && abs(nDeltaAngle) < 28)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -70,7 +70,7 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
auto const target = actor->GetTarget(); auto const target = actor->GetTarget();
if (target->IsPlayerActor()) if (target->IsPlayerActor())
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
if (hit == 3 && gHitInfo.actor()->IsPlayerActor()) if (hit == 3 && gHitInfo.actor()->IsPlayerActor())
{ {
dz += target->int_pos().Z - actor->int_pos().Z; dz += target->int_pos().Z - actor->int_pos().Z;

View file

@ -139,7 +139,7 @@ static bool genDudeAdjustSlope(DBloodActor* actor, int dist, int weaponType, int
for (int i = -8191; i < 8192; i += by) for (int i = -8191; i < 8192; i += by)
{ {
HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), i, clipMask, dist); HitScan(actor, actor->spr.pos.Z, bcos(actor->int_ang()), bsin(actor->int_ang()), i, clipMask, dist);
if (!fStart && actor->GetTarget() == gHitInfo.actor()) fStart = i; if (!fStart && actor->GetTarget() == gHitInfo.actor()) fStart = i;
else if (fStart && actor->GetTarget() != gHitInfo.actor()) else if (fStart && actor->GetTarget() != gHitInfo.actor())
{ {
@ -555,7 +555,7 @@ static void unicultThinkChase(DBloodActor* actor)
} }
else if (dist < 12264 && dist > 7680 && !spriteIsUnderwater(actor, false) && curWeapon != kModernThingEnemyLifeLeech) else if (dist < 12264 && dist > 7680 && !spriteIsUnderwater(actor, false) && curWeapon != kModernThingEnemyLifeLeech)
{ {
int pHit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, 16777280, 0); int pHit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, 16777280, 0);
switch (pHit) { switch (pHit) {
case 0: case 0:
case 4: case 4:
@ -744,9 +744,9 @@ static void unicultThinkChase(DBloodActor* actor)
{ {
int objDist = -1; int targetDist = -1; int hit = -1; int objDist = -1; int targetDist = -1; int hit = -1;
if (weaponType == kGenDudeWeaponHitscan) if (weaponType == kGenDudeWeaponHitscan)
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK1, dist); hit = HitScan(actor, actor->spr.pos.Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK1, dist);
else if (weaponType == kGenDudeWeaponMissile) else if (weaponType == kGenDudeWeaponMissile)
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK0, dist); hit = HitScan(actor, actor->spr.pos.Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK0, dist);
if (hit >= 0) if (hit >= 0)
{ {

View file

@ -136,7 +136,7 @@ static void zombfThinkChase(DBloodActor* actor)
aiSetTarget(actor, actor->GetTarget()); aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x1400 && nDist > 0xe00 && abs(nDeltaAngle) < 85) if (nDist < 0x1400 && nDist > 0xe00 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -155,7 +155,7 @@ static void zombfThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x1400 && nDist > 0x600 && abs(nDeltaAngle) < 85) else if (nDist < 0x1400 && nDist > 0x600 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:
@ -174,7 +174,7 @@ static void zombfThinkChase(DBloodActor* actor)
} }
else if (nDist < 0x400 && abs(nDeltaAngle) < 85) else if (nDist < 0x400 && abs(nDeltaAngle) < 85)
{ {
int hit = HitScan(actor, actor->int_pos().Z, dx, dy, 0, CLIPMASK1, 0); int hit = HitScan(actor, actor->spr.pos.Z, dx, dy, 0, CLIPMASK1, 0);
switch (hit) switch (hit)
{ {
case -1: case -1:

View file

@ -38,6 +38,10 @@ int GetWallAngle(walltype* pWall);
void GetWallNormal(walltype* pWall, int* pX, int* pY); void GetWallNormal(walltype* pWall, int* pX, int* pY);
bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz); bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz);
int HitScan(DBloodActor* pSprite, int z, int dx, int dy, int dz, unsigned int nMask, int a8); int HitScan(DBloodActor* pSprite, int z, int dx, int dy, int dz, unsigned int nMask, int a8);
inline int HitScan(DBloodActor* pSprite, double z, int dx, int dy, int dz, unsigned int nMask, int a8)
{
return HitScan(pSprite, int(z * zworldtoint), dx, dy, dz, nMask, a8);
}
int VectorScan(DBloodActor* pSprite, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac); int VectorScan(DBloodActor* pSprite, int nOffset, int nZOffset, int dx, int dy, int dz, int nRange, int ac);
void GetZRange(DBloodActor* pSprite, int* ceilZ, Collision* ceilHit, int* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0); void GetZRange(DBloodActor* pSprite, int* ceilZ, Collision* ceilHit, int* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0);
void GetZRangeAtXYZ(int x, int y, int z, sectortype* pSector, int* ceilZ, Collision* ceilHit, int* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0); void GetZRangeAtXYZ(int x, int y, int z, sectortype* pSector, int* ceilZ, Collision* ceilHit, int* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0);

View file

@ -4653,15 +4653,15 @@ bool condCheckSprite(DBloodActor* aCond, int cmpOp, bool PUSH)
if ((pPlayer = getPlayerById(objActor->spr.type)) != NULL) if ((pPlayer = getPlayerById(objActor->spr.type)) != NULL)
var = HitScan(objActor, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1); var = HitScan(objActor, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1);
else if (objActor->IsDudeActor()) else if (objActor->IsDudeActor())
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), (!objActor->hasX()) ? 0 : objActor->dudeSlope, arg1, arg3 << 1); var = HitScan(objActor, objActor->spr.pos.Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), (!objActor->hasX()) ? 0 : objActor->dudeSlope, arg1, arg3 << 1);
else if ((objActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR) else if ((objActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR)
{ {
var3 = (objActor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 0x10000 << 1 : -(0x10000 << 1); var3 = (objActor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 0x10000 << 1 : -(0x10000 << 1);
var = HitScan(objActor, objActor->int_pos().Z, Cos(objActor->int_ang()) >> 16, Sin(objActor->int_ang()) >> 16, var3, arg1, arg3 << 1); var = HitScan(objActor, objActor->spr.pos.Z, Cos(objActor->int_ang()) >> 16, Sin(objActor->int_ang()) >> 16, var3, arg1, arg3 << 1);
} }
else else
{ {
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), 0, arg1, arg3 << 1); var = HitScan(objActor, objActor->spr.pos.Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), 0, arg1, arg3 << 1);
} }
if (var < 0) if (var < 0)