mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- renamed HitInfo::hitpos
This commit is contained in:
parent
086c699df0
commit
296b5d7edd
31 changed files with 256 additions and 256 deletions
|
@ -1279,9 +1279,9 @@ static inline void hit_set(HitInfoBase *hit, sectortype* sect, walltype* wal, DC
|
|||
hit->hitSector = sect;
|
||||
hit->hitWall = wal;
|
||||
hit->hitActor = actor;
|
||||
hit->hitpos.X = x;
|
||||
hit->hitpos.Y = y;
|
||||
hit->hitpos.Z = z;
|
||||
hit->__int_hitpos.X = x;
|
||||
hit->__int_hitpos.Y = y;
|
||||
hit->__int_hitpos.Z = z;
|
||||
}
|
||||
|
||||
static int32_t hitscan_hitsectcf=-1;
|
||||
|
@ -1329,7 +1329,7 @@ static int32_t hitscan_trysector(const vec3_t *sv, sectortype* sec, HitInfoBase
|
|||
}
|
||||
}
|
||||
|
||||
if ((x1 != INT32_MAX) && (abs(x1-sv->X)+abs(y1-sv->Y) < abs((hit->hitpos.X)-sv->X)+abs((hit->hitpos.Y)-sv->Y)))
|
||||
if ((x1 != INT32_MAX) && (abs(x1-sv->X)+abs(y1-sv->Y) < abs((hit->__int_hitpos.X)-sv->X)+abs((hit->__int_hitpos.Y)-sv->Y)))
|
||||
{
|
||||
if (inside(x1,y1,sec) == 1)
|
||||
{
|
||||
|
@ -1360,7 +1360,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
if (startsect == nullptr)
|
||||
return -1;
|
||||
|
||||
hitinfo.hitpos.vec2 = hitscangoal;
|
||||
hitinfo.__int_hitpos.vec2 = hitscangoal;
|
||||
|
||||
BFSSectorSearch search(startsect);
|
||||
while (auto sec = search.GetNext())
|
||||
|
@ -1386,7 +1386,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
< compat_maybe_truncate_to_int32((coord_t)(x2-sv->X)*(y1-sv->Y))) continue;
|
||||
if (rintersect(sv->X,sv->Y,sv->Z, vx,vy,vz, x1,y1, x2,y2, &intx,&inty,&intz) == -1) continue;
|
||||
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) >= abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.Y)-sv->Y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) >= abs((hitinfo.__int_hitpos.X)-sv->X)+abs((hitinfo.__int_hitpos.Y)-sv->Y))
|
||||
continue;
|
||||
|
||||
if ((!wal->twoSided()) || (wal->cstat & EWallFlags::FromInt(dawalclipmask)))
|
||||
|
@ -1430,7 +1430,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
if (try_facespr_intersect(actor, *sv, vx, vy, vz, &hitinfo.hitpos, 0))
|
||||
if (try_facespr_intersect(actor, *sv, vx, vy, vz, &hitinfo.__int_hitpos, 0))
|
||||
{
|
||||
hitinfo.hitSector = sec;
|
||||
hitinfo.hitWall = nullptr;
|
||||
|
@ -1454,7 +1454,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
ucoefup16 = rintersect(sv->X,sv->Y,sv->Z,vx,vy,vz,x1,y1,x2,y2,&intx,&inty,&intz);
|
||||
if (ucoefup16 == -1) continue;
|
||||
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) > abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.Y)-sv->Y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) > abs((hitinfo.__int_hitpos.X)-sv->X)+abs((hitinfo.__int_hitpos.Y)-sv->Y))
|
||||
continue;
|
||||
|
||||
daz = actor->int_pos().Z + actor->GetOffsetAndHeight(k);
|
||||
|
@ -1496,7 +1496,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
intx = int(sv->X + (int64_t(intz) - sv->Z) * vx / vz);
|
||||
inty = int(sv->Y + (int64_t(intz) - sv->Z) * vy / vz);
|
||||
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) > abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.Y)-sv->Y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->Y) > abs((hitinfo.__int_hitpos.X)-sv->X)+abs((hitinfo.__int_hitpos.Y)-sv->Y))
|
||||
continue;
|
||||
|
||||
get_floorspr_points(actor, intx, inty, &x1, &x2, &x3, &x4,
|
||||
|
@ -1526,7 +1526,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
inty = sv->Y + MulScale(vy, dist2, 30);
|
||||
intz = sv->Z + MulScale(vz, dist2, 30);
|
||||
|
||||
if (abs(intx - sv->X) + abs(inty - sv->Y) > abs((hitinfo.hitpos.X) - sv->X) + abs((hitinfo.hitpos.Y) - sv->Y))
|
||||
if (abs(intx - sv->X) + abs(inty - sv->Y) > abs((hitinfo.__int_hitpos.X) - sv->X) + abs((hitinfo.__int_hitpos.Y) - sv->Y))
|
||||
continue;
|
||||
|
||||
get_floorspr_points(actor, intx, inty, &x1, &x2, &x3, &x4,
|
||||
|
|
|
@ -288,7 +288,7 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
vec3_t hitv = { sv.X+vx, sv.Y+vy, 0 };
|
||||
|
||||
result.clearObj();
|
||||
result.hitpos.X = 0;
|
||||
result.__int_hitpos.X = 0;
|
||||
|
||||
if (!sect || (tagsearch & 3) == 0)
|
||||
return;
|
||||
|
@ -324,7 +324,7 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
{
|
||||
if (good & 1) result.hitSector = nextsect;
|
||||
if (good & 2) result.hitWall = wal;
|
||||
result.hitpos.X = DMulScale(intx - sv.X, bcos(ange), inty - sv.Y, bsin(ange), 14);
|
||||
result.__int_hitpos.X = DMulScale(intx - sv.X, bcos(ange), inty - sv.Y, bsin(ange), 14);
|
||||
hitv.X = intx; hitv.Y = inty; hitv.Z = intz;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
if (try_facespr_intersect(actor, sv, vx, vy, 0, &hitv, 1))
|
||||
{
|
||||
result.hitActor = actor;
|
||||
result.hitpos.X = DMulScale(hitv.X-sv.X, bcos(ange), hitv.Y-sv.Y, bsin(ange), 14);
|
||||
result.__int_hitpos.X = DMulScale(hitv.X-sv.X, bcos(ange), hitv.Y-sv.Y, bsin(ange), 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
spr.pos.Y = y * inttoworld;
|
||||
}
|
||||
|
||||
constexpr int16_t int_ang() const
|
||||
constexpr int int_ang() const
|
||||
{
|
||||
return spr.angle.Buildang();
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ enum EHitBits
|
|||
// Not all utilities use all variables.
|
||||
struct HitInfoBase
|
||||
{
|
||||
vec3_t hitpos;
|
||||
vec3_t __int_hitpos;
|
||||
sectortype* hitSector;
|
||||
walltype* hitWall;
|
||||
DCoreActor* hitActor;
|
||||
|
|
|
@ -52,8 +52,8 @@ bool calcChaseCamPos(int* px, int* py, int* pz, DCoreActor* act, sectortype** ps
|
|||
hitscan({ *px, *py, *pz }, *psect, np, hitinfo, CLIPMASK1);
|
||||
act->spr.cstat = bakcstat;
|
||||
|
||||
int hx = hitinfo.hitpos.X - *px;
|
||||
int hy = hitinfo.hitpos.Y - *py;
|
||||
int hx = hitinfo.__int_hitpos.X - *px;
|
||||
int hy = hitinfo.__int_hitpos.Y - *py;
|
||||
|
||||
if (*psect == nullptr)
|
||||
{
|
||||
|
|
|
@ -494,7 +494,7 @@ struct spritetypebase
|
|||
return { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint) };
|
||||
}
|
||||
|
||||
constexpr int16_t int_ang() const
|
||||
constexpr int int_ang() const
|
||||
{
|
||||
return angle.Buildang();
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@ inline FSerializer& Serialize(FSerializer& arc, const char* keyname, THitInfo<T>
|
|||
arc("sect", w.hitSector)
|
||||
("sprite", w.hitActor)
|
||||
("wall", w.hitWall)
|
||||
("x", w.hitpos.X)
|
||||
("y", w.hitpos.Y)
|
||||
("z", w.hitpos.Z)
|
||||
("x", w.__int_hitpos.X)
|
||||
("y", w.__int_hitpos.Y)
|
||||
("z", w.__int_hitpos.Z)
|
||||
.EndObject();
|
||||
}
|
||||
return arc;
|
||||
|
|
|
@ -5349,9 +5349,9 @@ int MoveMissile(DBloodActor* actor)
|
|||
}
|
||||
CheckLink(actor);
|
||||
gHitInfo.hitSector = actor->sector();
|
||||
gHitInfo.hitpos.X = actor->int_pos().X;
|
||||
gHitInfo.hitpos.Y = actor->int_pos().Y;
|
||||
gHitInfo.hitpos.Z = actor->int_pos().Z;
|
||||
gHitInfo.__int_hitpos.X = actor->int_pos().X;
|
||||
gHitInfo.__int_hitpos.Y = actor->int_pos().Y;
|
||||
gHitInfo.__int_hitpos.Z = actor->int_pos().Z;
|
||||
break;
|
||||
}
|
||||
if (Owner) Owner->spr.cstat = bakCstat;
|
||||
|
@ -6410,8 +6410,8 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
|
|||
y += MulScale(actor->spr.clipdist, Sin(actor->int_ang()), 28);
|
||||
if (HitScan(actor, z, x - actor->int_pos().X, y - actor->int_pos().Y, 0, CLIPMASK0, actor->spr.clipdist) != -1)
|
||||
{
|
||||
x = gHitInfo.hitpos.X - MulScale(actor->spr.clipdist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(actor->spr.clipdist << 1, Sin(actor->int_ang()), 28);
|
||||
x = gHitInfo.__int_hitpos.X - MulScale(actor->spr.clipdist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.__int_hitpos.Y - MulScale(actor->spr.clipdist << 1, Sin(actor->int_ang()), 28);
|
||||
}
|
||||
auto fired = actSpawnThing(actor->sector(), x, y, z, thingType);
|
||||
fired->SetOwner(actor);
|
||||
|
@ -6527,13 +6527,13 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
|
|||
if (hit == 3 || hit == 0)
|
||||
{
|
||||
impact = true;
|
||||
x = gHitInfo.hitpos.X - MulScale(Cos(actor->int_ang()), 16, 30);
|
||||
y = gHitInfo.hitpos.Y - MulScale(Sin(actor->int_ang()), 16, 30);
|
||||
x = gHitInfo.__int_hitpos.X - MulScale(Cos(actor->int_ang()), 16, 30);
|
||||
y = gHitInfo.__int_hitpos.Y - MulScale(Sin(actor->int_ang()), 16, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = gHitInfo.hitpos.X - MulScale(pMissileInfo->clipDist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(pMissileInfo->clipDist << 1, Sin(actor->int_ang()), 28);
|
||||
x = gHitInfo.__int_hitpos.X - MulScale(pMissileInfo->clipDist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.__int_hitpos.Y - MulScale(pMissileInfo->clipDist << 1, Sin(actor->int_ang()), 28);
|
||||
}
|
||||
}
|
||||
auto spawned = actSpawnSprite(actor->sector(), x, y, z, 5, 1);
|
||||
|
@ -6702,16 +6702,16 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
if (powerupCheck(pPlayer, kPwUpReflectShots))
|
||||
{
|
||||
gHitInfo.hitActor = shooter;
|
||||
gHitInfo.hitpos = shooter->int_pos();
|
||||
gHitInfo.__int_hitpos = shooter->int_pos();
|
||||
}
|
||||
}
|
||||
}
|
||||
int x = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int y = gHitInfo.hitpos.Y - MulScale(a5, 16, 14);
|
||||
int z = gHitInfo.hitpos.Z - MulScale(a6, 256, 14);
|
||||
int x = gHitInfo.__int_hitpos.X - MulScale(a4, 16, 14);
|
||||
int y = gHitInfo.__int_hitpos.Y - MulScale(a5, 16, 14);
|
||||
int z = gHitInfo.__int_hitpos.Z - MulScale(a6, 256, 14);
|
||||
auto pSector = gHitInfo.hitSector;
|
||||
uint8_t nSurf = kSurfNone;
|
||||
if (nRange == 0 || approxDist(gHitInfo.hitpos.X - shooter->int_pos().X, gHitInfo.hitpos.Y - shooter->int_pos().Y) < nRange)
|
||||
if (nRange == 0 || approxDist(gHitInfo.__int_hitpos.X - shooter->int_pos().X, gHitInfo.__int_hitpos.Y - shooter->int_pos().Y) < nRange)
|
||||
{
|
||||
switch (hit)
|
||||
{
|
||||
|
@ -6737,9 +6737,9 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
nSurf = surfType[pWall->picnum];
|
||||
if (actCanSplatWall(pWall))
|
||||
{
|
||||
int xx = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int yy = gHitInfo.hitpos.Y - MulScale(a5, 16, 14);
|
||||
int zz = gHitInfo.hitpos.Z - MulScale(a6, 256, 14);
|
||||
int xx = gHitInfo.__int_hitpos.X - MulScale(a4, 16, 14);
|
||||
int yy = gHitInfo.__int_hitpos.Y - MulScale(a5, 16, 14);
|
||||
int zz = gHitInfo.__int_hitpos.Z - MulScale(a6, 256, 14);
|
||||
int nnSurf = surfType[pWall->picnum];
|
||||
assert(nnSurf < kSurfMax);
|
||||
if (pVectorData->surfHit[nnSurf].fx1 >= 0)
|
||||
|
@ -6829,17 +6829,17 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
a4 += Random3(4000);
|
||||
a5 += Random3(4000);
|
||||
a6 += Random3(4000);
|
||||
if (HitScan(actor, gHitInfo.hitpos.Z, a4, a5, a6, CLIPMASK1, tt) == 0)
|
||||
if (HitScan(actor, gHitInfo.__int_hitpos.Z, a4, a5, a6, CLIPMASK1, tt) == 0)
|
||||
{
|
||||
if (approxDist(gHitInfo.hitpos.X - actor->int_pos().X, gHitInfo.hitpos.Y - actor->int_pos().Y) <= tt)
|
||||
if (approxDist(gHitInfo.__int_hitpos.X - actor->int_pos().X, gHitInfo.__int_hitpos.Y - actor->int_pos().Y) <= tt)
|
||||
{
|
||||
auto pWall = gHitInfo.hitWall;
|
||||
auto pSector1 = gHitInfo.hitSector;
|
||||
if (actCanSplatWall(pWall))
|
||||
{
|
||||
int xx = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int yy = gHitInfo.hitpos.Y - MulScale(a5, 16, 14);
|
||||
int zz = gHitInfo.hitpos.Z - MulScale(a6, 16 << 4, 14);
|
||||
int xx = gHitInfo.__int_hitpos.X - MulScale(a4, 16, 14);
|
||||
int yy = gHitInfo.__int_hitpos.Y - MulScale(a5, 16, 14);
|
||||
int zz = gHitInfo.__int_hitpos.Z - MulScale(a6, 16 << 4, 14);
|
||||
int nnSurf = surfType[pWall->picnum];
|
||||
const VECTORDATA* pVectorData1 = &gVectorData[19];
|
||||
FX_ID t2 = pVectorData1->surfHit[nnSurf].fx2;
|
||||
|
|
|
@ -135,7 +135,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRange)
|
|||
int y = actor->int_pos().Y;
|
||||
int z = actor->int_pos().Z;
|
||||
HitScan(actor, z, bcos(nAngle), bsin(nAngle), 0, CLIPMASK0, nRange);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.X, y - gHitInfo.hitpos.Y);
|
||||
int nDist = approxDist(x - gHitInfo.__int_hitpos.X, y - gHitInfo.__int_hitpos.Y);
|
||||
if (nDist - (actor->spr.clipdist << 2) < nRange)
|
||||
{
|
||||
if (gHitInfo.actor() == nullptr || target == nullptr || target != gHitInfo.actor())
|
||||
|
|
|
@ -751,7 +751,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
if (hit >= 0)
|
||||
{
|
||||
targetDist = dist - (target->spr.clipdist << 2);
|
||||
objDist = approxDist(gHitInfo.hitpos.X - actor->int_pos().X, gHitInfo.hitpos.Y - actor->int_pos().Y);
|
||||
objDist = approxDist(gHitInfo.__int_hitpos.X - actor->int_pos().X, gHitInfo.__int_hitpos.Y - actor->int_pos().Y);
|
||||
}
|
||||
|
||||
if (actor != gHitInfo.actor() && targetDist > objDist)
|
||||
|
@ -865,7 +865,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
bool immune = nnExtIsImmune(hitactor, gVectorData[curWeapon].dmgType);
|
||||
if (!(hitactor->hasX() && (!immune || (immune && hitactor->spr.statnum == kStatThing && hitactor->xspr.Vector)) && !hitactor->xspr.locked))
|
||||
{
|
||||
if ((approxDist(gHitInfo.hitpos.X - actor->int_pos().X, gHitInfo.hitpos.Y - actor->int_pos().Y) <= 1500 && !blck)
|
||||
if ((approxDist(gHitInfo.__int_hitpos.X - actor->int_pos().X, gHitInfo.__int_hitpos.Y - actor->int_pos().Y) <= 1500 && !blck)
|
||||
|| (dist <= (int)(pExtra->fireDist / ClipLow(Random(4), 1))))
|
||||
{
|
||||
//viewSetSystemMessage("GO CHASE");
|
||||
|
@ -940,8 +940,8 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
case kMissileFireballTchernobog:
|
||||
{
|
||||
// allow attack if dude is far from object, but target is close to it
|
||||
int dudeDist = approxDist(gHitInfo.hitpos.X - actor->int_pos().X, gHitInfo.hitpos.Y - actor->int_pos().Y);
|
||||
int targetDist1 = approxDist(gHitInfo.hitpos.X - target->int_pos().X, gHitInfo.hitpos.Y - target->int_pos().Y);
|
||||
int dudeDist = approxDist(gHitInfo.__int_hitpos.X - actor->int_pos().X, gHitInfo.__int_hitpos.Y - actor->int_pos().Y);
|
||||
int targetDist1 = approxDist(gHitInfo.__int_hitpos.X - target->int_pos().X, gHitInfo.__int_hitpos.Y - target->int_pos().Y);
|
||||
if (dudeDist < mdist)
|
||||
{
|
||||
//viewSetSystemMessage("DUDE CLOSE TO OBJ: %d, MDIST: %d", dudeDist, mdist);
|
||||
|
|
|
@ -413,13 +413,13 @@ int HitScan(DBloodActor* actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
if (!pWall->twoSided())
|
||||
return 0;
|
||||
int nZCeil, nZFloor;
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.X, gHitInfo.hitpos.Y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.hitpos.Z <= nZCeil || gHitInfo.hitpos.Z >= nZFloor)
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.__int_hitpos.X, gHitInfo.__int_hitpos.Y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.__int_hitpos.Z <= nZCeil || gHitInfo.__int_hitpos.Z >= nZFloor)
|
||||
return 0;
|
||||
return 4;
|
||||
}
|
||||
if (gHitInfo.hitSector != nullptr)
|
||||
return 1 + (z < gHitInfo.hitpos.Z);
|
||||
return 1 + (z < gHitInfo.__int_hitpos.Z);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
actor->spr.cstat = bakCstat;
|
||||
while (nNum--)
|
||||
{
|
||||
if (nRange && approxDist(gHitInfo.hitpos.X - actor->int_pos().X, gHitInfo.hitpos.Y - actor->int_pos().Y) > nRange)
|
||||
if (nRange && approxDist(gHitInfo.__int_hitpos.X - actor->int_pos().X, gHitInfo.__int_hitpos.Y - actor->int_pos().Y) > nRange)
|
||||
return -1;
|
||||
auto other = gHitInfo.actor();
|
||||
if (other != nullptr)
|
||||
|
@ -476,7 +476,7 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
if (nTopOfs)
|
||||
otherZ -= (nTopOfs * other->spr.yrepeat) << 2;
|
||||
assert(height > 0);
|
||||
int height2 = Scale(otherZ - gHitInfo.hitpos.Z, tileHeight(nPicnum), height);
|
||||
int height2 = Scale(otherZ - gHitInfo.__int_hitpos.Z, tileHeight(nPicnum), height);
|
||||
if (!(other->spr.cstat & CSTAT_SPRITE_YFLIP))
|
||||
height2 = tileHeight(nPicnum) - height2;
|
||||
if (height2 >= 0 && height2 < tileHeight(nPicnum))
|
||||
|
@ -498,7 +498,7 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
bakCstat = other->spr.cstat;
|
||||
other->spr.cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
gHitInfo.clearObj();
|
||||
pos = gHitInfo.hitpos; // must make a copy!
|
||||
pos = gHitInfo.__int_hitpos; // must make a copy!
|
||||
hitscan(pos, other->sector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
other->spr.cstat = bakCstat;
|
||||
continue;
|
||||
|
@ -511,10 +511,10 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
sectortype* pSector = gHitInfo.hitSector;
|
||||
sectortype* pSectorNext = pWall->nextSector();
|
||||
int nZCeil, nZFloor;
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.X, gHitInfo.hitpos.Y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.hitpos.Z <= nZCeil)
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.__int_hitpos.X, gHitInfo.__int_hitpos.Y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.__int_hitpos.Z <= nZCeil)
|
||||
return 0;
|
||||
if (gHitInfo.hitpos.Z >= nZFloor)
|
||||
if (gHitInfo.__int_hitpos.Z >= nZFloor)
|
||||
{
|
||||
if (!(pSector->floorstat & CSTAT_SECTOR_SKY) || !(pSectorNext->floorstat & CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
|
@ -527,7 +527,7 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
nOfs = ClipHigh(pSector->int_floorz(), pSectorNext->int_floorz());
|
||||
else
|
||||
nOfs = ClipLow(pSector->int_ceilingz(), pSectorNext->int_ceilingz());
|
||||
nOfs = (gHitInfo.hitpos.Z - nOfs) >> 8;
|
||||
nOfs = (gHitInfo.__int_hitpos.Z - nOfs) >> 8;
|
||||
if (pWall->cstat & CSTAT_WALL_YFLIP)
|
||||
nOfs = -nOfs;
|
||||
|
||||
|
@ -542,9 +542,9 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
int nLength = approxDist(pWall->wall_int_pos().X - pWall->point2Wall()->wall_int_pos().X, pWall->wall_int_pos().Y - pWall->point2Wall()->wall_int_pos().Y);
|
||||
int nHOffset;
|
||||
if (pWall->cstat & CSTAT_WALL_XFLIP)
|
||||
nHOffset = approxDist(gHitInfo.hitpos.X - pWall->point2Wall()->wall_int_pos().X, gHitInfo.hitpos.Y - pWall->point2Wall()->wall_int_pos().Y);
|
||||
nHOffset = approxDist(gHitInfo.__int_hitpos.X - pWall->point2Wall()->wall_int_pos().X, gHitInfo.__int_hitpos.Y - pWall->point2Wall()->wall_int_pos().Y);
|
||||
else
|
||||
nHOffset = approxDist(gHitInfo.hitpos.X - pWall->wall_int_pos().X, gHitInfo.hitpos.Y - pWall->wall_int_pos().Y);
|
||||
nHOffset = approxDist(gHitInfo.__int_hitpos.X - pWall->wall_int_pos().X, gHitInfo.__int_hitpos.Y - pWall->wall_int_pos().Y);
|
||||
|
||||
nHOffset = pWall->xpan() + ((nHOffset * pWall->xrepeat) << 3) / nLength;
|
||||
nHOffset %= nSizX;
|
||||
|
@ -560,7 +560,7 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
auto bakCstat2 = pWall->nextWall()->cstat;
|
||||
pWall->nextWall()->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
gHitInfo.clearObj();
|
||||
pos = gHitInfo.hitpos;
|
||||
pos = gHitInfo.__int_hitpos;
|
||||
hitscan(pos, pWall->nextSector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
|
||||
pWall->cstat = bakCstat1;
|
||||
|
@ -577,9 +577,9 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
if (!upper) return 2;
|
||||
auto link = upper->GetOwner();
|
||||
gHitInfo.clearObj();
|
||||
x1 = gHitInfo.hitpos.X + link->int_pos().X - upper->int_pos().X;
|
||||
y1 = gHitInfo.hitpos.Y + link->int_pos().Y - upper->int_pos().Y;
|
||||
z1 = gHitInfo.hitpos.Z + link->int_pos().Z - upper->int_pos().Z;
|
||||
x1 = gHitInfo.__int_hitpos.X + link->int_pos().X - upper->int_pos().X;
|
||||
y1 = gHitInfo.__int_hitpos.Y + link->int_pos().Y - upper->int_pos().Y;
|
||||
z1 = gHitInfo.__int_hitpos.Z + link->int_pos().Z - upper->int_pos().Z;
|
||||
pos = { x1, y1, z1 };
|
||||
hitscan(pos, link->sector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
|
||||
|
@ -591,9 +591,9 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
if (!lower) return 1;
|
||||
auto link = lower->GetOwner();
|
||||
gHitInfo.clearObj();
|
||||
x1 = gHitInfo.hitpos.X + link->int_pos().X - lower->int_pos().X;
|
||||
y1 = gHitInfo.hitpos.Y + link->int_pos().Y - lower->int_pos().Y;
|
||||
z1 = gHitInfo.hitpos.Z + link->int_pos().Z - lower->int_pos().Z;
|
||||
x1 = gHitInfo.__int_hitpos.X + link->int_pos().X - lower->int_pos().X;
|
||||
y1 = gHitInfo.__int_hitpos.Y + link->int_pos().Y - lower->int_pos().Y;
|
||||
z1 = gHitInfo.__int_hitpos.Z + link->int_pos().Z - lower->int_pos().Z;
|
||||
pos = { x1, y1, z1 };
|
||||
hitscan(pos, link->sector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
continue;
|
||||
|
|
|
@ -7710,7 +7710,7 @@ bool nnExtCanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRang
|
|||
int x = actor->int_pos().X, y = actor->int_pos().Y, z = actor->int_pos().Z;
|
||||
auto pSector = actor->sector();
|
||||
HitScan(actor, z, Cos(nAngle) >> 16, Sin(nAngle) >> 16, 0, CLIPMASK0, nRange);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.X, y - gHitInfo.hitpos.Y);
|
||||
int nDist = approxDist(x - gHitInfo.__int_hitpos.X, y - gHitInfo.__int_hitpos.Y);
|
||||
if (target != nullptr && nDist - (actor->spr.clipdist << 2) < nRange)
|
||||
return (target == gHitInfo.actor());
|
||||
|
||||
|
|
|
@ -1425,7 +1425,7 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out)
|
|||
int y = bsin(plActor->int_ang());
|
||||
int z = pPlayer->slope;
|
||||
int hit = HitScan(pPlayer->actor, pPlayer->zView, x, y, z, 0x10000040, 128);
|
||||
int hitDist = approxDist(plActor->int_pos().X - gHitInfo.hitpos.X, plActor->int_pos().Y - gHitInfo.hitpos.Y) >> 4;
|
||||
int hitDist = approxDist(plActor->int_pos().X - gHitInfo.__int_hitpos.X, plActor->int_pos().Y - gHitInfo.__int_hitpos.Y) >> 4;
|
||||
if (hitDist < 64)
|
||||
{
|
||||
switch (hit)
|
||||
|
|
|
@ -4945,7 +4945,7 @@ int furthestangle(DDukeActor *actor, int angs)
|
|||
{
|
||||
hitscan({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (8 << 8) }, actor->sector(), { bcos(j), bsin(j), 0 }, hit, CLIPMASK1);
|
||||
|
||||
d = abs(hit.hitpos.X - actor->int_pos().X) + abs(hit.hitpos.Y - actor->int_pos().Y);
|
||||
d = abs(hit.__int_hitpos.X - actor->int_pos().X) + abs(hit.__int_hitpos.Y - actor->int_pos().Y);
|
||||
|
||||
if (d > greatestd)
|
||||
{
|
||||
|
@ -4978,14 +4978,14 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day
|
|||
{
|
||||
hitscan({ tosee->int_pos().X, tosee->int_pos().Y, tosee->int_pos().Z - (16 << 8) }, tosee->sector(), { bcos(j), bsin(j), 16384 - (krand() & 32767) }, hit, CLIPMASK1);
|
||||
|
||||
d = abs(hit.hitpos.X - tosee->int_pos().X) + abs(hit.hitpos.Y - tosee->int_pos().Y);
|
||||
da = abs(hit.hitpos.X - actor->int_pos().X) + abs(hit.hitpos.Y - actor->int_pos().Y);
|
||||
d = abs(hit.__int_hitpos.X - tosee->int_pos().X) + abs(hit.__int_hitpos.Y - tosee->int_pos().Y);
|
||||
da = abs(hit.__int_hitpos.X - actor->int_pos().X) + abs(hit.__int_hitpos.Y - actor->int_pos().Y);
|
||||
|
||||
if (d < da && hit.hitSector)
|
||||
if (cansee(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, hit.hitSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (16 << 8), actor->sector()))
|
||||
if (cansee(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, hit.hitSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (16 << 8), actor->sector()))
|
||||
{
|
||||
*dax = hit.hitpos.X;
|
||||
*day = hit.hitpos.Y;
|
||||
*dax = hit.__int_hitpos.X;
|
||||
*day = hit.__int_hitpos.Y;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ int hits(DDukeActor* actor)
|
|||
|
||||
auto pos = actor->int_pos();
|
||||
hitscan(pos.withZOffset(-zoff), actor->sector(), { bcos(actor->int_ang()), bsin(actor->int_ang()), 0 }, hit, CLIPMASK1);
|
||||
return (FindDistance2D(hit.hitpos.vec2 - actor->int_pos().vec2));
|
||||
return (FindDistance2D(hit.__int_hitpos.vec2 - actor->int_pos().vec2));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -202,7 +202,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
|||
if (hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) && badguy(actor))
|
||||
return((1 << 30));
|
||||
|
||||
return (FindDistance2D(hit.hitpos.vec2 - actor->int_pos().vec2));
|
||||
return (FindDistance2D(hit.__int_hitpos.vec2 - actor->int_pos().vec2));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -218,7 +218,7 @@ int hitawall(player_struct* p, walltype** hitw)
|
|||
hitscan(p->player_int_pos(), p->cursector, { int(p->angle.ang.Cos() * (1 << 14)), int(p->angle.ang.Sin() * (1 << 14)), 0 }, hit, CLIPMASK0);
|
||||
if (hitw) *hitw = hit.hitWall;
|
||||
|
||||
return (FindDistance2D(hit.hitpos.vec2 - p->player_int_pos().vec2));
|
||||
return (FindDistance2D(hit.__int_hitpos.vec2 - p->player_int_pos().vec2));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
|||
hitscan({ sx, sy, sz }, sectp, { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
|
||||
|
||||
// oh my...
|
||||
if (FindDistance2D(sx - hit.hitpos.X, sy - hit.hitpos.Y) < 1024 &&
|
||||
if (FindDistance2D(sx - hit.__int_hitpos.X, sy - hit.__int_hitpos.Y) < 1024 &&
|
||||
(hit.hitWall != nullptr && hit.hitWall->overpicnum != BIGFORCE) &&
|
||||
((hit.hitWall->twoSided() && hit.hitSector != nullptr &&
|
||||
hit.hitWall->nextSector()->lotag == 0 &&
|
||||
|
@ -1059,7 +1059,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
|||
spawned->spr.xvel = -12;
|
||||
auto delta = hit.hitWall->delta();
|
||||
spawned->set_int_ang(getangle(-delta.X, -delta.Y) + 512); // note the '-' sign here!
|
||||
spawned->set_int_pos(hit.hitpos);
|
||||
spawned->set_int_pos(hit.__int_hitpos);
|
||||
spawned->spr.cstat |= randomXFlip();
|
||||
ssp(spawned, CLIPMASK0);
|
||||
SetActor(spawned, spawned->int_pos());
|
||||
|
|
|
@ -250,11 +250,11 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((abs(sx - hit.hitpos.X) + abs(sy - hit.hitpos.Y)) < 1024)
|
||||
if ((abs(sx - hit.__int_hitpos.X) + abs(sy - hit.__int_hitpos.Y)) < 1024)
|
||||
{
|
||||
if (hit.hitWall || hit.actor())
|
||||
{
|
||||
auto knee = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
auto knee = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (knee)
|
||||
{
|
||||
knee->spr.extra += (krand() & 7);
|
||||
|
@ -278,12 +278,12 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
{
|
||||
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
|
||||
if (hit.hitWall->twoSided())
|
||||
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
if (hit.__int_hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
hit.hitWall =hit.hitWall->nextWall();
|
||||
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(knee, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, KNEE);
|
||||
fi.checkhitwall(knee, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, KNEE);
|
||||
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
auto splash = spawn(ps[p].GetActor(), WATERSPLASH2);
|
||||
if (splash)
|
||||
{
|
||||
splash->set_int_xy(hit.hitpos.X, hit.hitpos.Y);
|
||||
splash->set_int_xy(hit.__int_hitpos.X, hit.__int_hitpos.Y);
|
||||
splash->set_int_ang(ps[p].angle.ang.Buildang()); // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
ssp(actor, CLIPMASK0);
|
||||
|
@ -403,12 +403,12 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((krand() & 15) == 0 && hit.hitSector->lotag == 2)
|
||||
tracers(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
tracers(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
|
||||
DDukeActor* spark;
|
||||
if (p >= 0)
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
@ -522,15 +522,15 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
|
||||
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
|
||||
if (hit.hitWall->twoSided())
|
||||
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
if (hit.__int_hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
hit.hitWall = hit.hitWall->nextWall();
|
||||
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
if (spark)
|
||||
{
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
@ -543,13 +543,13 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
|
||||
}
|
||||
else if (hit.hitWall)
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
|
||||
if ((krand() & 255) < 4)
|
||||
{
|
||||
vec3_t v{ hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z };
|
||||
vec3_t v{ hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z };
|
||||
S_PlaySound3D(PISTOL_RICOCHET, spark, v);
|
||||
}
|
||||
}
|
||||
|
@ -851,7 +851,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hit.hitWall && hit.hitSector)
|
||||
{
|
||||
if (((hit.hitpos.X - sx) * (hit.hitpos.X - sx) + (hit.hitpos.Y - sy) * (hit.hitpos.Y - sy)) < (290 * 290))
|
||||
if (((hit.__int_hitpos.X - sx) * (hit.__int_hitpos.X - sx) + (hit.__int_hitpos.Y - sy) * (hit.__int_hitpos.Y - sy)) < (290 * 290))
|
||||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
|
@ -864,7 +864,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (j == 1)
|
||||
{
|
||||
auto bomb = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, STAT_STANDABLE);
|
||||
auto bomb = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, STAT_STANDABLE);
|
||||
if (!bomb) return;
|
||||
if (isWW2GI())
|
||||
{
|
||||
|
@ -962,7 +962,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
|||
|
||||
actor->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
auto spark = EGS(sect, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, GROWSPARK, -16, 28, 28, sa, 0, 0, actor, 1);
|
||||
auto spark = EGS(sect, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, GROWSPARK, -16, 28, 28, sa, 0, 0, actor, 1);
|
||||
if (!spark) return;
|
||||
|
||||
spark->spr.pal = 2;
|
||||
|
@ -979,7 +979,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
|||
{
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, GROWSPARK);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, GROWSPARK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2027,13 +2027,13 @@ int operateTripbomb(int snum)
|
|||
while ((act = it.Next()))
|
||||
{
|
||||
if (!actorflag(act, SFLAG_BLOCK_TRIPBOMB) &&
|
||||
abs(act->int_pos().Z - hit.hitpos.Z) < (12 << 8) && ((act->int_pos().X - hit.hitpos.X) * (act->int_pos().X - hit.hitpos.X) + (act->int_pos().Y - hit.hitpos.Y) * (act->int_pos().Y - hit.hitpos.Y)) < (290 * 290))
|
||||
abs(act->int_pos().Z - hit.__int_hitpos.Z) < (12 << 8) && ((act->int_pos().X - hit.__int_hitpos.X) * (act->int_pos().X - hit.__int_hitpos.X) + (act->int_pos().Y - hit.__int_hitpos.Y) * (act->int_pos().Y - hit.__int_hitpos.Y)) < (290 * 290))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (act == nullptr && hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) == 0)
|
||||
if ((hit.hitWall->twoSided() && hit.hitWall->nextSector()->lotag <= 2) || (!hit.hitWall->twoSided() && hit.hitSector->lotag <= 2))
|
||||
if (((hit.hitpos.X - p->player_int_pos().X) * (hit.hitpos.X - p->player_int_pos().X) + (hit.hitpos.Y - p->player_int_pos().Y) * (hit.hitpos.Y - p->player_int_pos().Y)) < (290 * 290))
|
||||
if (((hit.__int_hitpos.X - p->player_int_pos().X) * (hit.__int_hitpos.X - p->player_int_pos().X) + (hit.__int_hitpos.Y - p->player_int_pos().Y) * (hit.__int_hitpos.Y - p->player_int_pos().Y)) < (290 * 290))
|
||||
{
|
||||
p->pos.Z = p->opos.Z;
|
||||
p->vel.Z = 0;
|
||||
|
|
|
@ -115,8 +115,8 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
&& effector->spr.lotag == SE_7_TELEPORT)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
nx = hit.hitpos.X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
|
||||
ny = hit.hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
|
||||
nx = hit.__int_hitpos.X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
|
||||
ny = hit.__int_hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
|
||||
if (hit.hitSector->lotag == 161)
|
||||
{
|
||||
nz = effector->GetOwner()->sector()->int_floorz();
|
||||
|
@ -133,20 +133,20 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
|
||||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((abs(sx - hit.hitpos.X) + abs(sy - hit.hitpos.Y)) < 1024)
|
||||
if ((abs(sx - hit.__int_hitpos.X) + abs(sy - hit.__int_hitpos.Y)) < 1024)
|
||||
{
|
||||
if (hit.hitWall != nullptr || hit.actor())
|
||||
{
|
||||
DDukeActor* wpn;
|
||||
if (isRRRA() && atwith == SLINGBLADE)
|
||||
{
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
wpn = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (!wpn) return;
|
||||
wpn->spr.extra += 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
wpn = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (!wpn) return;
|
||||
wpn->spr.extra += (krand() & 7);
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
{
|
||||
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
|
||||
if (hit.hitWall->twoSided())
|
||||
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
if (hit.__int_hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
hit.hitWall = hit.hitWall->nextWall();
|
||||
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(wpn, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, atwith);
|
||||
fi.checkhitwall(wpn, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, atwith);
|
||||
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
auto splash = spawn(ps[p].GetActor(), WATERSPLASH2);
|
||||
if (splash)
|
||||
{
|
||||
splash->set_int_xy(hit.hitpos.X, hit.hitpos.Y);
|
||||
splash->set_int_xy(hit.__int_hitpos.X, hit.__int_hitpos.Y);
|
||||
splash->set_int_ang(ps[p].angle.ang.Buildang()); // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
ssp(actor, 0);
|
||||
|
@ -270,8 +270,8 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
&& effector->spr.lotag == SE_7_TELEPORT)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
nx = hit.hitpos.X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
|
||||
ny = hit.hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
|
||||
nx = hit.__int_hitpos.X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
|
||||
ny = hit.__int_hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
|
||||
if (hit.hitSector->lotag == 161)
|
||||
{
|
||||
nz = effector->GetOwner()->sector()->int_floorz();
|
||||
|
@ -296,12 +296,12 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
return;
|
||||
|
||||
if ((krand() & 15) == 0 && hit.hitSector->lotag == 2)
|
||||
tracers(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
tracers(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
|
||||
DDukeActor* spark;
|
||||
if (p >= 0)
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
spark->spr.extra += (krand() % 6);
|
||||
|
@ -421,15 +421,15 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
|
||||
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
|
||||
if (hit.hitWall->twoSided())
|
||||
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
if (hit.__int_hitpos.Z >= (hit.hitWall->nextSector()->int_floorz()))
|
||||
hit.hitWall = hit.hitWall->nextWall();
|
||||
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
||||
|
@ -441,12 +441,12 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
|
||||
}
|
||||
else if (hit.hitWall != nullptr)
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTSPARK1);
|
||||
}
|
||||
|
||||
if ((krand() & 255) < 10)
|
||||
{
|
||||
vec3_t v{ hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z };
|
||||
vec3_t v{ hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z };
|
||||
S_PlaySound3D(PISTOL_RICOCHET, spark, v);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -434,9 +434,9 @@ MOVEEND:
|
|||
else
|
||||
dz = -pBullet->nPitch * 512;
|
||||
hitscan(startPos, pActor->sector(), { bcos(pActor->int_ang()), bsin(pActor->int_ang()), dz }, hit, CLIPMASK1);
|
||||
x2 = hit.hitpos.X;
|
||||
y2 = hit.hitpos.Y;
|
||||
z2 = hit.hitpos.Z;
|
||||
x2 = hit.__int_hitpos.X;
|
||||
y2 = hit.__int_hitpos.Y;
|
||||
z2 = hit.__int_hitpos.Z;
|
||||
hitactor = hit.actor();
|
||||
pHitSect = hit.hitSector;
|
||||
pHitWall = hit.hitWall;
|
||||
|
|
|
@ -254,8 +254,8 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe
|
|||
|
||||
int ecx = bsin(150, -3);
|
||||
|
||||
uint32_t yDiff = abs(hit.hitpos.Y - *y);
|
||||
uint32_t xDiff = abs(hit.hitpos.X - *x);
|
||||
uint32_t yDiff = abs(hit.__int_hitpos.Y - *y);
|
||||
uint32_t xDiff = abs(hit.__int_hitpos.X - *x);
|
||||
|
||||
uint32_t sqrtNum = xDiff * xDiff + yDiff * yDiff;
|
||||
|
||||
|
@ -270,9 +270,9 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe
|
|||
if (ksqrt(sqrtNum) >= ecx)
|
||||
return c;
|
||||
|
||||
*x = hit.hitpos.X;
|
||||
*y = hit.hitpos.Y;
|
||||
*z = hit.hitpos.Z;
|
||||
*x = hit.__int_hitpos.X;
|
||||
*y = hit.__int_hitpos.Y;
|
||||
*z = hit.__int_hitpos.Z;
|
||||
*ppSector = hit.hitSector;
|
||||
|
||||
if (hit.actor()) {
|
||||
|
|
|
@ -399,8 +399,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
|
||||
if (hit.hitWall)
|
||||
{
|
||||
int theX = abs(hit.hitpos.X - x);
|
||||
int theY = abs(hit.hitpos.Y - y);
|
||||
int theX = abs(hit.__int_hitpos.X - x);
|
||||
int theY = abs(hit.__int_hitpos.Y - y);
|
||||
|
||||
if ((theX + theY) < nCheckDist)
|
||||
{
|
||||
|
|
|
@ -141,8 +141,8 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
HitInfo hit{};
|
||||
hitscan({ x, y, z }, pPlayerActor->sector(), { bcos(nAngle), bsin(nAngle), 0 }, hit, CLIPMASK1);
|
||||
|
||||
uint32_t yDiff = abs(hit.hitpos.Y - y);
|
||||
uint32_t xDiff = abs(hit.hitpos.X - x);
|
||||
uint32_t yDiff = abs(hit.__int_hitpos.Y - y);
|
||||
uint32_t xDiff = abs(hit.__int_hitpos.X - x);
|
||||
|
||||
uint32_t sqrtNum = xDiff * xDiff + yDiff * yDiff;
|
||||
|
||||
|
@ -156,9 +156,9 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
|
||||
if (nSqrt < bsin(512, -4))
|
||||
{
|
||||
BackUpBullet(&hit.hitpos.X, &hit.hitpos.Y, nAngle);
|
||||
BackUpBullet(&hit.__int_hitpos.X, &hit.__int_hitpos.Y, nAngle);
|
||||
auto pActor = insertActor(hit.hitSector, 202);
|
||||
pActor->set_int_pos(hit.hitpos);
|
||||
pActor->set_int_pos(hit.__int_hitpos);
|
||||
|
||||
ExplodeSnakeSprite(pActor, nPlayer);
|
||||
DeleteActor(pActor);
|
||||
|
|
|
@ -441,7 +441,7 @@ int DoActorOperate(DSWActor* actor)
|
|||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->int_ang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
}
|
||||
|
||||
if (near.hitSector != nullptr && near.hitpos.X < 1024)
|
||||
if (near.hitSector != nullptr && near.__int_hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSector(near.hitSector, false))
|
||||
{
|
||||
|
|
|
@ -950,8 +950,8 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, DAngle *nang, f
|
|||
|
||||
actor->spr.cstat = bakcstat; // Restore cstat
|
||||
|
||||
hx = hit.hitpos.X - (*nx);
|
||||
hy = hit.hitpos.Y - (*ny);
|
||||
hx = hit.__int_hitpos.X - (*nx);
|
||||
hy = hit.__int_hitpos.Y - (*ny);
|
||||
|
||||
// If something is in the way, make pp->circle_camera_dist lower if necessary
|
||||
if (abs(vx) + abs(vy) > abs(hx) + abs(hy))
|
||||
|
|
|
@ -2621,7 +2621,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
|
|||
{ MOVEx(256, pp->angle.ang.Buildang()), MOVEy(256, pp->angle.ang.Buildang()), 0 },
|
||||
hit, CLIPMASK_PLAYER);
|
||||
|
||||
if (FindDistance2D(hit.hitpos.vec2 - hit_pos.vec2) < 800)
|
||||
if (FindDistance2D(hit.__int_hitpos.vec2 - hit_pos.vec2) < 800)
|
||||
{
|
||||
if (hit.hitWall)
|
||||
actor->user.coll.setWall(wallnum(hit.hitWall));
|
||||
|
@ -3378,7 +3378,7 @@ int DoPlayerWadeSuperJump(PLAYER* pp)
|
|||
|
||||
if (hit.hitSector != nullptr && labs(hit.hitSector->int_floorz() - pp->pos.Z) < Z(50))
|
||||
{
|
||||
if (Distance(pp->pos.X, pp->pos.Y, hit.hitpos.X, hit.hitpos.Y) < ((((int)pp->actor->spr.clipdist)<<2) + 256))
|
||||
if (Distance(pp->pos.X, pp->pos.Y, hit.__int_hitpos.X, hit.__int_hitpos.Y) < ((((int)pp->actor->spr.clipdist)<<2) + 256))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3682,7 +3682,7 @@ bool PlayerOnLadder(PLAYER* pp)
|
|||
{
|
||||
neartag(pp->pos, pp->cursector, NORM_ANGLE(pp->angle.ang.Buildang() + angles[i]), near, 600, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.hitWall == nullptr || near.hitpos.X < 100 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
if (near.hitWall == nullptr || near.__int_hitpos.X < 100 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
return false;
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector,
|
||||
|
@ -3691,7 +3691,7 @@ bool PlayerOnLadder(PLAYER* pp)
|
|||
0,
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
dist = DIST(pp->pos.X, pp->pos.Y, hit.hitpos.X, hit.hitpos.Y);
|
||||
dist = DIST(pp->pos.X, pp->pos.Y, hit.__int_hitpos.X, hit.__int_hitpos.Y);
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
|
|
|
@ -938,7 +938,7 @@ int InitRipperHang(DSWActor* actor)
|
|||
if (hit.hitSector == nullptr)
|
||||
continue;
|
||||
|
||||
dist = Distance(actor->int_pos().X, actor->int_pos().Y, hit.hitpos.X, hit.hitpos.Y);
|
||||
dist = Distance(actor->int_pos().X, actor->int_pos().Y, hit.__int_hitpos.X, hit.__int_hitpos.Y);
|
||||
|
||||
if (hit.hitWall == nullptr || dist < 2000 || dist > 7000)
|
||||
{
|
||||
|
|
|
@ -947,7 +947,7 @@ int InitRipper2Hang(DSWActor* actor)
|
|||
if (hit.hitSector == nullptr)
|
||||
continue;
|
||||
|
||||
dist = Distance(actor->int_pos().X, actor->int_pos().Y, hit.hitpos.X, hit.hitpos.Y);
|
||||
dist = Distance(actor->int_pos().X, actor->int_pos().Y, hit.__int_hitpos.X, hit.__int_hitpos.Y);
|
||||
|
||||
if (hit.hitWall == nullptr || dist < 2000 || dist > 7000)
|
||||
{
|
||||
|
|
|
@ -142,17 +142,17 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
if ((hit.hitWall->cstat & CSTAT_WALL_WARP_HITSCAN))
|
||||
{
|
||||
// back it up a bit to get a correct warp location
|
||||
hit.hitpos.X -= xvect>>9;
|
||||
hit.hitpos.Y -= yvect>>9;
|
||||
hit.__int_hitpos.X -= xvect>>9;
|
||||
hit.__int_hitpos.Y -= yvect>>9;
|
||||
|
||||
// warp to new x,y,z, sectnum
|
||||
if (Warp(&hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z, &hit.hitSector))
|
||||
if (Warp(&hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z, &hit.hitSector))
|
||||
{
|
||||
// hitscan needs to pass through dest sect
|
||||
ResetWallWarpHitscan(hit.hitSector);
|
||||
|
||||
// NOTE: This could be recursive I think if need be
|
||||
auto pos = hit.hitpos;
|
||||
auto pos = hit.__int_hitpos;
|
||||
hitscan(pos, hit.hitSector, { xvect, yvect, zvect }, hit, startclipmask);
|
||||
|
||||
// reset hitscan block for dest sect
|
||||
|
@ -177,9 +177,9 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
{
|
||||
// hit the floor of a sector that is a warping sector
|
||||
sectortype* newsect = nullptr;
|
||||
if (Warp(&hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z, &newsect))
|
||||
if (Warp(&hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z, &newsect))
|
||||
{
|
||||
auto pos = hit.hitpos;
|
||||
auto pos = hit.__int_hitpos;
|
||||
hitscan(pos, newsect, { xvect, yvect, zvect }, hit, clipmask);
|
||||
return;
|
||||
}
|
||||
|
@ -187,29 +187,29 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
else
|
||||
{
|
||||
sectortype* newsect = nullptr;
|
||||
if (WarpPlane(&hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z, &newsect))
|
||||
if (WarpPlane(&hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z, &newsect))
|
||||
{
|
||||
auto pos = hit.hitpos;
|
||||
auto pos = hit.__int_hitpos;
|
||||
hitscan(pos, newsect, { xvect, yvect, zvect }, hit, clipmask);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, &hiz, &loz);
|
||||
if (abs(hit.hitpos.Z - loz) < Z(4))
|
||||
getzsofslopeptr(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, &hiz, &loz);
|
||||
if (abs(hit.__int_hitpos.Z - loz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectFloor(hit.hitSector) && !(hit.hitSector->floorstat & CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z + Z(12), &newsector);
|
||||
updatesectorz(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z + Z(12), &newsector);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hiz) < Z(4))
|
||||
else if (labs(hit.__int_hitpos.Z - hiz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectCeiling(hit.hitSector) && !(hit.hitSector->floorstat & CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z - Z(12), &newsector);
|
||||
updatesectorz(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z - Z(12), &newsector);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
|
||||
if (plax_found)
|
||||
{
|
||||
auto pos = hit.hitpos;
|
||||
auto pos = hit.__int_hitpos;
|
||||
hitscan(pos, newsector, { xvect, yvect, zvect }, hit, clipmask);
|
||||
}
|
||||
}
|
||||
|
@ -272,20 +272,20 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
// make sure it hit JUST a sector before doing a check
|
||||
if (hit.hitWall == nullptr && hit.actor() == nullptr)
|
||||
{
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.X, hit.hitpos.Y, &hiz, &loz);
|
||||
if (labs(hit.hitpos.Z - loz) < Z(4))
|
||||
getzsofslopeptr(hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, &hiz, &loz);
|
||||
if (labs(hit.__int_hitpos.Z - loz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectFloor(hit.hitSector))
|
||||
{
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z + Z(12), &newsect);
|
||||
updatesectorz(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z + Z(12), &newsect);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hiz) < Z(4))
|
||||
else if (labs(hit.__int_hitpos.Z - hiz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectCeiling(hit.hitSector))
|
||||
{
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z - Z(12), &newsect);
|
||||
updatesectorz(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z - Z(12), &newsect);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
}
|
||||
|
||||
if (plax_found)
|
||||
return !!cansee(hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, newsect, xe, ye, ze, secte);
|
||||
return !!cansee(hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, newsect, xe, ye, ze, secte);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1977,7 +1977,7 @@ bool NearThings(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return false;
|
||||
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.Y, pp->pos.X, pp->pos.Y) > 1500)
|
||||
if (Distance(hit.__int_hitpos.X, hit.__int_hitpos.Y, pp->pos.X, pp->pos.Y) > 1500)
|
||||
return false;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -2023,7 +2023,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int
|
|||
save_lotag = ntsec->lotag;
|
||||
save_hitag = ntsec->hitag;
|
||||
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->dist = near.__int_hitpos.X;
|
||||
ntip->sectp = ntsec;
|
||||
ntip->wallp = nullptr;
|
||||
ntip->actor = nullptr;
|
||||
|
@ -2050,7 +2050,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int
|
|||
save_lotag = ntwall->lotag;
|
||||
save_hitag = ntwall->hitag;
|
||||
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->dist = near.__int_hitpos.X;
|
||||
ntip->sectp = nullptr;
|
||||
ntip->wallp = ntwall;
|
||||
ntip->actor = nullptr;
|
||||
|
@ -2077,7 +2077,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int
|
|||
save_lotag = actor->spr.lotag;
|
||||
save_hitag = actor->spr.hitag;
|
||||
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->dist = near.__int_hitpos.X;
|
||||
ntip->sectp = nullptr;
|
||||
ntip->wallp = nullptr;
|
||||
ntip->actor = actor;
|
||||
|
|
|
@ -871,7 +871,7 @@ void SpawnUser(DSWActor* actor, short id, STATE* state)
|
|||
actor->user.hi_sectp = actor->sector();
|
||||
}
|
||||
|
||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, int init_ang, int vel)
|
||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, DAngle init_ang, int vel)
|
||||
{
|
||||
if (sect == nullptr)
|
||||
return nullptr;
|
||||
|
@ -893,7 +893,7 @@ DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVe
|
|||
|
||||
spawnedActor->spr.xrepeat = 64;
|
||||
spawnedActor->spr.yrepeat = 64;
|
||||
spawnedActor->set_int_ang(NORM_ANGLE(init_ang));
|
||||
spawnedActor->spr.angle = init_ang;
|
||||
spawnedActor->spr.xvel = vel;
|
||||
|
||||
return spawnedActor;
|
||||
|
|
|
@ -31,11 +31,11 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
BEGIN_SW_NS
|
||||
|
||||
void KillActor(DSWActor* actor);
|
||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, int ang, int vel);
|
||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, DAngle ang, int vel);
|
||||
inline DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, int y, int z, int ang, int vel)
|
||||
{
|
||||
auto vec= DVector3(x * inttoworld, y * inttoworld, z * zinttoworld);
|
||||
return SpawnActor(stat, id, state, sect, vec, ang, vel);
|
||||
return SpawnActor(stat, id, state, sect, vec, DAngle::fromBuild(ang), vel);
|
||||
}
|
||||
|
||||
void SpriteSetup(void);
|
||||
|
|
|
@ -3107,7 +3107,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
{
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->int_ang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.actor() != nullptr && near.hitpos.X < 1024)
|
||||
if (near.actor() != nullptr && near.__int_hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSprite(near.actor(), false))
|
||||
{
|
||||
|
@ -3121,7 +3121,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
if (near.hitSector != nullptr && near.hitpos.X < 1024)
|
||||
if (near.hitSector != nullptr && near.__int_hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSector(near.hitSector, false))
|
||||
{
|
||||
|
|
|
@ -11858,7 +11858,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos - hit.hitpos) < 700)
|
||||
if (FindDistance3D(pp->pos - hit.__int_hitpos) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -11871,8 +11871,8 @@ int InitSwordAttack(PLAYER* pp)
|
|||
switch (hitActor->user.ID)
|
||||
{
|
||||
case ZILLA_RUN_R0:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.__int_hitpos, v3df_none);
|
||||
break;
|
||||
case TRASHCAN:
|
||||
if (hitActor->user.WaitTics <= 0)
|
||||
|
@ -11880,8 +11880,8 @@ int InitSwordAttack(PLAYER* pp)
|
|||
hitActor->user.WaitTics = SEC(2);
|
||||
ChangeState(hitActor, s_TrashCanPain);
|
||||
}
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.__int_hitpos, v3df_none);
|
||||
PlaySound(DIGI_TRASHLID, hitActor, v3df_none);
|
||||
break;
|
||||
case PACHINKO1:
|
||||
|
@ -11889,8 +11889,8 @@ int InitSwordAttack(PLAYER* pp)
|
|||
case PACHINKO3:
|
||||
case PACHINKO4:
|
||||
case 623:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.__int_hitpos, v3df_none);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -11920,7 +11920,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -11929,13 +11929,13 @@ int InitSwordAttack(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, plActor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, plActor->user.ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
{
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.__int_hitpos, v3df_none);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12039,7 +12039,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos - hit.hitpos) < 700)
|
||||
if (FindDistance3D(pp->pos - hit.__int_hitpos) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12052,8 +12052,8 @@ int InitFistAttack(PLAYER* pp)
|
|||
switch (hitActor->user.ID)
|
||||
{
|
||||
case ZILLA_RUN_R0:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.__int_hitpos, v3df_none);
|
||||
break;
|
||||
case TRASHCAN:
|
||||
if (hitActor->user.WaitTics <= 0)
|
||||
|
@ -12061,8 +12061,8 @@ int InitFistAttack(PLAYER* pp)
|
|||
hitActor->user.WaitTics = SEC(2);
|
||||
ChangeState(hitActor, s_TrashCanPain);
|
||||
}
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.__int_hitpos, v3df_none);
|
||||
PlaySound(DIGI_TRASHLID, hitActor, v3df_none);
|
||||
break;
|
||||
case PACHINKO1:
|
||||
|
@ -12070,8 +12070,8 @@ int InitFistAttack(PLAYER* pp)
|
|||
case PACHINKO3:
|
||||
case PACHINKO4:
|
||||
case 623:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.__int_hitpos, v3df_none);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -12098,8 +12098,8 @@ int InitFistAttack(PLAYER* pp)
|
|||
case 5062:
|
||||
case 5063:
|
||||
case 4947:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.__int_hitpos, v3df_none);
|
||||
if (RandomRange(1000) > 700)
|
||||
PlayerUpdateHealth(pp,1); // Give some health
|
||||
hitActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
|
@ -12114,7 +12114,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -12123,13 +12123,13 @@ int InitFistAttack(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, plActor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, plActor->user.ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
{
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.__int_hitpos, v3df_none);
|
||||
if (PlayerTakeDamage(pp, nullptr))
|
||||
{
|
||||
PlayerUpdateHealth(pp, -(RandomRange(2<<8)>>8));
|
||||
|
@ -12734,13 +12734,13 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (labs(hit.__int_hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
{
|
||||
hit.hitpos.Z += Z(16);
|
||||
hit.__int_hitpos.Z += Z(16);
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (labs(hit.__int_hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -12751,7 +12751,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -12760,11 +12760,11 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang, actor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang, actor->user.ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -12784,7 +12784,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->actor, hit.actor(), hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, 0))
|
||||
if (BulletHitSprite(pp->actor, hit.actor(), hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -12794,7 +12794,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
}
|
||||
}
|
||||
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang);
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
|
||||
return 0;
|
||||
|
@ -12867,9 +12867,9 @@ int InitShotgun(PLAYER* pp)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (labs(hit.__int_hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
{
|
||||
hit.hitpos.Z += Z(16);
|
||||
hit.__int_hitpos.Z += Z(16);
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
|
@ -12877,21 +12877,21 @@ int InitShotgun(PLAYER* pp)
|
|||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
{
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ndaang, xvect, yvect, zvect);
|
||||
WarpToSurface(&hit.hitSector, &hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ndaang, xvect, yvect, zvect);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (labs(hit.__int_hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.Y,hit.hitpos.Z,hit.hitSector);
|
||||
SpawnSplashXY(hit.__int_hitpos.X,hit.__int_hitpos.Y,hit.__int_hitpos.Z,hit.hitSector);
|
||||
|
||||
if (SectorIsDiveArea(hit.hitSector))
|
||||
{
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ndaang, xvect, yvect, zvect);
|
||||
WarpToUnderwater(&hit.hitSector, &hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ndaang, xvect, yvect, zvect);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
@ -12905,7 +12905,7 @@ int InitShotgun(PLAYER* pp)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -12914,11 +12914,11 @@ int InitShotgun(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ndaang, actor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ndaang, actor->user.ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -12950,7 +12950,7 @@ int InitShotgun(PLAYER* pp)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->actor, hitActor, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTGUN_SMOKE))
|
||||
if (BulletHitSprite(pp->actor, hitActor, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, SHOTGUN_SMOKE))
|
||||
continue;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -12960,7 +12960,7 @@ int InitShotgun(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ndaang);
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ndaang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
}
|
||||
|
||||
|
@ -15196,9 +15196,9 @@ int InitUzi(PLAYER* pp)
|
|||
// check to see what you hit
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (labs(hit.__int_hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
{
|
||||
hit.hitpos.Z += Z(16);
|
||||
hit.__int_hitpos.Z += Z(16);
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
|
@ -15206,21 +15206,21 @@ int InitUzi(PLAYER* pp)
|
|||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
{
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, xvect, yvect, zvect);
|
||||
WarpToSurface(&hit.hitSector, &hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, xvect, yvect, zvect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (labs(hit.__int_hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.Y,hit.hitpos.Z,hit.hitSector);
|
||||
SpawnSplashXY(hit.__int_hitpos.X,hit.__int_hitpos.Y,hit.__int_hitpos.Z,hit.hitSector);
|
||||
|
||||
if (SectorIsDiveArea(hit.hitSector))
|
||||
{
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.Y, &hit.hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, xvect, yvect, zvect);
|
||||
WarpToUnderwater(&hit.hitSector, &hit.__int_hitpos.X, &hit.__int_hitpos.Y, &hit.__int_hitpos.Z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, xvect, yvect, zvect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -15235,7 +15235,7 @@ int InitUzi(PLAYER* pp)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -15245,11 +15245,11 @@ int InitUzi(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, actor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, actor->user.ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -15281,7 +15281,7 @@ int InitUzi(PLAYER* pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->actor, hitActor, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, 0))
|
||||
if (BulletHitSprite(pp->actor, hitActor, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -15292,7 +15292,7 @@ int InitUzi(PLAYER* pp)
|
|||
}
|
||||
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
|
||||
|
@ -15303,7 +15303,7 @@ int InitUzi(PLAYER* pp)
|
|||
HitscanSpriteAdjust(actorNew, hit.hitWall);
|
||||
DoHitscanDamage(actorNew, hit.actor());
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SPARK_REPEAT;
|
||||
|
@ -15685,19 +15685,19 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (labs(hit.__int_hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
{
|
||||
hit.hitpos.Z += Z(16);
|
||||
hit.__int_hitpos.Z += Z(16);
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (labs(hit.__int_hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.Y,hit.hitpos.Z,hit.hitSector);
|
||||
SpawnSplashXY(hit.__int_hitpos.X,hit.__int_hitpos.Y,hit.__int_hitpos.Z,hit.hitSector);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -15711,7 +15711,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
if (hitActor->spr.lotag == TAG_SPRITE_HIT_MATCH)
|
||||
{
|
||||
// spawn sparks here and pass the sprite as SO_MISSILE
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
spark->user.Flags2 |= SPR2_SO_MISSILE;
|
||||
if (MissileHitMatch(spark, -1, hit.actor()))
|
||||
return 0;
|
||||
|
@ -15724,7 +15724,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->actor, hit.actor(), hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, 0))
|
||||
if (BulletHitSprite(pp->actor, hit.actor(), hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -15734,7 +15734,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
DoHitscanDamage(spark, hit.actor());
|
||||
|
||||
return 0;
|
||||
|
@ -16066,19 +16066,19 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (labs(hit.__int_hitpos.Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
{
|
||||
hit.hitpos.Z += Z(16);
|
||||
hit.__int_hitpos.Z += Z(16);
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
continue;
|
||||
}
|
||||
else if (labs(hit.hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (labs(hit.__int_hitpos.Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.Y,hit.hitpos.Z,hit.hitSector);
|
||||
SpawnSplashXY(hit.__int_hitpos.X,hit.__int_hitpos.Y,hit.__int_hitpos.Z,hit.hitSector);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -16091,7 +16091,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -16100,11 +16100,11 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -16124,7 +16124,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, 0))
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, 0))
|
||||
continue;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -16135,7 +16135,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
}
|
||||
|
||||
|
||||
auto j = SpawnTurretSparks(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
auto j = SpawnTurretSparks(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
}
|
||||
}
|
||||
|
@ -16224,7 +16224,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.__int_hitpos.Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -16233,20 +16233,20 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, actor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, actor->user.ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z);
|
||||
}
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, 0))
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, 0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE+2, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE+2, s_UziSmoke, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
|
||||
|
@ -16262,7 +16262,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
|
||||
actorNew->spr.clipdist = 32L >> 2;
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
|
||||
|
@ -16273,7 +16273,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
HitscanSpriteAdjust(actorNew, hit.hitWall);
|
||||
DoHitscanDamage(actorNew, hit.actor());
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, daang, 0);
|
||||
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SPARK_REPEAT;
|
||||
|
@ -17671,7 +17671,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
return nullptr;
|
||||
|
||||
const int WALLBLOOD_DIST_MAX = 2500;
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.Y, actor->int_pos().X, actor->int_pos().Y) > WALLBLOOD_DIST_MAX)
|
||||
if (Distance(hit.__int_hitpos.X, hit.__int_hitpos.Y, actor->int_pos().X, actor->int_pos().Y) > WALLBLOOD_DIST_MAX)
|
||||
return nullptr;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -17695,22 +17695,22 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
if (rndnum > 768)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang, 0);
|
||||
}
|
||||
else if (rndnum > 512)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang, 0);
|
||||
}
|
||||
else if (rndnum > 128)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hit.hitSector, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hit.hitSector, hit.__int_hitpos.X, hit.__int_hitpos.Y, hit.__int_hitpos.Z, ang, 0);
|
||||
}
|
||||
|
||||
WallBloodQueueHead = (WallBloodQueueHead+1) & (MAX_WALLBLOOD_QUEUE-1);
|
||||
|
@ -17723,7 +17723,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
spawnedActor->spr.extra = 0;
|
||||
spawnedActor->spr.clipdist = 0;
|
||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||
spawnedActor->set_int_pos(hit.hitpos);
|
||||
spawnedActor->set_int_pos(hit.__int_hitpos);
|
||||
spawnedActor->spr.shade -= 5; // Brighten it up just a bit
|
||||
spawnedActor->tempwall = hit.hitWall; // pass hitinfo.wall
|
||||
|
||||
|
|
Loading…
Reference in a new issue