mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- floatified clipdist and replaced fClipdist wrapper.
This uses a new variable because a few things use clipdist as a flag byte
This commit is contained in:
parent
3577b53c4d
commit
4af4983d3e
42 changed files with 183 additions and 195 deletions
|
@ -417,7 +417,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
||||||
|
|
||||||
if (pos->Z > daz-height-flordist && pos->Z < daz+ceildist)
|
if (pos->Z > daz-height-flordist && pos->Z < daz+ceildist)
|
||||||
{
|
{
|
||||||
int cd = actor->fClipdist() * worldtoint;
|
int cd = actor->clipdist * worldtoint;
|
||||||
int32_t bsz = cd + walldist;
|
int32_t bsz = cd + walldist;
|
||||||
if (diff.X < 0) bsz = -bsz;
|
if (diff.X < 0) bsz = -bsz;
|
||||||
addclipline(p1.X-bsz, p1.Y-bsz, p1.X-bsz, p1.Y+bsz, obj, false);
|
addclipline(p1.X-bsz, p1.Y-bsz, p1.X-bsz, p1.Y+bsz, obj, false);
|
||||||
|
|
|
@ -515,7 +515,8 @@ DEFINE_FIELD_NAMED(DCoreActor, spr.extra, extra)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.detail, detail)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.detail, detail)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.shade, shade)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.shade, shade)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.pal, pal)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.pal, pal)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr. clipdist, clipdist)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.clipdist, intclipdist)
|
||||||
|
DEFINE_FIELD_NAMED(DCoreActor, clipdist, clipdist)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.blend, blend)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.blend, blend)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.xrepeat, xrepeat)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.xrepeat, xrepeat)
|
||||||
DEFINE_FIELD_NAMED(DCoreActor, spr.yrepeat, yrepeat)
|
DEFINE_FIELD_NAMED(DCoreActor, spr.yrepeat, yrepeat)
|
||||||
|
|
|
@ -42,10 +42,11 @@ public:
|
||||||
spritesmooth_t spsmooth;
|
spritesmooth_t spsmooth;
|
||||||
|
|
||||||
DVector3 opos;
|
DVector3 opos;
|
||||||
int time;
|
|
||||||
DAngle oang;
|
DAngle oang;
|
||||||
DVector3 vel;
|
DVector3 vel;
|
||||||
|
double clipdist;
|
||||||
|
|
||||||
|
int time;
|
||||||
int16_t spritesetindex;
|
int16_t spritesetindex;
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,6 +63,12 @@ public:
|
||||||
int GetOffsetAndHeight(int& height);
|
int GetOffsetAndHeight(int& height);
|
||||||
double GetOffsetAndHeight(double& height);
|
double GetOffsetAndHeight(double& height);
|
||||||
|
|
||||||
|
void initFromSprite(spritetype* pspr)
|
||||||
|
{
|
||||||
|
spr = *pspr;
|
||||||
|
clipdist = pspr->clipdist * 0.25;
|
||||||
|
}
|
||||||
|
|
||||||
bool exists() const
|
bool exists() const
|
||||||
{
|
{
|
||||||
return (unsigned)spr.statnum < MAXSTATUS;
|
return (unsigned)spr.statnum < MAXSTATUS;
|
||||||
|
@ -160,29 +167,24 @@ public:
|
||||||
return static_cast<PClassActor*>(GetClass())->ActorInfo()->SpriteSet;
|
return static_cast<PClassActor*>(GetClass())->ActorInfo()->SpriteSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
double fClipdist() const
|
|
||||||
{
|
|
||||||
return spr. clipdist * 0.25;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_native_clipdist(int val)
|
void set_native_clipdist(int val)
|
||||||
{
|
{
|
||||||
spr. clipdist = val;
|
clipdist = val * 0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
int native_clipdist()
|
int native_clipdist()
|
||||||
{
|
{
|
||||||
return spr. clipdist;
|
return clipdist * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_const_clipdist(int val) // only for searching purposes
|
void set_const_clipdist(int val) // only for searching purposes
|
||||||
{
|
{
|
||||||
spr. clipdist = val;
|
clipdist = val * 0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
void copy_clipdist(DCoreActor* other)
|
void copy_clipdist(DCoreActor* other)
|
||||||
{
|
{
|
||||||
spr. clipdist = other->spr. clipdist;
|
clipdist = other->clipdist;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -912,7 +912,7 @@ bool checkRangeOfWall(walltype* wal, EWallFlags flagmask, const DVector3& pos, d
|
||||||
|
|
||||||
bool checkRangeOfFaceSprite(DCoreActor* itActor, const DVector3& pos, double maxdist, double* theZs)
|
bool checkRangeOfFaceSprite(DCoreActor* itActor, const DVector3& pos, double maxdist, double* theZs)
|
||||||
{
|
{
|
||||||
double dist = maxdist + itActor->fClipdist();
|
double dist = maxdist + itActor->clipdist;
|
||||||
if (abs(pos.X - itActor->spr.pos.X) > dist || abs(pos.Y - itActor->spr.pos.Y) > dist) return false; // Just like Doom: actors are square...
|
if (abs(pos.X - itActor->spr.pos.X) > dist || abs(pos.Y - itActor->spr.pos.Y) > dist) return false; // Just like Doom: actors are square...
|
||||||
double h;
|
double h;
|
||||||
theZs[0] = itActor->spr.pos.Z + itActor->GetOffsetAndHeight(h);
|
theZs[0] = itActor->spr.pos.Z + itActor->GetOffsetAndHeight(h);
|
||||||
|
|
|
@ -305,7 +305,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)
|
||||||
spr.picnum = fr.ReadInt16();
|
spr.picnum = fr.ReadInt16();
|
||||||
spr.shade = fr.ReadInt8();
|
spr.shade = fr.ReadInt8();
|
||||||
spr.pal = fr.ReadUInt8();
|
spr.pal = fr.ReadUInt8();
|
||||||
spr. clipdist = fr.ReadUInt8();
|
spr.clipdist = fr.ReadUInt8();
|
||||||
spr.blend = fr.ReadUInt8();
|
spr.blend = fr.ReadUInt8();
|
||||||
spr.xrepeat = fr.ReadUInt8();
|
spr.xrepeat = fr.ReadUInt8();
|
||||||
spr.yrepeat = fr.ReadUInt8();
|
spr.yrepeat = fr.ReadUInt8();
|
||||||
|
@ -334,7 +334,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno)
|
||||||
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
||||||
spr.shade = fr.ReadInt8();
|
spr.shade = fr.ReadInt8();
|
||||||
spr.pal = fr.ReadUInt8();
|
spr.pal = fr.ReadUInt8();
|
||||||
spr. clipdist = fr.ReadUInt8();
|
spr.clipdist = fr.ReadUInt8();
|
||||||
spr.xrepeat = fr.ReadUInt8();
|
spr.xrepeat = fr.ReadUInt8();
|
||||||
spr.yrepeat = fr.ReadUInt8();
|
spr.yrepeat = fr.ReadUInt8();
|
||||||
spr.xoffset = fr.ReadInt8();
|
spr.xoffset = fr.ReadInt8();
|
||||||
|
@ -389,7 +389,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr, int& secno)
|
||||||
spr.pal = sec->floorpal;
|
spr.pal = sec->floorpal;
|
||||||
|
|
||||||
spr.blend = 0;
|
spr.blend = 0;
|
||||||
spr. clipdist = 32;
|
spr.clipdist = 32;
|
||||||
spr.xoffset = 0;
|
spr.xoffset = 0;
|
||||||
spr.yoffset = 0;
|
spr.yoffset = 0;
|
||||||
spr.detail = 0;
|
spr.detail = 0;
|
||||||
|
|
|
@ -666,6 +666,7 @@ void DCoreActor::Serialize(FSerializer& arc)
|
||||||
("prevsect", prevSect)
|
("prevsect", prevSect)
|
||||||
("nextsect", nextSect)
|
("nextsect", nextSect)
|
||||||
("sprite", spr)
|
("sprite", spr)
|
||||||
|
("clipdist", clipdist)
|
||||||
("time", time)
|
("time", time)
|
||||||
("spritesetindex", spritesetindex)
|
("spritesetindex", spritesetindex)
|
||||||
("spriteext", sprext)
|
("spriteext", sprext)
|
||||||
|
|
|
@ -4511,7 +4511,7 @@ static Collision MoveThing(DBloodActor* actor)
|
||||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||||
if ((actor->GetOwner()) && !cl_bloodvanillaexplosions && !VanillaMode())
|
if ((actor->GetOwner()) && !cl_bloodvanillaexplosions && !VanillaMode())
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
||||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), actor->fClipdist(), (actor->spr.pos.Z - top) * 0.25, (bottom - actor->spr.pos.Z) * 0.25, CLIPMASK0, lhit);
|
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), actor->clipdist, (actor->spr.pos.Z - top) * 0.25, (bottom - actor->spr.pos.Z) * 0.25, CLIPMASK0, lhit);
|
||||||
actor->hit.hit = lhit;
|
actor->hit.hit = lhit;
|
||||||
enginecompatibility_mode = bakCompat; // restore
|
enginecompatibility_mode = bakCompat; // restore
|
||||||
actor->spr.cstat = bakCstat;
|
actor->spr.cstat = bakCstat;
|
||||||
|
@ -4551,7 +4551,7 @@ static Collision MoveThing(DBloodActor* actor)
|
||||||
|
|
||||||
double ceilZ, floorZ;
|
double ceilZ, floorZ;
|
||||||
Collision ceilColl, floorColl;
|
Collision ceilColl, floorColl;
|
||||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist(), CLIPMASK0);
|
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist, CLIPMASK0);
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
|
|
||||||
if ((actor->spr.flags & 2) && bottom < floorZ)
|
if ((actor->spr.flags & 2) && bottom < floorZ)
|
||||||
|
@ -4570,7 +4570,7 @@ static Collision MoveThing(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CheckLink(actor)) GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist(), CLIPMASK0);
|
if (CheckLink(actor)) GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist, CLIPMASK0);
|
||||||
|
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
if (bottom >= floorZ)
|
if (bottom >= floorZ)
|
||||||
|
@ -4706,7 +4706,7 @@ void MoveDude(DBloodActor* actor)
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
double bz = (bottom - actor->spr.pos.Z) / 4;
|
double bz = (bottom - actor->spr.pos.Z) / 4;
|
||||||
double tz = (actor->spr.pos.Z - top) / 4;
|
double tz = (actor->spr.pos.Z - top) / 4;
|
||||||
double wdf = actor->fClipdist();
|
double wdf = actor->clipdist;
|
||||||
auto pSector = actor->sector();
|
auto pSector = actor->sector();
|
||||||
int nAiStateType = (actor->xspr.aiState) ? actor->xspr.aiState->stateType : -1;
|
int nAiStateType = (actor->xspr.aiState) ? actor->xspr.aiState->stateType : -1;
|
||||||
|
|
||||||
|
@ -5052,7 +5052,7 @@ void MoveDude(DBloodActor* actor)
|
||||||
{
|
{
|
||||||
double floorZ2 = floorZ;
|
double floorZ2 = floorZ;
|
||||||
auto floorColl2 = floorColl;
|
auto floorColl2 = floorColl;
|
||||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist(), CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR);
|
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist, CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR);
|
||||||
if (bottom <= floorZ && actor->spr.pos.Z - floorZ2 < bz)
|
if (bottom <= floorZ && actor->spr.pos.Z - floorZ2 < bz)
|
||||||
{
|
{
|
||||||
floorZ = floorZ2;
|
floorZ = floorZ2;
|
||||||
|
@ -5224,7 +5224,7 @@ int MoveMissile(DBloodActor* actor)
|
||||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL; // remove self collisions for accurate clipmove
|
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL; // remove self collisions for accurate clipmove
|
||||||
}
|
}
|
||||||
Collision clipmoveresult;
|
Collision clipmoveresult;
|
||||||
ClipMove(ppos, &pSector2, vel.XY(), actor->fClipdist(), (ppos.Z - top) / 4, (bottom - ppos.Z) / 4, CLIPMASK0, clipmoveresult, 1);
|
ClipMove(ppos, &pSector2, vel.XY(), actor->clipdist, (ppos.Z - top) / 4, (bottom - ppos.Z) / 4, CLIPMASK0, clipmoveresult, 1);
|
||||||
enginecompatibility_mode = bakCompat; // restore
|
enginecompatibility_mode = bakCompat; // restore
|
||||||
actor->spr.cstat = bakSpriteCstat;
|
actor->spr.cstat = bakSpriteCstat;
|
||||||
auto pSector = pSector2;
|
auto pSector = pSector2;
|
||||||
|
@ -5280,7 +5280,7 @@ int MoveMissile(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
double ceilZ, floorZ;
|
double ceilZ, floorZ;
|
||||||
Collision ceilColl, floorColl;
|
Collision ceilColl, floorColl;
|
||||||
GetZRangeAtXYZ(ppos, pSector2, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist(), CLIPMASK0);
|
GetZRangeAtXYZ(ppos, pSector2, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist, CLIPMASK0);
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
top += vel.Z;
|
top += vel.Z;
|
||||||
bottom += vel.Z;
|
bottom += vel.Z;
|
||||||
|
@ -6086,7 +6086,7 @@ void actCheckFlares()
|
||||||
if (target->hasX() && target->xspr.health > 0)
|
if (target->hasX() && target->xspr.health > 0)
|
||||||
{
|
{
|
||||||
DVector3 pos = target->spr.pos;
|
DVector3 pos = target->spr.pos;
|
||||||
pos.XY() += (actor->xspr.goalAng + target->spr.angle).ToVector() * target->fClipdist() * 0.5;
|
pos.XY() += (actor->xspr.goalAng + target->spr.angle).ToVector() * target->clipdist * 0.5;
|
||||||
pos.Z += actor->xspr.TargetPos.Z;
|
pos.Z += actor->xspr.TargetPos.Z;
|
||||||
SetActor(actor, pos);
|
SetActor(actor, pos);
|
||||||
actor->vel = target->vel;
|
actor->vel = target->vel;
|
||||||
|
@ -6334,11 +6334,11 @@ DBloodActor* actFireThing(DBloodActor* actor, double xyoff, double zoff, double
|
||||||
{
|
{
|
||||||
assert(thingType >= kThingBase && thingType < kThingMax);
|
assert(thingType >= kThingBase && thingType < kThingMax);
|
||||||
|
|
||||||
DVector3 vect = actor->spr.pos.plusZ(zoff) + (actor->spr.angle + DAngle90).ToVector() * xyoff + actor->spr.angle.ToVector() * actor->fClipdist();
|
DVector3 vect = actor->spr.pos.plusZ(zoff) + (actor->spr.angle + DAngle90).ToVector() * xyoff + actor->spr.angle.ToVector() * actor->clipdist;
|
||||||
|
|
||||||
if (HitScan(actor, vect.Z, DVector3(vect.XY() - actor->spr.pos.XY(), 0), CLIPMASK0, actor->fClipdist() * 0.25) != -1)
|
if (HitScan(actor, vect.Z, DVector3(vect.XY() - actor->spr.pos.XY(), 0), CLIPMASK0, actor->clipdist * 0.25) != -1)
|
||||||
{
|
{
|
||||||
vect.XY() = gHitInfo.hitpos.XY() - actor->spr.angle.ToVector() * actor->fClipdist() * 2;
|
vect.XY() = gHitInfo.hitpos.XY() - actor->spr.angle.ToVector() * actor->clipdist * 2;
|
||||||
}
|
}
|
||||||
auto fired = actSpawnThing(actor->sector(), vect, thingType);
|
auto fired = actSpawnThing(actor->sector(), vect, thingType);
|
||||||
fired->SetOwner(actor);
|
fired->SetOwner(actor);
|
||||||
|
@ -6444,7 +6444,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
|
||||||
|
|
||||||
auto vect = actor->spr.pos.plusZ(zoff) + (actor->spr.angle + DAngle90).ToVector() * xyoff;
|
auto vect = actor->spr.pos.plusZ(zoff) + (actor->spr.angle + DAngle90).ToVector() * xyoff;
|
||||||
|
|
||||||
double clipdist = pMissileInfo->fClipDist() + actor->fClipdist();
|
double clipdist = pMissileInfo->fClipDist() + actor->clipdist;
|
||||||
vect += actor->spr.angle.ToVector() * clipdist;
|
vect += actor->spr.angle.ToVector() * clipdist;
|
||||||
|
|
||||||
int hit = HitScan(actor, vect.Z, DVector3(vect.XY() - actor->spr.pos.XY(), 0), CLIPMASK0, clipdist * 4);
|
int hit = HitScan(actor, vect.Z, DVector3(vect.XY() - actor->spr.pos.XY(), 0), CLIPMASK0, clipdist * 4);
|
||||||
|
|
|
@ -135,7 +135,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, DAngle nAngle, double nRan
|
||||||
DVector2 nAngVect = nAngle.ToVector();
|
DVector2 nAngVect = nAngle.ToVector();
|
||||||
HitScan(actor, pos.Z, DVector3(nAngVect, 0) * 1024, CLIPMASK0, nRange);
|
HitScan(actor, pos.Z, DVector3(nAngVect, 0) * 1024, CLIPMASK0, nRange);
|
||||||
double nDist = (actor->spr.pos.XY() - gHitInfo.hitpos.XY()).Length();
|
double nDist = (actor->spr.pos.XY() - gHitInfo.hitpos.XY()).Length();
|
||||||
if (nDist - (actor->fClipdist()) < nRange / 16.) // this was actually comparing a Build unit value with a texel unit value!
|
if (nDist - (actor->clipdist) < nRange / 16.) // this was actually comparing a Build unit value with a texel unit value!
|
||||||
{
|
{
|
||||||
if (gHitInfo.actor() == nullptr || target == nullptr || target != gHitInfo.actor())
|
if (gHitInfo.actor() == nullptr || target == nullptr || target != gHitInfo.actor())
|
||||||
return false;
|
return false;
|
||||||
|
@ -178,7 +178,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, DAngle nAngle, double nRan
|
||||||
case kDudeGargoyleFlesh:
|
case kDudeGargoyleFlesh:
|
||||||
case kDudeGargoyleStone:
|
case kDudeGargoyleStone:
|
||||||
case kDudeBat:
|
case kDudeBat:
|
||||||
if (actor->fClipdist() > nDist * 4)
|
if (actor->clipdist > nDist * 4)
|
||||||
return 0;
|
return 0;
|
||||||
if (Depth)
|
if (Depth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,11 +145,11 @@ void SpidBirthSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||||
if (nDist < 0x1a0 && nDist > 0x140 && nDeltaAngle < pDudeInfo->Periphery())
|
if (nDist < 0x1a0 && nDist > 0x140 && nDeltaAngle < pDudeInfo->Periphery())
|
||||||
spawned = actSpawnDude(actor, kDudeSpiderRed, actor->fClipdist() * 0.25);
|
spawned = actSpawnDude(actor, kDudeSpiderRed, actor->clipdist * 0.25);
|
||||||
else if (nDist < 0x140 && nDist > 0xc0 && nDeltaAngle < pDudeInfo->Periphery())
|
else if (nDist < 0x140 && nDist > 0xc0 && nDeltaAngle < pDudeInfo->Periphery())
|
||||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->fClipdist() * 0.25);
|
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->clipdist * 0.25);
|
||||||
else if (nDist < 0xc0 && nDeltaAngle < pDudeInfo->Periphery())
|
else if (nDist < 0xc0 && nDeltaAngle < pDudeInfo->Periphery())
|
||||||
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->fClipdist() * 0.25);
|
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->clipdist * 0.25);
|
||||||
|
|
||||||
if (spawned)
|
if (spawned)
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,7 +242,7 @@ void genDudeAttack1(int, DBloodActor* actor)
|
||||||
else if (pExtra->weaponType == kGenDudeWeaponSummon)
|
else if (pExtra->weaponType == kGenDudeWeaponSummon)
|
||||||
{
|
{
|
||||||
DBloodActor* spawned = nullptr;
|
DBloodActor* spawned = nullptr;
|
||||||
double dist = actor->fClipdist() * 4;
|
double dist = actor->clipdist * 4;
|
||||||
if (pExtra->slaveCount <= gGameOptions.nDifficulty)
|
if (pExtra->slaveCount <= gGameOptions.nDifficulty)
|
||||||
{
|
{
|
||||||
if ((spawned = actSpawnDude(actor, pExtra->curWeapon, dist + RandomD(dist, 4))) != NULL)
|
if ((spawned = actSpawnDude(actor, pExtra->curWeapon, dist + RandomD(dist, 4))) != NULL)
|
||||||
|
@ -373,7 +373,7 @@ static void ThrowThing(DBloodActor* actor, bool impact)
|
||||||
spawned->xspr.data3 = 512 / (gGameOptions.nDifficulty + 1);
|
spawned->xspr.data3 = 512 / (gGameOptions.nDifficulty + 1);
|
||||||
spawned->spr.cstat &= ~CSTAT_SPRITE_BLOCK;
|
spawned->spr.cstat &= ~CSTAT_SPRITE_BLOCK;
|
||||||
spawned->spr.pal = 6;
|
spawned->spr.pal = 6;
|
||||||
spawned->set_const_clipdist(0);
|
spawned->clipdist = 0;
|
||||||
spawned->SetTarget(actor->GetTarget());
|
spawned->SetTarget(actor->GetTarget());
|
||||||
spawned->xspr.Proximity = true;
|
spawned->xspr.Proximity = true;
|
||||||
spawned->xspr.stateTimer = 1;
|
spawned->xspr.stateTimer = 1;
|
||||||
|
@ -753,7 +753,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
||||||
|
|
||||||
if (hit >= 0)
|
if (hit >= 0)
|
||||||
{
|
{
|
||||||
targetDist = dist - (target->fClipdist());
|
targetDist = dist - (target->clipdist);
|
||||||
objDist = (gHitInfo.hitpos.XY() - actor->spr.pos.XY()).Length();
|
objDist = (gHitInfo.hitpos.XY() - actor->spr.pos.XY()).Length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ TArray<DBloodActor*> SpawnActors(BloodSpawnSpriteDef& sprites)
|
||||||
auto actor = InsertSprite(sprt->sectp, sprt->statnum);
|
auto actor = InsertSprite(sprt->sectp, sprt->statnum);
|
||||||
spawns[j++] = actor;
|
spawns[j++] = actor;
|
||||||
actor->time = i;
|
actor->time = i;
|
||||||
actor->spr = sprites.sprites[i];
|
actor->initFromSprite(&sprites.sprites[i]);
|
||||||
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
||||||
else actor->sprext = {};
|
else actor->sprext = {};
|
||||||
actor->spsmooth = {};
|
actor->spsmooth = {};
|
||||||
|
|
|
@ -439,7 +439,7 @@ void fxBloodBits(DBloodActor* actor, sectortype*) // 14
|
||||||
if (!actor) return;
|
if (!actor) return;
|
||||||
double ceilZ, floorZ;
|
double ceilZ, floorZ;
|
||||||
Collision floorColl, ceilColl;
|
Collision floorColl, ceilColl;
|
||||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist() * 0.25, CLIPMASK0);
|
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist * 0.25, CLIPMASK0);
|
||||||
double top, bottom;
|
double top, bottom;
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
actor->spr.pos.Z += floorZ - bottom;
|
actor->spr.pos.Z += floorZ - bottom;
|
||||||
|
@ -497,7 +497,7 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
|
||||||
double ceilZ, floorZ;
|
double ceilZ, floorZ;
|
||||||
Collision floorColl, ceilColl;
|
Collision floorColl, ceilColl;
|
||||||
|
|
||||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist() * 0.25, CLIPMASK0);
|
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist * 0.25, CLIPMASK0);
|
||||||
double top, bottom;
|
double top, bottom;
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
actor->spr.pos.Z += floorZ - bottom;
|
actor->spr.pos.Z += floorZ - bottom;
|
||||||
|
@ -629,7 +629,7 @@ void fxPodBloodSplat(DBloodActor* actor, sectortype*) // 19
|
||||||
double ceilZ, floorZ;
|
double ceilZ, floorZ;
|
||||||
Collision floorColl, ceilColl;
|
Collision floorColl, ceilColl;
|
||||||
|
|
||||||
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->fClipdist() * 0.25, CLIPMASK0);
|
GetZRange(actor, &ceilZ, &ceilColl, &floorZ, &floorColl, actor->clipdist * 0.25, CLIPMASK0);
|
||||||
double top, bottom;
|
double top, bottom;
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
actor->spr.pos.Z += floorZ - bottom;
|
actor->spr.pos.Z += floorZ - bottom;
|
||||||
|
|
|
@ -322,7 +322,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
|
||||||
|
|
||||||
void fxSpawnEjectingBrass(DBloodActor* actor, double z, double dist, int rdist)
|
void fxSpawnEjectingBrass(DBloodActor* actor, double z, double dist, int rdist)
|
||||||
{
|
{
|
||||||
DVector3 pos(actor->spr.pos.XY() + actor->fClipdist() * actor->spr.angle.ToVector() + (actor->spr.angle + DAngle90).ToVector() * dist, z);
|
DVector3 pos(actor->spr.pos.XY() + actor->clipdist * actor->spr.angle.ToVector() + (actor->spr.angle + DAngle90).ToVector() * dist, z);
|
||||||
|
|
||||||
auto pBrass = gFX.fxSpawnActor((FX_ID)(FX_37 + Random(3)), actor->sector(), pos);
|
auto pBrass = gFX.fxSpawnActor((FX_ID)(FX_37 + Random(3)), actor->sector(), pos);
|
||||||
if (pBrass)
|
if (pBrass)
|
||||||
|
@ -344,7 +344,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, double z, double dist, int rdist)
|
||||||
|
|
||||||
void fxSpawnEjectingShell(DBloodActor* actor, double z, double dist, int rdist)
|
void fxSpawnEjectingShell(DBloodActor* actor, double z, double dist, int rdist)
|
||||||
{
|
{
|
||||||
DVector3 pos(actor->spr.pos.XY() + actor->fClipdist() * actor->spr.angle.ToVector() + (actor->spr.angle + DAngle90).ToVector() * dist, z);
|
DVector3 pos(actor->spr.pos.XY() + actor->clipdist * actor->spr.angle.ToVector() + (actor->spr.angle + DAngle90).ToVector() * dist, z);
|
||||||
|
|
||||||
auto pShell = gFX.fxSpawnActor((FX_ID)(FX_40 + Random(3)), actor->sector(), pos);
|
auto pShell = gFX.fxSpawnActor((FX_ID)(FX_40 + Random(3)), actor->sector(), pos);
|
||||||
if (pShell)
|
if (pShell)
|
||||||
|
|
|
@ -289,7 +289,7 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, DVector3* pVel)
|
||||||
if (!pPos && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
if (!pPos && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||||
{
|
{
|
||||||
DAngle nAngle = RandomAngle();
|
DAngle nAngle = RandomAngle();
|
||||||
gPos = DVector3(actor->spr.pos.XY() + actor->fClipdist() * nAngle.ToVector(), bottom - RandomD(bottom - top, 8));
|
gPos = DVector3(actor->spr.pos.XY() + actor->clipdist * nAngle.ToVector(), bottom - RandomD(bottom - top, 8));
|
||||||
}
|
}
|
||||||
auto pFX = gFX.fxSpawnActor(pGFX->fxId, pSector, gPos);
|
auto pFX = gFX.fxSpawnActor(pGFX->fxId, pSector, gPos);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
|
@ -356,7 +356,7 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, DVector3* p
|
||||||
if (!pPos)
|
if (!pPos)
|
||||||
{
|
{
|
||||||
DAngle nAngle = RandomAngle();
|
DAngle nAngle = RandomAngle();
|
||||||
gPos = DVector3(actor->spr.pos.XY() + actor->fClipdist() * nAngle.ToVector(), bottom - RandomD(bottom - top, 8));
|
gPos = DVector3(actor->spr.pos.XY() + actor->clipdist * nAngle.ToVector(), bottom - RandomD(bottom - top, 8));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1645,7 +1645,7 @@ void debrisMove(int listIndex)
|
||||||
moveHit.setNone();
|
moveHit.setNone();
|
||||||
double floorDist = (bottom - actor->spr.pos.Z) * 0.25;
|
double floorDist = (bottom - actor->spr.pos.Z) * 0.25;
|
||||||
double ceilDist = (actor->spr.pos.Z - top) * 0.25;
|
double ceilDist = (actor->spr.pos.Z - top) * 0.25;
|
||||||
double clipDistf = actor->fClipdist();
|
double clipDistf = actor->clipdist;
|
||||||
int mass = actor->spriteMass.mass;
|
int mass = actor->spriteMass.mass;
|
||||||
|
|
||||||
bool uwater = false;
|
bool uwater = false;
|
||||||
|
@ -5565,13 +5565,13 @@ bool modernTypeOperateSector(sectortype* pSector, const EVENT& event)
|
||||||
|
|
||||||
void useCustomDudeSpawn(DBloodActor* pSource, DBloodActor* pActor)
|
void useCustomDudeSpawn(DBloodActor* pSource, DBloodActor* pActor)
|
||||||
{
|
{
|
||||||
genDudeSpawn(pSource, pActor, pActor->fClipdist() * 0.5);
|
genDudeSpawn(pSource, pActor, pActor->clipdist * 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void useDudeSpawn(DBloodActor* pSource, DBloodActor* pActor)
|
void useDudeSpawn(DBloodActor* pSource, DBloodActor* pActor)
|
||||||
{
|
{
|
||||||
if (randomSpawnDude(pSource, pActor, pActor->fClipdist() * 0.5, 0) == nullptr)
|
if (randomSpawnDude(pSource, pActor, pActor->clipdist * 0.5, 0) == nullptr)
|
||||||
nnExtSpawnDude(pSource, pActor, pActor->xspr.data1, pActor->fClipdist() * 0.5, 0);
|
nnExtSpawnDude(pSource, pActor, pActor->xspr.data1, pActor->clipdist * 0.5, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -7670,7 +7670,7 @@ bool nnExtCanMove(DBloodActor* actor, DBloodActor* target, DAngle nAngle, double
|
||||||
HitScan(actor, pos.Z, nAngVect, CLIPMASK0, nRange);
|
HitScan(actor, pos.Z, nAngVect, CLIPMASK0, nRange);
|
||||||
double nDist = (actor->spr.pos.XY() - gHitInfo.hitpos.XY()).Length();
|
double nDist = (actor->spr.pos.XY() - gHitInfo.hitpos.XY()).Length();
|
||||||
|
|
||||||
if (target != nullptr && nDist - actor->fClipdist() < nRange)
|
if (target != nullptr && nDist - actor->clipdist < nRange)
|
||||||
return (target == gHitInfo.actor());
|
return (target == gHitInfo.actor());
|
||||||
|
|
||||||
pos += nAngVect * nRange;
|
pos += nAngVect * nRange;
|
||||||
|
@ -7858,14 +7858,14 @@ bool aiPatrolMarkerReached(DBloodActor* actor)
|
||||||
auto markeractor = actor->GetTarget();
|
auto markeractor = actor->GetTarget();
|
||||||
if (markeractor && markeractor->spr.type == kMarkerPath)
|
if (markeractor && markeractor->spr.type == kMarkerPath)
|
||||||
{
|
{
|
||||||
double okDist = max(markeractor->fClipdist() * 8, 4.);
|
double okDist = max(markeractor->clipdist * 8, 4.);
|
||||||
auto ov = markeractor->spr.pos.XY() - actor->spr.pos.XY(); // this was already shifted right by 4 in the old code.
|
auto ov = markeractor->spr.pos.XY() - actor->spr.pos.XY(); // this was already shifted right by 4 in the old code.
|
||||||
|
|
||||||
if (ov.Length() <= okDist)
|
if (ov.Length() <= okDist)
|
||||||
{
|
{
|
||||||
if (spriteIsUnderwater(actor) || pExtra->flying)
|
if (spriteIsUnderwater(actor) || pExtra->flying)
|
||||||
{
|
{
|
||||||
okDist = markeractor->fClipdist() * 16;
|
okDist = markeractor->clipdist * 16;
|
||||||
double ztop, zbot, ztop2, zbot2;
|
double ztop, zbot, ztop2, zbot2;
|
||||||
GetActorExtents(actor, &ztop, &zbot);
|
GetActorExtents(actor, &ztop, &zbot);
|
||||||
GetActorExtents(markeractor, &ztop2, &zbot2);
|
GetActorExtents(markeractor, &ztop2, &zbot2);
|
||||||
|
|
|
@ -1710,7 +1710,7 @@ void ProcessInput(PLAYER* pPlayer)
|
||||||
if (pPlayer->handTime <= 0 && pPlayer->hand)
|
if (pPlayer->handTime <= 0 && pPlayer->hand)
|
||||||
{
|
{
|
||||||
DBloodActor* pactor = pPlayer->actor;
|
DBloodActor* pactor = pPlayer->actor;
|
||||||
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->fClipdist() * 0.5);
|
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->clipdist * 0.5);
|
||||||
if (spawned)
|
if (spawned)
|
||||||
{
|
{
|
||||||
spawned->spr.angle += DAngle180;
|
spawned->spr.angle += DAngle180;
|
||||||
|
@ -1797,7 +1797,7 @@ void playerProcess(PLAYER* pPlayer)
|
||||||
if (!gNoClip)
|
if (!gNoClip)
|
||||||
{
|
{
|
||||||
auto pSector = actor->sector();
|
auto pSector = actor->sector();
|
||||||
if (pushmove(actor->spr.pos, &pSector, actor->fClipdist(), dzceil, dzflor, CLIPMASK0) == -1)
|
if (pushmove(actor->spr.pos, &pSector, actor->clipdist, dzceil, dzflor, CLIPMASK0) == -1)
|
||||||
actDamageSprite(actor, actor, kDamageFall, 500 << 4);
|
actDamageSprite(actor, actor, kDamageFall, 500 << 4);
|
||||||
if (actor->sector() != pSector)
|
if (actor->sector() != pSector)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2580,7 +2580,7 @@ void handle_se00(DDukeActor* actor)
|
||||||
actor->tempval += 4;
|
actor->tempval += 4;
|
||||||
if (actor->tempval >= 256)
|
if (actor->tempval >= 256)
|
||||||
callsound(actor->sector(), actor, true);
|
callsound(actor->sector(), actor, true);
|
||||||
if (actor->native_clipdist()) direction = 1; // notreallyclipdist
|
if (actor->spr.clipdist) direction = 1; // notreallyclipdist
|
||||||
else direction = -1;
|
else direction = -1;
|
||||||
}
|
}
|
||||||
else actor->tempval = 256;
|
else actor->tempval = 256;
|
||||||
|
@ -2608,7 +2608,7 @@ void handle_se00(DDukeActor* actor)
|
||||||
actor->tempval -= 4;
|
actor->tempval -= 4;
|
||||||
if (actor->tempval <= 0)
|
if (actor->tempval <= 0)
|
||||||
callsound(actor->sector(), actor, true);
|
callsound(actor->sector(), actor, true);
|
||||||
if (actor->native_clipdist()) direction = -1; // notreallyclipdist
|
if (actor->spr.clipdist) direction = -1; // notreallyclipdist
|
||||||
else direction = 1;
|
else direction = 1;
|
||||||
}
|
}
|
||||||
else actor->tempval = 0;
|
else actor->tempval = 0;
|
||||||
|
|
|
@ -462,7 +462,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
||||||
if (actor->spr.picnum == LIZMAN)
|
if (actor->spr.picnum == LIZMAN)
|
||||||
clipdist = 18.25;
|
clipdist = 18.25;
|
||||||
else if (actorflag(actor, SFLAG_BADGUY))
|
else if (actorflag(actor, SFLAG_BADGUY))
|
||||||
clipdist = actor->fClipdist();
|
clipdist = actor->clipdist;
|
||||||
else
|
else
|
||||||
clipdist = 12;
|
clipdist = 12;
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
||||||
if (actor->spr.statnum == STAT_PROJECTILE)
|
if (actor->spr.statnum == STAT_PROJECTILE)
|
||||||
clipmove(ppos, &dasectp, change * 0.5, 0.5, 4., 4., cliptype, result);
|
clipmove(ppos, &dasectp, change * 0.5, 0.5, 4., 4., cliptype, result);
|
||||||
else
|
else
|
||||||
clipmove(ppos, &dasectp, change * 0.5, actor->fClipdist(), 4., 4., cliptype, result);
|
clipmove(ppos, &dasectp, change * 0.5, actor->clipdist, 4., 4., cliptype, result);
|
||||||
}
|
}
|
||||||
actor->spr.pos.XY() = ppos.XY();
|
actor->spr.pos.XY() = ppos.XY();
|
||||||
|
|
||||||
|
@ -2464,7 +2464,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
||||||
int ds = actor->temp_data[0] / 6;
|
int ds = actor->temp_data[0] / 6;
|
||||||
if (actor->spr.xrepeat < 80)
|
if (actor->spr.xrepeat < 80)
|
||||||
actor->spr.yrepeat = actor->spr.xrepeat += ds;
|
actor->spr.yrepeat = actor->spr.xrepeat += ds;
|
||||||
actor->spr.clipdist += ds;
|
actor->clipdist += ds * 0.25;
|
||||||
if (actor->temp_data[0] <= 2)
|
if (actor->temp_data[0] <= 2)
|
||||||
actor->temp_data[3] = krand() % 10;
|
actor->temp_data[3] = krand() % 10;
|
||||||
if (actor->temp_data[0] > 30)
|
if (actor->temp_data[0] > 30)
|
||||||
|
|
|
@ -406,7 +406,7 @@ int movesprite_ex_r(DDukeActor* actor, const DVector3& change, unsigned int clip
|
||||||
if (actor->spr.statnum == STAT_PROJECTILE)
|
if (actor->spr.statnum == STAT_PROJECTILE)
|
||||||
clipmove(ppos, &dasectp, change * 0.5, 0.5, 4., 4., cliptype, result);
|
clipmove(ppos, &dasectp, change * 0.5, 0.5, 4., 4., cliptype, result);
|
||||||
else
|
else
|
||||||
clipmove(ppos, &dasectp, change * 0.5, actor->fClipdist(), 4., 4., cliptype, result);
|
clipmove(ppos, &dasectp, change * 0.5, actor->clipdist, 4., 4., cliptype, result);
|
||||||
}
|
}
|
||||||
actor->spr.pos.XY() = ppos.XY();
|
actor->spr.pos.XY() = ppos.XY();
|
||||||
|
|
||||||
|
|
|
@ -969,7 +969,7 @@ static TArray<DDukeActor*> spawnactors(SpawnSpriteDef& sprites)
|
||||||
auto sprt = &sprites.sprites[i];
|
auto sprt = &sprites.sprites[i];
|
||||||
auto actor = static_cast<DDukeActor*>(InsertActor(RUNTIME_CLASS(DDukeActor), sprt->sectp, sprt->statnum));
|
auto actor = static_cast<DDukeActor*>(InsertActor(RUNTIME_CLASS(DDukeActor), sprt->sectp, sprt->statnum));
|
||||||
spawns[j++] = actor;
|
spawns[j++] = actor;
|
||||||
actor->spr = sprites.sprites[i];
|
actor->initFromSprite(&sprites.sprites[i]);
|
||||||
actor->time = i;
|
actor->time = i;
|
||||||
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
||||||
else actor->sprext = {};
|
else actor->sprext = {};
|
||||||
|
|
|
@ -63,33 +63,17 @@ DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, in
|
||||||
|
|
||||||
|
|
||||||
act->spr.pos = pos;
|
act->spr.pos = pos;
|
||||||
act->spr.cstat = 0;
|
|
||||||
act->spr.picnum = s_pn;
|
act->spr.picnum = s_pn;
|
||||||
act->spr.shade = s_shd;
|
act->spr.shade = s_shd;
|
||||||
act->spr.xrepeat = s_xr;
|
act->spr.xrepeat = s_xr;
|
||||||
act->spr.yrepeat = s_yr;
|
act->spr.yrepeat = s_yr;
|
||||||
act->spr.pal = 0;
|
|
||||||
|
|
||||||
act->spr.angle = s_ang;
|
act->spr.angle = s_ang;
|
||||||
act->vel.X = s_vel;
|
act->vel.X = s_vel;
|
||||||
act->vel.Z = s_zvel;
|
act->vel.Z = s_zvel;
|
||||||
act->spr.xoffset = 0;
|
|
||||||
act->spr.yoffset = 0;
|
|
||||||
act->spr.yint = 0;
|
|
||||||
act->set_const_clipdist(0);
|
|
||||||
act->spr.pal = 0;
|
|
||||||
act->spr.lotag = 0;
|
|
||||||
act->backuploc();
|
act->backuploc();
|
||||||
|
|
||||||
act->ovel.Zero();
|
|
||||||
|
|
||||||
act->timetosleep = 0;
|
|
||||||
act->actorstayput = nullptr;
|
|
||||||
act->hitextra = -1;
|
act->hitextra = -1;
|
||||||
act->cgg = 0;
|
|
||||||
act->movflag = 0;
|
|
||||||
act->tempval = 0;
|
|
||||||
act->dispicnum = 0;
|
|
||||||
act->SetHitOwner(s_ow);
|
act->SetHitOwner(s_ow);
|
||||||
act->SetOwner(s_ow);
|
act->SetOwner(s_ow);
|
||||||
|
|
||||||
|
@ -879,8 +863,8 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
||||||
{
|
{
|
||||||
if (sectp->lotag == 30)
|
if (sectp->lotag == 30)
|
||||||
{
|
{
|
||||||
if (actor->spr.pal) actor->set_const_clipdist(1);
|
if (actor->spr.pal) actor->spr.clipdist = 1; // notreallyclipdist
|
||||||
else actor->set_const_clipdist(0);
|
else actor->spr.clipdist = 0;
|
||||||
actor->temp_pos.Z = sectp->floorz;
|
actor->temp_pos.Z = sectp->floorz;
|
||||||
sectp->hitagactor = actor;
|
sectp->hitagactor = actor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||||
act->spr.xrepeat = 0;
|
act->spr.xrepeat = 0;
|
||||||
act->spr.yrepeat = 0;
|
act->spr.yrepeat = 0;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
act->spr.extra = 0;
|
act->spr.extra = 0;
|
||||||
ChangeActorStat(act, STAT_BOWLING);
|
ChangeActorStat(act, STAT_BOWLING);
|
||||||
break;
|
break;
|
||||||
|
@ -77,7 +77,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.xrepeat = 16;
|
act->spr.xrepeat = 16;
|
||||||
act->spr.yrepeat = 16;
|
act->spr.yrepeat = 16;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
act->spr.extra = 0;
|
act->spr.extra = 0;
|
||||||
act->spr.cstat = 0;
|
act->spr.cstat = 0;
|
||||||
ChangeActorStat(act, 121);
|
ChangeActorStat(act, 121);
|
||||||
|
@ -114,18 +114,18 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
case RRTILE8448:
|
case RRTILE8448:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.lotag = 1;
|
act->spr.lotag = 1;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
break;
|
break;
|
||||||
case RRTILE8099:
|
case RRTILE8099:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.lotag = 5;
|
act->spr.lotag = 5;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
ChangeActorStat(act, 123);
|
ChangeActorStat(act, 123);
|
||||||
break;
|
break;
|
||||||
case RRTILE8704:
|
case RRTILE8704:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.lotag = 1;
|
act->spr.lotag = 1;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
break;
|
break;
|
||||||
case RRTILE8192:
|
case RRTILE8192:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
|
@ -142,7 +142,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
case RRTILE8165:
|
case RRTILE8165:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.lotag = 1;
|
act->spr.lotag = 1;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
act->SetOwner(act);
|
act->SetOwner(act);
|
||||||
act->spr.extra = 0;
|
act->spr.extra = 0;
|
||||||
ChangeActorStat(act, 115);
|
ChangeActorStat(act, 115);
|
||||||
|
@ -150,7 +150,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
case RRTILE8593:
|
case RRTILE8593:
|
||||||
if (!isRRRA()) goto default_case;
|
if (!isRRRA()) goto default_case;
|
||||||
act->spr.lotag = 1;
|
act->spr.lotag = 1;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
act->SetOwner(act);
|
act->SetOwner(act);
|
||||||
act->spr.extra = 0;
|
act->spr.extra = 0;
|
||||||
ChangeActorStat(act, 122);
|
ChangeActorStat(act, 122);
|
||||||
|
@ -168,7 +168,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||||
act->spr.xrepeat = 0;
|
act->spr.xrepeat = 0;
|
||||||
act->spr.yrepeat = 0;
|
act->spr.yrepeat = 0;
|
||||||
act->set_const_clipdist(0);
|
act->clipdist = 0;
|
||||||
act->spr.lotag = 0;
|
act->spr.lotag = 0;
|
||||||
ChangeActorStat(act, 106);
|
ChangeActorStat(act, 106);
|
||||||
break;
|
break;
|
||||||
|
@ -840,7 +840,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
act->spr.xrepeat = 24;
|
act->spr.xrepeat = 24;
|
||||||
act->spr.yrepeat = 18;
|
act->spr.yrepeat = 18;
|
||||||
act->setClipDistFromTile();
|
act->setClipDistFromTile();
|
||||||
act->spr.clipdist <<= 2;
|
act->clipdist *= 4;
|
||||||
break;
|
break;
|
||||||
case DRONE:
|
case DRONE:
|
||||||
act->spr.xrepeat = 14;
|
act->spr.xrepeat = 14;
|
||||||
|
@ -984,7 +984,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
act->spr.xrepeat = 64;
|
act->spr.xrepeat = 64;
|
||||||
act->spr.yrepeat = 128;
|
act->spr.yrepeat = 128;
|
||||||
act->setClipDistFromTile();
|
act->setClipDistFromTile();
|
||||||
act->spr.clipdist >>= 2;
|
act->clipdist *= 0.25;
|
||||||
act->spr.cstat = CSTAT_SPRITE_TRANSLUCENT;
|
act->spr.cstat = CSTAT_SPRITE_TRANSLUCENT;
|
||||||
break;
|
break;
|
||||||
case LTH:
|
case LTH:
|
||||||
|
|
|
@ -373,7 +373,7 @@ int MoveBullet(int nBullet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
coll = movesprite(pActor, pBullet->vect.XY(), pBullet->vect.Z, pActor->fClipdist() / 128., CLIPMASK1);
|
coll = movesprite(pActor, pBullet->vect.XY(), pBullet->vect.Z, pActor->clipdist / 128., CLIPMASK1);
|
||||||
|
|
||||||
MOVEEND:
|
MOVEEND:
|
||||||
if (coll.type || coll.exbits)
|
if (coll.type || coll.exbits)
|
||||||
|
@ -771,7 +771,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, double fZOffset, DA
|
||||||
}
|
}
|
||||||
|
|
||||||
pBullet->vect.Z = 0;
|
pBullet->vect.Z = 0;
|
||||||
pBullet->vect.XY() = nAngle.ToVector() * pActor->fClipdist();
|
pBullet->vect.XY() = nAngle.ToVector() * pActor->clipdist;
|
||||||
BulletList[nBullet].pEnemy = nullptr;
|
BulletList[nBullet].pEnemy = nullptr;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
|
||||||
|
|
||||||
pChunkActor->spr.picnum = anim;
|
pChunkActor->spr.picnum = anim;
|
||||||
pChunkActor->spr.lotag = runlist_HeadRun() + 1;
|
pChunkActor->spr.lotag = runlist_HeadRun() + 1;
|
||||||
pChunkActor->set_const_clipdist(0);
|
pChunkActor->clipdist = 0;
|
||||||
|
|
||||||
// GrabTimeSlot(3);
|
// GrabTimeSlot(3);
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ void ThrowGrenade(int nPlayer, double dz, double push1)
|
||||||
pActor->vel.Z = ((32. * push1) - 17);
|
pActor->vel.Z = ((32. * push1) - 17);
|
||||||
|
|
||||||
|
|
||||||
DVector2 vec = nAngle.ToVector() * pPlayerActor->fClipdist() *2; // == << 14 + 3 + 2 - 18
|
DVector2 vec = nAngle.ToVector() * pPlayerActor->clipdist *2; // == << 14 + 3 + 2 - 18
|
||||||
auto nMov = movesprite(pActor, vec, dz, 0, CLIPMASK1);
|
auto nMov = movesprite(pActor, vec, dz, 0, CLIPMASK1);
|
||||||
if (nMov.type == kHitWall)
|
if (nMov.type == kHitWall)
|
||||||
{
|
{
|
||||||
|
@ -321,7 +321,7 @@ void AIGrenade::Tick(RunListEvent* ev)
|
||||||
double zVel = pActor->vel.Z;
|
double zVel = pActor->vel.Z;
|
||||||
|
|
||||||
Gravity(pActor);
|
Gravity(pActor);
|
||||||
auto nMov = movesprite(pActor, pActor->vec, pActor->vel.Z, pActor->fClipdist() / 128., CLIPMASK1);
|
auto nMov = movesprite(pActor, pActor->vec, pActor->vel.Z, pActor->clipdist / 128., CLIPMASK1);
|
||||||
|
|
||||||
if (!nMov.type && !nMov.exbits)
|
if (!nMov.type && !nMov.exbits)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -72,7 +72,7 @@ static TArray<DExhumedActor*> spawnactors(SpawnSpriteDef& sprites)
|
||||||
auto sprt = &sprites.sprites[i];
|
auto sprt = &sprites.sprites[i];
|
||||||
auto actor = insertActor(sprt->sectp, sprt->statnum);
|
auto actor = insertActor(sprt->sectp, sprt->statnum);
|
||||||
spawns[j++] = actor;
|
spawns[j++] = actor;
|
||||||
actor->spr = sprites.sprites[i];
|
actor->initFromSprite(&sprites.sprites[i]);
|
||||||
actor->time = i;
|
actor->time = i;
|
||||||
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
||||||
else actor->sprext = {};
|
else actor->sprext = {};
|
||||||
|
|
|
@ -55,7 +55,7 @@ DExhumedActor* BuildLavaLimb(DExhumedActor* pActor, int move, double height)
|
||||||
pLimbActor->spr.picnum = (move & 3) % 3;
|
pLimbActor->spr.picnum = (move & 3) % 3;
|
||||||
pLimbActor->spr.hitag = 0;
|
pLimbActor->spr.hitag = 0;
|
||||||
pLimbActor->spr.lotag = runlist_HeadRun() + 1;
|
pLimbActor->spr.lotag = runlist_HeadRun() + 1;
|
||||||
pLimbActor->set_const_clipdist(0);
|
pLimbActor->clipdist = 0;
|
||||||
|
|
||||||
// GrabTimeSlot(3);
|
// GrabTimeSlot(3);
|
||||||
|
|
||||||
|
|
|
@ -433,7 +433,7 @@ Collision movesprite(DExhumedActor* pActor, DVector2 vect, double dz, double flo
|
||||||
vect *= 0.5;
|
vect *= 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
Collision nRet = movespritez(pActor, dz, nSpriteHeight, pActor->fClipdist());
|
Collision nRet = movespritez(pActor, dz, nSpriteHeight, pActor->clipdist);
|
||||||
|
|
||||||
pSector = pActor->sector(); // modified in movespritez so re-grab this variable
|
pSector = pActor->sector(); // modified in movespritez so re-grab this variable
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ Collision movesprite(DExhumedActor* pActor, DVector2 vect, double dz, double flo
|
||||||
}
|
}
|
||||||
|
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(pActor->spr.pos, &pSector, vect, pActor->fClipdist(), nSpriteHeight, flordist, clipmask, coll);
|
clipmove(pActor->spr.pos, &pSector, vect, pActor->clipdist, nSpriteHeight, flordist, clipmask, coll);
|
||||||
if (coll.type != kHitNone) // originally this or'ed the two values which can create unpredictable bad values in some edge cases.
|
if (coll.type != kHitNone) // originally this or'ed the two values which can create unpredictable bad values in some edge cases.
|
||||||
{
|
{
|
||||||
coll.exbits = nRet.exbits;
|
coll.exbits = nRet.exbits;
|
||||||
|
@ -864,7 +864,7 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel)
|
||||||
|
|
||||||
// The vector that got passed in here originally was Q28.4, while clipmove expects Q14.18, effectively resulting in actual zero movement
|
// The vector that got passed in here originally was Q28.4, while clipmove expects Q14.18, effectively resulting in actual zero movement
|
||||||
// because the resulting offset would be far below the coordinate's precision.
|
// because the resulting offset would be far below the coordinate's precision.
|
||||||
clipmove(pos, &pSectorB, -vect / 16384., pActor->fClipdist(), 0., 0., CLIPMASK0, scratch);
|
clipmove(pos, &pSectorB, -vect / 16384., pActor->clipdist, 0., 0., CLIPMASK0, scratch);
|
||||||
|
|
||||||
if (pSectorB) {
|
if (pSectorB) {
|
||||||
ChangeActorSect(pActor, pSectorB);
|
ChangeActorSect(pActor, pSectorB);
|
||||||
|
@ -882,9 +882,9 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel)
|
||||||
|
|
||||||
// Original used 14 bits of scale from the sine table and 4 bits from clipdist.
|
// Original used 14 bits of scale from the sine table and 4 bits from clipdist.
|
||||||
// vect was added unscaled, essentially nullifying its effect entirely.
|
// vect was added unscaled, essentially nullifying its effect entirely.
|
||||||
auto vect2 = -nAngle.ToVector() * pActor->fClipdist()/* - vect*/;
|
auto vect2 = -nAngle.ToVector() * pActor->clipdist/* - vect*/;
|
||||||
|
|
||||||
clipmove(pos, &pSectorB, -vect / 16384., pActor->fClipdist(), 0., 0., CLIPMASK0, scratch);
|
clipmove(pos, &pSectorB, -vect / 16384., pActor->clipdist, 0., 0., CLIPMASK0, scratch);
|
||||||
|
|
||||||
if (pSectorB != pNextSector && (pSectorB == pSector || pNextSector == pSector))
|
if (pSectorB != pNextSector && (pSectorB == pSector || pNextSector == pSector))
|
||||||
{
|
{
|
||||||
|
@ -897,7 +897,7 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Unlike the above, this one *did* scale vect
|
// Unlike the above, this one *did* scale vect
|
||||||
vect2 = nAngle.ToVector() * pActor->fClipdist() * 0.25 + vect;
|
vect2 = nAngle.ToVector() * pActor->clipdist * 0.25 + vect;
|
||||||
movesprite(pActor, vect2, 0, 0, CLIPMASK0);
|
movesprite(pActor, vect2, 0, 0, CLIPMASK0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel)
|
||||||
if (pActor->spr.statnum >= 99 && nZVal == pActor->spr.pos.Z && !(pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
if (pActor->spr.statnum >= 99 && nZVal == pActor->spr.pos.Z && !(pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||||
{
|
{
|
||||||
pSectorB = pSector;
|
pSectorB = pSector;
|
||||||
clipmove(pActor->spr.pos, &pSectorB, vect, pActor->fClipdist(), 20, -20, CLIPMASK0, scratch);
|
clipmove(pActor->spr.pos, &pSectorB, vect, pActor->clipdist, 20, -20, CLIPMASK0, scratch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1044,7 +1044,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
||||||
|
|
||||||
auto pPlayerSect = pPlayerActor->sector();
|
auto pPlayerSect = pPlayerActor->sector();
|
||||||
|
|
||||||
pushmove(pPlayerActor->spr.pos, &pPlayerSect, pPlayerActor->fClipdist(), 20, -20, CLIPMASK0);
|
pushmove(pPlayerActor->spr.pos, &pPlayerSect, pPlayerActor->clipdist, 20, -20, CLIPMASK0);
|
||||||
if (pPlayerSect != pPlayerActor->sector()) {
|
if (pPlayerSect != pPlayerActor->sector()) {
|
||||||
ChangeActorSect(pPlayerActor, pPlayerSect);
|
ChangeActorSect(pPlayerActor, pPlayerSect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@ void AISet::Tick(RunListEvent* ev)
|
||||||
auto nMov = MoveCreature(pActor);
|
auto nMov = MoveCreature(pActor);
|
||||||
|
|
||||||
auto sect = pActor->sector();
|
auto sect = pActor->sector();
|
||||||
pushmove(pActor->spr.pos, §, pActor->fClipdist(), 20, -20, CLIPMASK0);
|
pushmove(pActor->spr.pos, §, pActor->clipdist, 20, -20, CLIPMASK0);
|
||||||
pActor->setsector(sect);
|
pActor->setsector(sect);
|
||||||
|
|
||||||
if (pActor->vel.Z > 4000/256.)
|
if (pActor->vel.Z > 4000/256.)
|
||||||
|
|
|
@ -355,7 +355,7 @@ void spawnactors(SpawnSpriteDef& sprites)
|
||||||
}
|
}
|
||||||
auto sprt = &sprites.sprites[i];
|
auto sprt = &sprites.sprites[i];
|
||||||
auto actor = insertActor(sprt->sectp, sprt->statnum);
|
auto actor = insertActor(sprt->sectp, sprt->statnum);
|
||||||
actor->spr = sprites.sprites[i];
|
actor->initFromSprite(&sprites.sprites[i]);
|
||||||
actor->time = i;
|
actor->time = i;
|
||||||
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
if (sprites.sprext.Size()) actor->sprext = sprites.sprext[i];
|
||||||
else actor->sprext = {};
|
else actor->sprext = {};
|
||||||
|
|
|
@ -1292,8 +1292,8 @@ int PlayerInitChemBomb(PLAYER* pp)
|
||||||
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||||
|
|
||||||
oclipdist = plActor->native_clipdist();
|
oclipdist = plActor->native_clipdist();
|
||||||
plActor->set_const_clipdist(0);
|
plActor->clipdist = 0;
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoChemBomb, 1000);
|
MissileSetPos(actorNew, DoChemBomb, 1000);
|
||||||
|
|
||||||
|
@ -1393,7 +1393,7 @@ int InitChemBomb(DSWActor* actor)
|
||||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||||
|
|
||||||
actorNew->vel.Z = RandomZVel();
|
actorNew->vel.Z = RandomZVel();
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
|
|
||||||
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121 || actor->user.ID == SUMO_RUN_R0) // 3121 == GRENADE_EXP
|
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121 || actor->user.ID == SUMO_RUN_R0) // 3121 == GRENADE_EXP
|
||||||
{
|
{
|
||||||
|
@ -1667,8 +1667,8 @@ int PlayerInitCaltrops(PLAYER* pp)
|
||||||
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||||
|
|
||||||
oclipdist = plActor->native_clipdist();
|
oclipdist = plActor->native_clipdist();
|
||||||
plActor->set_const_clipdist(0);
|
plActor->clipdist = 0;
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoCaltrops, 1000);
|
MissileSetPos(actorNew, DoCaltrops, 1000);
|
||||||
|
|
||||||
|
|
|
@ -1945,7 +1945,7 @@ void DoPlayerZrange(PLAYER* pp)
|
||||||
auto bakcstat = actor->spr.cstat;
|
auto bakcstat = actor->spr.cstat;
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
||||||
|
|
||||||
FAFgetzrange(pp->pos.plusZ(8), pp->cursector, &pp->hiz, &ceilhit, &pp->loz, &florhit, actor->fClipdist() - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
|
FAFgetzrange(pp->pos.plusZ(8), pp->cursector, &pp->hiz, &ceilhit, &pp->loz, &florhit, actor->clipdist - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
|
||||||
actor->spr.cstat = bakcstat;
|
actor->spr.cstat = bakcstat;
|
||||||
|
|
||||||
Collision ceilColl(ceilhit);
|
Collision ceilColl(ceilhit);
|
||||||
|
@ -2009,7 +2009,7 @@ void DoPlayerSlide(PLAYER* pp)
|
||||||
if (abs(pp->slide_vect.X) < 0.05 && abs(pp->slide_vect.Y) < 0.05)
|
if (abs(pp->slide_vect.X) < 0.05 && abs(pp->slide_vect.Y) < 0.05)
|
||||||
pp->slide_vect.Zero();
|
pp->slide_vect.Zero();
|
||||||
|
|
||||||
push_ret = pushmove(pp->pos, &pp->cursector, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->pos, &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -2023,10 +2023,10 @@ void DoPlayerSlide(PLAYER* pp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(pp->pos, &pp->cursector, pp->slide_vect, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->pos, &pp->cursector, pp->slide_vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
push_ret = pushmove(pp->pos, &pp->cursector, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->pos, &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -2172,7 +2172,7 @@ void DoPlayerMove(PLAYER* pp)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
push_ret = pushmove(pp->pos, &pp->cursector, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist - Z(16), CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->pos, &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||||
|
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -2195,12 +2195,12 @@ void DoPlayerMove(PLAYER* pp)
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
||||||
Collision coll;
|
Collision coll;
|
||||||
updatesector(pp->pos, &pp->cursector);
|
updatesector(pp->pos, &pp->cursector);
|
||||||
clipmove(pp->pos, &pp->cursector, pp->vect, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->pos, &pp->cursector, pp->vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
actor->spr.cstat = save_cstat;
|
actor->spr.cstat = save_cstat;
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
|
|
||||||
push_ret = pushmove(pp->pos, &pp->cursector, actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist - Z(16), CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->pos, &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -3559,7 +3559,7 @@ int DoPlayerWadeSuperJump(PLAYER* pp)
|
||||||
if (hit.hitSector != nullptr && abs(hit.hitSector->floorz - pp->pos.Z) < 50)
|
if (hit.hitSector != nullptr && abs(hit.hitSector->floorz - pp->pos.Z) < 50)
|
||||||
{
|
{
|
||||||
double dist = (pp->pos.XY() - hit.hitpos.XY()).Length();
|
double dist = (pp->pos.XY() - hit.hitpos.XY()).Length();
|
||||||
double comp = (pp->actor->fClipdist() + 16);
|
double comp = (pp->actor->clipdist + 16);
|
||||||
if (dist < comp)
|
if (dist < comp)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -4830,7 +4830,7 @@ void DoPlayerCurrent(PLAYER* pp)
|
||||||
|
|
||||||
auto vect = sectu->angle.ToVector() / 256. * sectu->speed * synctics; // 16384 >> 4 - Beware of clipmove's odd format for vect!
|
auto vect = sectu->angle.ToVector() / 256. * sectu->speed * synctics; // 16384 >> 4 - Beware of clipmove's odd format for vect!
|
||||||
|
|
||||||
push_ret = pushmove(pp->pos, &pp->cursector, pp->actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->pos, &pp->cursector, pp->actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -4846,10 +4846,10 @@ void DoPlayerCurrent(PLAYER* pp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(pp->pos, &pp->cursector, vect, pp->actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->pos, &pp->cursector, vect, pp->actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
pushmove(pp->pos, &pp->cursector, pp->actor->fClipdist(), pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
pushmove(pp->pos, &pp->cursector, pp->actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
|
|
@ -63,6 +63,7 @@ void CopyQuakeSpotToOn(DSWActor* actor)
|
||||||
auto actorNew = insertActor(actor->sector(), STAT_QUAKE_SPOT);
|
auto actorNew = insertActor(actor->sector(), STAT_QUAKE_SPOT);
|
||||||
|
|
||||||
actorNew->spr = actor->spr;
|
actorNew->spr = actor->spr;
|
||||||
|
actorNew->clipdist = actor->clipdist;
|
||||||
actorNew->spr.cstat = 0;
|
actorNew->spr.cstat = 0;
|
||||||
actorNew->spr.extra = 0;
|
actorNew->spr.extra = 0;
|
||||||
|
|
||||||
|
|
|
@ -847,7 +847,7 @@ int SetupRipper(DSWActor* actor)
|
||||||
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
|
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
|
||||||
actor->user.Health = HEALTH_MOMMA_RIPPER;
|
actor->user.Health = HEALTH_MOMMA_RIPPER;
|
||||||
|
|
||||||
actor->spr.clipdist += 128 >> 2;
|
actor->clipdist += 128;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -915,7 +915,7 @@ int SetupRipper2(DSWActor* actor)
|
||||||
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
|
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
|
||||||
actor->user.Health = HEALTH_MOMMA_RIPPER;
|
actor->user.Health = HEALTH_MOMMA_RIPPER;
|
||||||
|
|
||||||
actor->spr.clipdist += 128 >> 2;
|
actor->clipdist += 128;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1272,7 +1272,7 @@ void WeaponExplodeSectorInRange(DSWActor* wActor)
|
||||||
if (actor->native_clipdist() == 0)
|
if (actor->native_clipdist() == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
double radius = actor->fClipdist() * 8;
|
double radius = actor->clipdist * 8;
|
||||||
|
|
||||||
if (dist > (wActor->user.fRadius()/2) + radius)
|
if (dist > (wActor->user.fRadius()/2) + radius)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -983,6 +983,7 @@ bool ActorTestSpawn(DSWActor* actor)
|
||||||
{
|
{
|
||||||
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
||||||
actorNew->spr = actor->spr;
|
actorNew->spr = actor->spr;
|
||||||
|
actorNew->clipdist = actor->clipdist;
|
||||||
change_actor_stat(actorNew, STAT_SPAWN_TRIGGER);
|
change_actor_stat(actorNew, STAT_SPAWN_TRIGGER);
|
||||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
return false;
|
return false;
|
||||||
|
@ -4488,7 +4489,7 @@ void DoActorZrange(DSWActor* actor)
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
||||||
DVector3 pos = actor->spr.pos.plusZ(-ActorSizeZ(actor) * 0.5);
|
DVector3 pos = actor->spr.pos.plusZ(-ActorSizeZ(actor) * 0.5);
|
||||||
|
|
||||||
FAFgetzrange(pos, actor->sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, actor->fClipdist() - GETZRANGE_CLIP_ADJ, CLIPMASK_ACTOR);
|
FAFgetzrange(pos, actor->sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, actor->clipdist - GETZRANGE_CLIP_ADJ, CLIPMASK_ACTOR);
|
||||||
actor->spr.cstat |= save_cstat;
|
actor->spr.cstat |= save_cstat;
|
||||||
|
|
||||||
actor->user.lo_sectp = actor->user.hi_sectp = nullptr;
|
actor->user.lo_sectp = actor->user.hi_sectp = nullptr;
|
||||||
|
@ -6362,7 +6363,7 @@ Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
clipmove(clip_pos, &dasect, change * numtics * 0.125, actor->fClipdist(), ceildist, flordist, cliptype, retval, 1);
|
clipmove(clip_pos, &dasect, change * numtics * 0.125, actor->clipdist, ceildist, flordist, cliptype, retval, 1);
|
||||||
|
|
||||||
|
|
||||||
actor->spr.pos.XY() = clip_pos.XY();
|
actor->spr.pos.XY() = clip_pos.XY();
|
||||||
|
@ -6387,7 +6388,7 @@ Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist,
|
||||||
auto pos = actor->spr.pos.plusZ(-zH - maptoworld);
|
auto pos = actor->spr.pos.plusZ(-zH - maptoworld);
|
||||||
FAFgetzrange(pos, actor->sector(),
|
FAFgetzrange(pos, actor->sector(),
|
||||||
&globhiz, &globhihit, &globloz, &globlohit,
|
&globhiz, &globhihit, &globloz, &globlohit,
|
||||||
actor->fClipdist() - GETZRANGE_CLIP_ADJ, cliptype);
|
actor->clipdist - GETZRANGE_CLIP_ADJ, cliptype);
|
||||||
|
|
||||||
actor->spr.cstat = tempstat;
|
actor->spr.cstat = tempstat;
|
||||||
|
|
||||||
|
@ -6582,7 +6583,7 @@ Collision move_missile(DSWActor* actor, const DVector3& change, double ceil_dist
|
||||||
|
|
||||||
|
|
||||||
int xchange = change.X * worldtoint, ychange = change.Y * worldtoint;
|
int xchange = change.X * worldtoint, ychange = change.Y * worldtoint;
|
||||||
clipmove(clip_pos, &dasect, change * numtics * 0.125, actor->fClipdist(), ceil_dist, flor_dist, cliptype, retval, 1);
|
clipmove(clip_pos, &dasect, change * numtics * 0.125, actor->clipdist, ceil_dist, flor_dist, cliptype, retval, 1);
|
||||||
actor->spr.pos.XY() = clip_pos.XY();
|
actor->spr.pos.XY() = clip_pos.XY();
|
||||||
|
|
||||||
if (dasect == nullptr)
|
if (dasect == nullptr)
|
||||||
|
@ -6731,7 +6732,7 @@ Collision move_ground_missile(DSWActor* actor, const DVector2& change, double ce
|
||||||
lastsect = dasect;
|
lastsect = dasect;
|
||||||
opos = actor->spr.pos;
|
opos = actor->spr.pos;
|
||||||
opos.Z = daz;
|
opos.Z = daz;
|
||||||
clipmove(opos, &dasect, change * numtics * 0.125, actor->fClipdist(), ceildist, flordist, cliptype, retval, 1);
|
clipmove(opos, &dasect, change * numtics * 0.125, actor->clipdist, ceildist, flordist, cliptype, retval, 1);
|
||||||
actor->spr.pos.XY() = opos.XY();
|
actor->spr.pos.XY() = opos.XY();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ void SetupSectorObject(sectortype* sectp, short tag)
|
||||||
else
|
else
|
||||||
sop->max_damage = actorNew->user.MaxHealth;
|
sop->max_damage = actorNew->user.MaxHealth;
|
||||||
|
|
||||||
switch (actor->native_clipdist()) // notreallyclipdist
|
switch (actor->spr.clipdist) // notreallyclipdist
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -45,9 +45,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
#define RESTORE_CLIP actor->set_native_clipdist(oclipdist)
|
|
||||||
#define SAVE_CLIP auto oclipdist = actor->native_clipdist()
|
|
||||||
|
|
||||||
struct MISSILE_PLACEMENT
|
struct MISSILE_PLACEMENT
|
||||||
{
|
{
|
||||||
int dist_over, dist_out;
|
int dist_over, dist_out;
|
||||||
|
@ -11050,7 +11047,7 @@ int DoFindGround(DSWActor* actor)
|
||||||
|
|
||||||
auto save_cstat = actor->spr.cstat;
|
auto save_cstat = actor->spr.cstat;
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
FAFgetzrange(actor->spr.pos, actor->sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, actor->fClipdist() - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
|
FAFgetzrange(actor->spr.pos, actor->sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, actor->clipdist - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
|
||||||
actor->spr.cstat = save_cstat;
|
actor->spr.cstat = save_cstat;
|
||||||
|
|
||||||
switch (florhit.type)
|
switch (florhit.type)
|
||||||
|
@ -12062,7 +12059,7 @@ void InitSpellNapalm(PLAYER* pp)
|
||||||
actor->spr.shade = -40;
|
actor->spr.shade = -40;
|
||||||
actor->spr.xrepeat = 32;
|
actor->spr.xrepeat = 32;
|
||||||
actor->spr.yrepeat = 32;
|
actor->spr.yrepeat = 32;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
actor->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
actor->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||||
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
@ -12139,7 +12136,7 @@ int InitEnemyNapalm(DSWActor* actor)
|
||||||
actorNew->spr.shade = -40;
|
actorNew->spr.shade = -40;
|
||||||
actorNew->spr.xrepeat = 32;
|
actorNew->spr.xrepeat = 32;
|
||||||
actorNew->spr.yrepeat = 32;
|
actorNew->spr.yrepeat = 32;
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
||||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
|
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
|
||||||
|
@ -12148,7 +12145,7 @@ int InitEnemyNapalm(DSWActor* actor)
|
||||||
actorNew->user.ceiling_dist = (1);
|
actorNew->user.ceiling_dist = (1);
|
||||||
actorNew->user.Dist = 12.5;
|
actorNew->user.Dist = 12.5;
|
||||||
|
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(1);
|
actor->set_const_clipdist(1);
|
||||||
|
|
||||||
if (mp[i].dist_over != 0)
|
if (mp[i].dist_over != 0)
|
||||||
|
@ -12165,7 +12162,7 @@ int InitEnemyNapalm(DSWActor* actor)
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoNapalm, mp[i].dist_out);
|
MissileSetPos(actorNew, DoNapalm, mp[i].dist_out);
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actor->user.Counter = 0;
|
actor->user.Counter = 0;
|
||||||
|
|
||||||
|
@ -12205,7 +12202,7 @@ int InitSpellMirv(PLAYER* pp)
|
||||||
|
|
||||||
DSWActor* plActor = pp->actor;
|
DSWActor* plActor = pp->actor;
|
||||||
auto oclipdist = plActor->native_clipdist();
|
auto oclipdist = plActor->native_clipdist();
|
||||||
plActor->set_const_clipdist(0);
|
plActor->clipdist = 0;
|
||||||
|
|
||||||
UpdateChange(actorNew);
|
UpdateChange(actorNew);
|
||||||
|
|
||||||
|
@ -12653,7 +12650,7 @@ int InitSumoNapalm(DSWActor* actor)
|
||||||
actorNew->spr.shade = -40;
|
actorNew->spr.shade = -40;
|
||||||
actorNew->spr.xrepeat = 32;
|
actorNew->spr.xrepeat = 32;
|
||||||
actorNew->spr.yrepeat = 32;
|
actorNew->spr.yrepeat = 32;
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
||||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
|
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
|
||||||
|
@ -12662,7 +12659,7 @@ int InitSumoNapalm(DSWActor* actor)
|
||||||
actorNew->user.ceiling_dist = (1);
|
actorNew->user.ceiling_dist = (1);
|
||||||
actorNew->user.Dist = 12.5;
|
actorNew->user.Dist = 12.5;
|
||||||
|
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(1);
|
actor->set_const_clipdist(1);
|
||||||
|
|
||||||
if (mp[i].dist_over != 0)
|
if (mp[i].dist_over != 0)
|
||||||
|
@ -12677,7 +12674,7 @@ int InitSumoNapalm(DSWActor* actor)
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoNapalm, mp[i].dist_out);
|
MissileSetPos(actorNew, DoNapalm, mp[i].dist_out);
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actor->user.Counter = 0;
|
actor->user.Counter = 0;
|
||||||
|
|
||||||
|
@ -13169,7 +13166,7 @@ void InitHeartAttack(PLAYER* pp)
|
||||||
actorNew->spr.shade = -10;
|
actorNew->spr.shade = -10;
|
||||||
actorNew->spr.xrepeat = 52;
|
actorNew->spr.xrepeat = 52;
|
||||||
actorNew->spr.yrepeat = 52;
|
actorNew->spr.yrepeat = 52;
|
||||||
actorNew->set_const_clipdist(0);
|
actorNew->clipdist = 0;
|
||||||
actorNew->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
actorNew->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
|
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
|
||||||
|
@ -13488,8 +13485,8 @@ int InitLaser(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 900);
|
HelpMissileLateral(actorNew, 900);
|
||||||
|
@ -13502,30 +13499,30 @@ int InitLaser(PLAYER* pp)
|
||||||
// move it 1200 dist in increments - works better
|
// move it 1200 dist in increments - works better
|
||||||
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
if (MissileSetPos(actorNew, DoLaserStart, 300))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
{
|
{
|
||||||
|
@ -13587,8 +13584,8 @@ int InitRail(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning
|
// initial positioning
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
actorNew->set_const_clipdist(32 >> 2);
|
actorNew->set_const_clipdist(32 >> 2);
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
|
@ -13600,12 +13597,12 @@ int InitRail(PLAYER* pp)
|
||||||
|
|
||||||
if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel))
|
if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = zvel * 0.5;
|
actorNew->vel.Z = zvel * 0.5;
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -13661,8 +13658,8 @@ int InitZillaRail(DSWActor* actor)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning
|
// initial positioning
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
actorNew->set_const_clipdist(32 >> 2);
|
actorNew->set_const_clipdist(32 >> 2);
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
|
@ -13674,12 +13671,12 @@ int InitZillaRail(DSWActor* actor)
|
||||||
|
|
||||||
if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel))
|
if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = zvel * 0.5;
|
actorNew->vel.Z = zvel * 0.5;
|
||||||
if (WeaponAutoAim(actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -13769,8 +13766,8 @@ int InitRocket(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 900);
|
HelpMissileLateral(actorNew, 900);
|
||||||
|
@ -13783,14 +13780,14 @@ int InitRocket(PLAYER* pp)
|
||||||
actorNew->user.Counter = 1;
|
actorNew->user.Counter = 1;
|
||||||
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// inable smoke trail
|
// inable smoke trail
|
||||||
actorNew->user.Counter = 0;
|
actorNew->user.Counter = 0;
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = zvel * 0.5;
|
actorNew->vel.Z = zvel * 0.5;
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -13874,8 +13871,8 @@ int InitBunnyRocket(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 900);
|
HelpMissileLateral(actorNew, 900);
|
||||||
|
@ -13888,14 +13885,14 @@ int InitBunnyRocket(PLAYER* pp)
|
||||||
actorNew->user.Counter = 1;
|
actorNew->user.Counter = 1;
|
||||||
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// inable smoke trail
|
// inable smoke trail
|
||||||
actorNew->user.Counter = 0;
|
actorNew->user.Counter = 0;
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = zvel * 0.5;
|
actorNew->vel.Z = zvel * 0.5;
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -13968,8 +13965,8 @@ int InitNuke(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 900);
|
HelpMissileLateral(actorNew, 900);
|
||||||
|
@ -13982,14 +13979,14 @@ int InitNuke(PLAYER* pp)
|
||||||
actorNew->user.Counter = 1;
|
actorNew->user.Counter = 1;
|
||||||
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
if (TestMissileSetPos(actorNew, DoRocket, 1200, zvel))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// inable smoke trail
|
// inable smoke trail
|
||||||
actorNew->user.Counter = 0;
|
actorNew->user.Counter = 0;
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = zvel * 0.5;
|
actorNew->vel.Z = zvel * 0.5;
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -14154,8 +14151,8 @@ int InitMicro(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
const int MICRO_LATERAL = 5000;
|
const int MICRO_LATERAL = 5000;
|
||||||
|
@ -14169,14 +14166,14 @@ int InitMicro(PLAYER* pp)
|
||||||
actorNew->user.Counter = 1;
|
actorNew->user.Counter = 1;
|
||||||
if (MissileSetPos(actorNew, DoMicro, 700))
|
if (MissileSetPos(actorNew, DoMicro, 700))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// inable smoke trail
|
// inable smoke trail
|
||||||
actorNew->user.Counter = 0;
|
actorNew->user.Counter = 0;
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
const int MICRO_ANG = 400;
|
const int MICRO_ANG = 400;
|
||||||
|
|
||||||
|
@ -14318,7 +14315,7 @@ bool WallSpriteInsideSprite(DSWActor* wactor, DSWActor* actor)
|
||||||
{
|
{
|
||||||
DVector2 out[2];
|
DVector2 out[2];
|
||||||
GetWallSpritePosition(&wactor->spr, wactor->spr.pos, out);
|
GetWallSpritePosition(&wactor->spr, wactor->spr.pos, out);
|
||||||
return IsCloseToLine(actor->spr.pos.XY(), out[0], out[1], actor->fClipdist()) != EClose::Outside;
|
return IsCloseToLine(actor->spr.pos.XY(), out[0], out[1], actor->clipdist) != EClose::Outside;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14563,7 +14560,7 @@ int InitSerpSpell(DSWActor* actor)
|
||||||
actorNew->user.floor_dist = (16);
|
actorNew->user.floor_dist = (16);
|
||||||
actorNew->user.Dist = 12.5;
|
actorNew->user.Dist = 12.5;
|
||||||
|
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(1);
|
actor->set_const_clipdist(1);
|
||||||
|
|
||||||
actorNew->spr.angle += lat_ang[i];
|
actorNew->spr.angle += lat_ang[i];
|
||||||
|
@ -14578,7 +14575,7 @@ int InitSerpSpell(DSWActor* actor)
|
||||||
UpdateChange(actorNew);
|
UpdateChange(actorNew);
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoMirvMissile, 400);
|
MissileSetPos(actorNew, DoMirvMissile, 400);
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
if (actor->user.Flags & (SPR_UNDERWATER))
|
if (actor->user.Flags & (SPR_UNDERWATER))
|
||||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||||
|
@ -14667,7 +14664,7 @@ int InitSerpMonstSpell(DSWActor* actor)
|
||||||
|
|
||||||
actorNew->user.Dist = 12.5;
|
actorNew->user.Dist = 12.5;
|
||||||
|
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(1);
|
actor->set_const_clipdist(1);
|
||||||
|
|
||||||
actorNew->spr.angle += lat_ang[i];
|
actorNew->spr.angle += lat_ang[i];
|
||||||
|
@ -14682,7 +14679,7 @@ int InitSerpMonstSpell(DSWActor* actor)
|
||||||
UpdateChange(actorNew);
|
UpdateChange(actorNew);
|
||||||
|
|
||||||
MissileSetPos(actorNew, DoMirvMissile, 400);
|
MissileSetPos(actorNew, DoMirvMissile, 400);
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
if (actor->user.Flags & (SPR_UNDERWATER))
|
if (actor->user.Flags & (SPR_UNDERWATER))
|
||||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||||
|
@ -15345,7 +15342,7 @@ int InitTracerUzi(PLAYER* pp)
|
||||||
|
|
||||||
DSWActor* plActor = pp->actor;
|
DSWActor* plActor = pp->actor;
|
||||||
auto oclipdist = plActor->native_clipdist();
|
auto oclipdist = plActor->native_clipdist();
|
||||||
plActor->set_const_clipdist(0);
|
plActor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
if (pp->Flags & (PF_TWO_UZI) && pp->WpnUziType == 0)
|
if (pp->Flags & (PF_TWO_UZI) && pp->WpnUziType == 0)
|
||||||
|
@ -16816,8 +16813,8 @@ int InitGrenade(PLAYER* pp)
|
||||||
|
|
||||||
actorNew->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
actorNew->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||||
|
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 800);
|
HelpMissileLateral(actorNew, 800);
|
||||||
|
@ -16828,7 +16825,7 @@ int InitGrenade(PLAYER* pp)
|
||||||
MissileSetPos(actorNew, DoGrenade, 1000);
|
MissileSetPos(actorNew, DoGrenade, 1000);
|
||||||
actorNew->user.Flags &= ~(SPR_BOUNCE);
|
actorNew->user.Flags &= ~(SPR_BOUNCE);
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
zvel = actorNew->vel.Z;
|
zvel = actorNew->vel.Z;
|
||||||
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) >= 0)
|
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) >= 0)
|
||||||
|
@ -17014,7 +17011,7 @@ int InitEnemyMine(DSWActor* actor)
|
||||||
int HelpMissileLateral(DSWActor* actor, int dist)
|
int HelpMissileLateral(DSWActor* actor, int dist)
|
||||||
{
|
{
|
||||||
auto old_xvel = actor->vel.X;
|
auto old_xvel = actor->vel.X;
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
|
|
||||||
actor->vel.X = dist * maptoworld; // not worth changing 28 call locations...
|
actor->vel.X = dist * maptoworld; // not worth changing 28 call locations...
|
||||||
|
|
||||||
|
@ -17025,7 +17022,7 @@ int HelpMissileLateral(DSWActor* actor, int dist)
|
||||||
actor->user.coll = move_missile(actor, DVector3(vec, 0), 16, 16, 0, 1);
|
actor->user.coll = move_missile(actor, DVector3(vec, 0), 16, 16, 0, 1);
|
||||||
|
|
||||||
actor->vel.X = old_xvel;
|
actor->vel.X = old_xvel;
|
||||||
RESTORE_CLIP;
|
actor->clipdist = oclipdist;
|
||||||
|
|
||||||
actor->backuppos();
|
actor->backuppos();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -17071,8 +17068,8 @@ int InitFireball(PLAYER* pp)
|
||||||
|
|
||||||
// at certain angles the clipping box was big enough to block the
|
// at certain angles the clipping box was big enough to block the
|
||||||
// initial positioning of the fireball.
|
// initial positioning of the fireball.
|
||||||
SAVE_CLIP;
|
auto oclipdist = actor->clipdist;
|
||||||
actor->set_const_clipdist(0);
|
actor->clipdist = 0;
|
||||||
|
|
||||||
actorNew->spr.angle += DAngle90;
|
actorNew->spr.angle += DAngle90;
|
||||||
HelpMissileLateral(actorNew, 2100);
|
HelpMissileLateral(actorNew, 2100);
|
||||||
|
@ -17083,12 +17080,12 @@ int InitFireball(PLAYER* pp)
|
||||||
|
|
||||||
if (TestMissileSetPos(actorNew, DoFireball, 1200, zvel * (1375. / 2048.)))
|
if (TestMissileSetPos(actorNew, DoFireball, 1200, zvel * (1375. / 2048.)))
|
||||||
{
|
{
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
KillActor(actorNew);
|
KillActor(actorNew);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RESTORE_CLIP;;
|
actor->clipdist = oclipdist;;
|
||||||
|
|
||||||
actorNew->vel.Z = 0.5;
|
actorNew->vel.Z = 0.5;
|
||||||
if (WeaponAutoAimZvel(pp->actor, actorNew, &zvel, DAngle22_5 / 4, false) == -1)
|
if (WeaponAutoAimZvel(pp->actor, actorNew, &zvel, DAngle22_5 / 4, false) == -1)
|
||||||
|
@ -17954,7 +17951,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos)
|
||||||
spawnedActor->spr.pal = 0;
|
spawnedActor->spr.pal = 0;
|
||||||
spawnedActor->spr.shade = 0;
|
spawnedActor->spr.shade = 0;
|
||||||
spawnedActor->spr.extra = 0;
|
spawnedActor->spr.extra = 0;
|
||||||
spawnedActor->set_const_clipdist(0);
|
spawnedActor->clipdist = 0;
|
||||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||||
spawnedActor->spr.pos = pos;
|
spawnedActor->spr.pos = pos;
|
||||||
spawnedActor->spr.picnum = 2151;
|
spawnedActor->spr.picnum = 2151;
|
||||||
|
@ -18041,7 +18038,7 @@ int QueueFloorBlood(DSWActor* actor)
|
||||||
spawnedActor->spr.pal = 0;
|
spawnedActor->spr.pal = 0;
|
||||||
spawnedActor->spr.shade = 0;
|
spawnedActor->spr.shade = 0;
|
||||||
spawnedActor->spr.extra = 0;
|
spawnedActor->spr.extra = 0;
|
||||||
spawnedActor->set_const_clipdist(0);
|
spawnedActor->clipdist = 0;
|
||||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||||
spawnedActor->spr.pos = actor->spr.pos.plusZ(1);
|
spawnedActor->spr.pos = actor->spr.pos.plusZ(1);
|
||||||
spawnedActor->spr.angle = RandomAngle(); // Just make it any old angle
|
spawnedActor->spr.angle = RandomAngle(); // Just make it any old angle
|
||||||
|
@ -18156,7 +18153,7 @@ int QueueFootPrint(DSWActor* actor)
|
||||||
spawnedActor->spr.pal = 0;
|
spawnedActor->spr.pal = 0;
|
||||||
spawnedActor->spr.shade = 0;
|
spawnedActor->spr.shade = 0;
|
||||||
spawnedActor->spr.extra = 0;
|
spawnedActor->spr.extra = 0;
|
||||||
spawnedActor->set_const_clipdist(0);
|
spawnedActor->clipdist = 0;
|
||||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||||
spawnedActor->spr.pos = actor->spr.pos;
|
spawnedActor->spr.pos = actor->spr.pos;
|
||||||
spawnedActor->spr.angle = actor->spr.angle;
|
spawnedActor->spr.angle = actor->spr.angle;
|
||||||
|
@ -18297,7 +18294,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, DAngle bang)
|
||||||
spawnedActor->spr.pal = 0;
|
spawnedActor->spr.pal = 0;
|
||||||
spawnedActor->spr.shade = 0;
|
spawnedActor->spr.shade = 0;
|
||||||
spawnedActor->spr.extra = 0;
|
spawnedActor->spr.extra = 0;
|
||||||
spawnedActor->set_const_clipdist(0);
|
spawnedActor->clipdist = 0;
|
||||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||||
spawnedActor->spr.pos = hit.hitpos;
|
spawnedActor->spr.pos = hit.hitpos;
|
||||||
spawnedActor->spr.shade -= 5; // Brighten it up just a bit
|
spawnedActor->spr.shade -= 5; // Brighten it up just a bit
|
||||||
|
|
|
@ -158,7 +158,7 @@ extern int WeaponIsAmmo;
|
||||||
|
|
||||||
inline double CloseRangeDist(DSWActor* a1, DSWActor* a2, double fudge = 25)
|
inline double CloseRangeDist(DSWActor* a1, DSWActor* a2, double fudge = 25)
|
||||||
{
|
{
|
||||||
return a1->fClipdist() + a2->fClipdist() + fudge;
|
return a1->clipdist + a2->clipdist + fudge;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern short target_ang;
|
extern short target_ang;
|
||||||
|
|
|
@ -18,7 +18,7 @@ class CoreActor native
|
||||||
|
|
||||||
native int8 shade;
|
native int8 shade;
|
||||||
native uint8 pal;
|
native uint8 pal;
|
||||||
native uint8 clipdist;
|
native uint8 intclipdist;
|
||||||
native uint8 blend;
|
native uint8 blend;
|
||||||
native uint8 xrepeat;
|
native uint8 xrepeat;
|
||||||
native uint8 yrepeat;
|
native uint8 yrepeat;
|
||||||
|
@ -31,6 +31,7 @@ class CoreActor native
|
||||||
native int16 mdanimcur;
|
native int16 mdanimcur;
|
||||||
native uint8 renderflags;
|
native uint8 renderflags;
|
||||||
native float alpha;
|
native float alpha;
|
||||||
|
native double clipdist;
|
||||||
|
|
||||||
native readonly sectortype sector;
|
native readonly sectortype sector;
|
||||||
native readonly int16 spritesetpic;
|
native readonly int16 spritesetpic;
|
||||||
|
|
Loading…
Reference in a new issue