mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-05 07:21:26 +00:00
- renamed slope functions so that the int versions get a special name.
This commit is contained in:
parent
9172ab27ca
commit
95cd74bdc0
27 changed files with 100 additions and 100 deletions
|
@ -135,13 +135,13 @@ static int cliptestsector(int const dasect, int const nextsect, int32_t const fl
|
|||
break;
|
||||
default:
|
||||
{
|
||||
int32_t daz = getflorzofslopeptr(§or[dasect], pos.X, pos.Y);
|
||||
int32_t daz2 = getflorzofslopeptr(sec2, pos.X, pos.Y);
|
||||
int32_t daz = int_getflorzofslopeptr(§or[dasect], pos.X, pos.Y);
|
||||
int32_t daz2 = int_getflorzofslopeptr(sec2, pos.X, pos.Y);
|
||||
|
||||
if (daz2 < daz-(1<<8) && (sec2->floorstat & CSTAT_SECTOR_SKY) == 0)
|
||||
if (posz >= daz2-(flordist-1)) return 1;
|
||||
daz = getceilzofslopeptr(§or[dasect], pos.X, pos.Y);
|
||||
daz2 = getceilzofslopeptr(sec2, pos.X, pos.Y);
|
||||
daz = int_getceilzofslopeptr(§or[dasect], pos.X, pos.Y);
|
||||
daz2 = int_getceilzofslopeptr(sec2, pos.X, pos.Y);
|
||||
if (daz2 > daz+(1<<8) && (sec2->ceilingstat & CSTAT_SECTOR_SKY) == 0)
|
||||
if (posz <= daz2+(ceildist-1)) return 1;
|
||||
|
||||
|
@ -759,7 +759,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
if (inside(pos->X, pos->Y, sect) == 1)
|
||||
{
|
||||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
|
||||
tempint2 = getceilzofslopeptr(sect, pos->X, pos->Y) - pos->Z;
|
||||
tempint2 = int_getceilzofslopeptr(sect, pos->X, pos->Y) - pos->Z;
|
||||
else
|
||||
tempint2 = sect->int_ceilingz() - pos->Z;
|
||||
|
||||
|
@ -774,7 +774,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
else
|
||||
{
|
||||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
|
||||
tempint2 = pos->Z - getflorzofslopeptr(sect, pos->X, pos->Y);
|
||||
tempint2 = pos->Z - int_getflorzofslopeptr(sect, pos->X, pos->Y);
|
||||
else
|
||||
tempint2 = pos->Z - sect->int_floorz();
|
||||
|
||||
|
@ -919,7 +919,7 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
closest = { int(v.X * worldtoint), int(v.Y * worldtoint) };
|
||||
}
|
||||
|
||||
getzsofslopeptr(sect,closest.X,closest.Y,ceilz,florz);
|
||||
int_getzsofslopeptr(sect,closest.X,closest.Y,ceilz,florz);
|
||||
ceilhit.setSector(sect);
|
||||
florhit.setSector(sect);
|
||||
|
||||
|
@ -985,7 +985,7 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
closest = { int(v.X * worldtoint), int(v.Y * worldtoint) };
|
||||
}
|
||||
|
||||
getzsofslopeptr(nextsect, closest.X,closest.Y, &daz,&daz2);
|
||||
int_getzsofslopeptr(nextsect, closest.X,closest.Y, &daz,&daz2);
|
||||
|
||||
{
|
||||
if (daz > *ceilz)
|
||||
|
@ -1256,7 +1256,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
}
|
||||
|
||||
int32_t daz2;
|
||||
getzsofslopeptr(nextsect,intx,inty,&daz,&daz2);
|
||||
int_getzsofslopeptr(nextsect,intx,inty,&daz,&daz2);
|
||||
if (intz <= daz || intz >= daz2)
|
||||
{
|
||||
hit_set(&hitinfo, sec, wal, nullptr, intx, inty, intz);
|
||||
|
|
|
@ -188,7 +188,7 @@ int cansee(int x1, int y1, int z1, sectortype* sect1, int x2, int y2, int z2, se
|
|||
y = y1 + MulScale(y21,t, 24);
|
||||
z = z1 + MulScale(z21,t, 24);
|
||||
|
||||
getzsofslopeptr(sec, x,y, &cfz[0],&cfz[1]);
|
||||
int_getzsofslopeptr(sec, x,y, &cfz[0],&cfz[1]);
|
||||
|
||||
if (z <= cfz[0] || z >= cfz[1])
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ int cansee(int x1, int y1, int z1, sectortype* sect1, int x2, int y2, int z2, se
|
|||
}
|
||||
|
||||
auto nexts = wal->nextSector();
|
||||
getzsofslopeptr(nexts, x,y, &cfz[0],&cfz[1]);
|
||||
int_getzsofslopeptr(nexts, x,y, &cfz[0],&cfz[1]);
|
||||
if (z <= cfz[0] || z >= cfz[1])
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -328,27 +328,27 @@ inline void getzsofslopeptr(const sectortype* sec, const Vector& pos, double* ce
|
|||
calcSlope(sec, pos.X, pos.Y, ceilz, florz);
|
||||
}
|
||||
|
||||
inline double getceilzofslopeptrf(const sectortype* sec, double dax, double day)
|
||||
inline double getceilzofslopeptr(const sectortype* sec, double dax, double day)
|
||||
{
|
||||
double c;
|
||||
calcSlope(sec, dax, day, &c, nullptr);
|
||||
return c;
|
||||
}
|
||||
inline double getflorzofslopeptrf(const sectortype* sec, double dax, double day)
|
||||
inline double getflorzofslopeptr(const sectortype* sec, double dax, double day)
|
||||
{
|
||||
double f;
|
||||
calcSlope(sec, dax, day, nullptr, &f);
|
||||
return f;
|
||||
}
|
||||
template<class Vector>
|
||||
inline double getceilzofslopeptrf(const sectortype* sec, const Vector& pos)
|
||||
inline double getceilzofslopeptr(const sectortype* sec, const Vector& pos)
|
||||
{
|
||||
return getceilzofslopeptrf(sec, pos.X, pos.Y);
|
||||
return getceilzofslopeptr(sec, pos.X, pos.Y);
|
||||
}
|
||||
template<class Vector>
|
||||
inline double getflorzofslopeptrf(const sectortype* sec, const Vector& pos)
|
||||
inline double getflorzofslopeptr(const sectortype* sec, const Vector& pos)
|
||||
{
|
||||
return getflorzofslopeptrf(sec, pos.X, pos.Y);
|
||||
return getflorzofslopeptr(sec, pos.X, pos.Y);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -602,7 +602,7 @@ inline double BobVal(double val)
|
|||
//==========================================================================
|
||||
|
||||
[[deprecated]]
|
||||
inline int getceilzofslopeptr(const sectortype* sec, int dax, int day)
|
||||
inline int int_getceilzofslopeptr(const sectortype* sec, int dax, int day)
|
||||
{
|
||||
double z;
|
||||
calcSlope(sec, dax * inttoworld, day * inttoworld, &z, nullptr);
|
||||
|
@ -610,7 +610,7 @@ inline int getceilzofslopeptr(const sectortype* sec, int dax, int day)
|
|||
}
|
||||
|
||||
[[deprecated]]
|
||||
inline int getflorzofslopeptr(const sectortype* sec, int dax, int day)
|
||||
inline int int_getflorzofslopeptr(const sectortype* sec, int dax, int day)
|
||||
{
|
||||
double z;
|
||||
calcSlope(sec, dax * inttoworld, day * inttoworld, nullptr, &z);
|
||||
|
@ -618,7 +618,7 @@ inline int getflorzofslopeptr(const sectortype* sec, int dax, int day)
|
|||
}
|
||||
|
||||
[[deprecated]]
|
||||
inline void getzsofslopeptr(const sectortype* sec, int dax, int day, int* ceilz, int* florz)
|
||||
inline void int_getzsofslopeptr(const sectortype* sec, int dax, int day, int* ceilz, int* florz)
|
||||
{
|
||||
double c, f;
|
||||
calcSlope(sec, dax * inttoworld, day * inttoworld, &c, &f);
|
||||
|
|
|
@ -410,15 +410,15 @@ void PlayerHorizon::calcviewpitch(const DVector2& pos, DAngle const ang, bool co
|
|||
{
|
||||
// Get the floorz as if the new (x,y) point was still in
|
||||
// your sector
|
||||
double const j = getflorzofslopeptrf(cursectnum, pos);
|
||||
double const k = getflorzofslopeptrf(tempsect, rotpt);
|
||||
double const j = getflorzofslopeptr(cursectnum, pos);
|
||||
double const k = getflorzofslopeptr(tempsect, rotpt);
|
||||
|
||||
// If extended point is in same sector as you or the slopes
|
||||
// of the sector of the extended point and your sector match
|
||||
// closely (to avoid accidently looking straight out when
|
||||
// you're at the edge of a sector line) then adjust horizon
|
||||
// accordingly
|
||||
if (cursectnum == tempsect || (!isBlood() && abs(getflorzofslopeptrf(tempsect, rotpt) - k) <= 4))
|
||||
if (cursectnum == tempsect || (!isBlood() && abs(getflorzofslopeptr(tempsect, rotpt) - k) <= 4))
|
||||
{
|
||||
horizoff += q16horiz(fixed_t(scaleAdjust * ((j - k) * 256 * (!isBlood() ? DEFVIEWPITCH : BLOODVIEWPITCH))));
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
|
|||
float maxofs = -FLT_MAX, minofs = FLT_MAX;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float vz = -getceilzofslopeptrf(Sprite->sectp, posi);
|
||||
float vz = -getceilzofslopeptr(Sprite->sectp, posi);
|
||||
float sz = z - ofsz[i];
|
||||
int diff = vz - sz;
|
||||
if (diff > maxofs) maxofs = diff;
|
||||
|
@ -155,7 +155,7 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
|
|||
float maxofs = -FLT_MAX, minofs = FLT_MAX;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float vz = -getflorzofslopeptrf(Sprite->sectp, posi);
|
||||
float vz = -getflorzofslopeptr(Sprite->sectp, posi);
|
||||
float sz = z - ofsz[i];
|
||||
int diff = vz - sz;
|
||||
if (diff > maxofs) maxofs = diff;
|
||||
|
|
|
@ -2731,7 +2731,7 @@ static DBloodActor* actSpawnFloor(DBloodActor* actor)
|
|||
auto pSector = actor->sector();
|
||||
auto pos = actor->spr.pos;
|
||||
updatesector(pos, &pSector);
|
||||
double zFloor = getflorzofslopeptrf(pSector, pos.X, pos.Y);
|
||||
double zFloor = getflorzofslopeptr(pSector, pos.X, pos.Y);
|
||||
auto spawned = actSpawnSprite(pSector, DVector3(pos.XY(), zFloor), 3, 0);
|
||||
if (spawned) spawned->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
return spawned;
|
||||
|
@ -4850,7 +4850,7 @@ void MoveDude(DBloodActor* actor)
|
|||
{
|
||||
if (bUnderwater)
|
||||
{
|
||||
double cz = getceilzofslopeptrf(pSector, actor->spr.pos);
|
||||
double cz = getceilzofslopeptr(pSector, actor->spr.pos);
|
||||
if (cz > top)
|
||||
vc += ((bottom - cz) * -FixedToFloat(80099)) / (bottom - top);
|
||||
else
|
||||
|
@ -4858,7 +4858,7 @@ void MoveDude(DBloodActor* actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
double fz = getflorzofslopeptrf(pSector, actor->spr.pos);
|
||||
double fz = getflorzofslopeptr(pSector, actor->spr.pos);
|
||||
if (fz < bottom)
|
||||
vc += ((bottom - fz) * -FixedToFloat(80099)) / (bottom - top);
|
||||
}
|
||||
|
@ -5629,7 +5629,7 @@ static void actCheckThings()
|
|||
{
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (getflorzofslopeptrf(pSector, actor->spr.pos) <= bottom)
|
||||
if (getflorzofslopeptr(pSector, actor->spr.pos) <= bottom)
|
||||
{
|
||||
int angle = pXSector->panAngle.Buildang();
|
||||
int speed = 0;
|
||||
|
@ -6054,7 +6054,7 @@ static void actCheckDudes()
|
|||
{
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (getflorzofslopeptrf(pSector, actor->spr.pos) <= bottom)
|
||||
if (getflorzofslopeptr(pSector, actor->spr.pos) <= bottom)
|
||||
{
|
||||
int angle = pXSector->panAngle.Buildang();
|
||||
int speed = 0;
|
||||
|
|
|
@ -148,7 +148,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRange)
|
|||
assert(pSector);
|
||||
updatesectorz(x, y, z, &pSector);
|
||||
if (!pSector) return false;
|
||||
int floorZ = getflorzofslopeptr(pSector, x, y);
|
||||
int floorZ = int_getflorzofslopeptr(pSector, x, y);
|
||||
auto pXSector = pSector->hasX()? &pSector->xs() : nullptr;
|
||||
bool Underwater = 0;
|
||||
bool Water = 0;
|
||||
|
|
|
@ -270,7 +270,7 @@ static void batThinkChase(DBloodActor* actor)
|
|||
if (nDist < (pDudeInfo->seeDist * inttoworld) && abs(nDeltaAngle).Buildang() <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, actor->GetTarget());
|
||||
double floorZ = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorZ = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
double floorDelta = floorZ - bottom;
|
||||
double heightDelta = height2 - height;
|
||||
bool angWithinRange = abs(nDeltaAngle) < mapangle(85);
|
||||
|
|
|
@ -353,7 +353,7 @@ static void gargThinkChase(DBloodActor* actor)
|
|||
if (nDist < (pDudeInfo->seeDist * inttoworld) && abs(nDeltaAngle).Buildang() <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, actor->GetTarget());
|
||||
double floorZ = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorZ = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
double floorDelta = floorZ - bottom;
|
||||
double heightDelta = height2 - height;
|
||||
bool angWithinRange = abs(nDeltaAngle) < mapangle(85);
|
||||
|
|
|
@ -331,7 +331,7 @@ static void ghostThinkChase(DBloodActor* actor)
|
|||
if (nDist < (pDudeInfo->seeDist * inttoworld) && abs(nDeltaAngle).Buildang() <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, actor->GetTarget());
|
||||
double floorZ = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorZ = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
double floorDelta = floorZ - bottom;
|
||||
double heightDelta = height2 - height;
|
||||
bool angWithinRange = abs(nDeltaAngle) < mapangle(85);
|
||||
|
|
|
@ -361,7 +361,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
auto pNSprite = viewInsertTSprite(tsprites, pTSprite->sectp, 32767, pTSprite);
|
||||
if (!pNSprite)
|
||||
break;
|
||||
pNSprite->pos.Z = getflorzofslopeptrf(pTSprite->sectp, pNSprite->pos);
|
||||
pNSprite->pos.Z = getflorzofslopeptr(pTSprite->sectp, pNSprite->pos);
|
||||
if ((pNSprite->sectp->floorpicnum >= 4080) && (pNSprite->sectp->floorpicnum <= 4095) && !VanillaMode()) // if floor has ror, find actual floor
|
||||
{
|
||||
DVector3 cPos = pNSprite->pos;
|
||||
|
@ -371,7 +371,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
{
|
||||
if (!CheckLink(cPos, &cSect)) // if no more floors underneath, abort
|
||||
break;
|
||||
const double newFloorZ = getflorzofslopeptrf(cSect, cPos.X, cPos.Z);
|
||||
const double newFloorZ = getflorzofslopeptr(cSect, cPos.X, cPos.Z);
|
||||
cZrel += newFloorZ - cPos.Z; // get height difference for next sector's ceiling/floor, and add to relative height for shadow
|
||||
if ((cSect->floorpicnum < 4080) || (cSect->floorpicnum > 4095)) // if current sector is not open air, use as floor for shadow casting, otherwise continue to next sector
|
||||
break;
|
||||
|
@ -620,7 +620,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
|
|||
{
|
||||
double top, bottom;
|
||||
GetSpriteExtents(pTSprite, &top, &bottom);
|
||||
if (getflorzofslopeptrf(pTSprite->sectp, pTSprite->pos) > bottom)
|
||||
if (getflorzofslopeptr(pTSprite->sectp, pTSprite->pos) > bottom)
|
||||
nAnim = 1;
|
||||
}
|
||||
break;
|
||||
|
@ -903,7 +903,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
|
|||
}
|
||||
|
||||
if (pTSprite->ownerActor != pPlayer->actor || gViewPos != VIEWPOS_0) {
|
||||
if (getflorzofslopeptrf(pTSprite->sectp, pTSprite->pos) >= cPos.Z)
|
||||
if (getflorzofslopeptr(pTSprite->sectp, pTSprite->pos) >= cPos.Z)
|
||||
{
|
||||
viewAddEffect(tsprites, nTSprite, kViewEffectShadow);
|
||||
}
|
||||
|
@ -935,7 +935,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
|
|||
|
||||
if (pTSprite->type < kThingBase || pTSprite->type >= kThingMax || owneractor->hit.florhit.type == kHitNone)
|
||||
{
|
||||
if ((pTSprite->flags & kPhysMove) && getflorzofslopeptrf(pTSprite->sectp, pTSprite->pos) >= cPos.Z)
|
||||
if ((pTSprite->flags & kPhysMove) && getflorzofslopeptr(pTSprite->sectp, pTSprite->pos) >= cPos.Z)
|
||||
viewAddEffect(tsprites, nTSprite, kViewEffectShadow);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ void StartLevel(MapRecord* level, bool newgame)
|
|||
Printf(PRINT_NONOTIFY, "> Modern types erased: %d.\n", modernTypesErased);
|
||||
#endif
|
||||
|
||||
startpos.Z = getflorzofslopeptrf(startsector, startpos.X, startpos.Y);
|
||||
startpos.Z = getflorzofslopeptr(startsector, startpos.X, startpos.Y);
|
||||
for (int i = 0; i < kMaxPlayers; i++) {
|
||||
gStartZone[i].pos = startpos;
|
||||
gStartZone[i].sector = startsector;
|
||||
|
|
|
@ -229,7 +229,7 @@ void CFX::fxProcess(void)
|
|||
remove(actor);
|
||||
continue;
|
||||
}
|
||||
if (getflorzofslopeptrf(actor->sector(), actor->spr.pos) <= actor->spr.pos.Z)
|
||||
if (getflorzofslopeptr(actor->sector(), actor->spr.pos) <= actor->spr.pos.Z)
|
||||
{
|
||||
if (pFXData->funcID < 0 || pFXData->funcID >= kCallbackMax)
|
||||
{
|
||||
|
|
|
@ -1301,7 +1301,7 @@ void nnExtProcessSuperSprites()
|
|||
if (pXSector != nullptr)
|
||||
{
|
||||
if ((uwater = pXSector->Underwater) != 0) airVel <<= 6;
|
||||
if (pXSector->panVel != 0 && getflorzofslopeptrf(debrisactor->sector(), debrisactor->spr.pos) <= bottom)
|
||||
if (pXSector->panVel != 0 && getflorzofslopeptr(debrisactor->sector(), debrisactor->spr.pos) <= bottom)
|
||||
{
|
||||
int angle = pXSector->panAngle.Buildang(); int speed = 0;
|
||||
if (pXSector->panAlways || pXSector->state || pXSector->busy)
|
||||
|
@ -1721,8 +1721,8 @@ void debrisMove(int listIndex)
|
|||
if ((actor->xspr.physAttr & kPhysDebrisSwim) && uwater)
|
||||
{
|
||||
double vc = 0;
|
||||
double cz = getceilzofslopeptrf(pSector, actor->spr.pos);
|
||||
double fz = getflorzofslopeptrf(pSector, actor->spr.pos);
|
||||
double cz = getceilzofslopeptr(pSector, actor->spr.pos);
|
||||
double fz = getflorzofslopeptr(pSector, actor->spr.pos);
|
||||
double div = max(bottom - top, 1 / 256.);
|
||||
|
||||
if (pSector->lowerLink) cz += (cz < 0) ? 5. : -5.;
|
||||
|
@ -3357,9 +3357,9 @@ void useEffectGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
if (actor->insector())
|
||||
{
|
||||
if (sourceactor->xspr.data4 == 3)
|
||||
pos = getflorzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
pos = getflorzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
else
|
||||
pos = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
pos = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
break;
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
@ -3797,8 +3797,8 @@ void useSeqSpawnerGen(DBloodActor* sourceactor, int objType, sectortype* pSector
|
|||
case 6:
|
||||
if (!iactor->insector()) pos.Z = top;
|
||||
else pos.Z = ((sourceactor->xspr.data3 == 5) ?
|
||||
getflorzofslopeptrf(spawned->sector(), spawned->spr.pos) :
|
||||
getceilzofslopeptrf(spawned->sector(), spawned->spr.pos));
|
||||
getflorzofslopeptr(spawned->sector(), spawned->spr.pos) :
|
||||
getceilzofslopeptr(spawned->sector(), spawned->spr.pos));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6685,12 +6685,12 @@ void sprite2sectorSlope(DBloodActor* actor, sectortype* pSector, int rel, bool f
|
|||
double z = 0;
|
||||
switch (rel) {
|
||||
default:
|
||||
z = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
if ((actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR) && actor->hasX() && actor->xspr.Touch) z--;
|
||||
slope = pSector->floorheinum;
|
||||
break;
|
||||
case 1:
|
||||
z = getceilzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z = getceilzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
if ((actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR) && actor->hasX() && actor->xspr.Touch) z++;
|
||||
slope = pSector->ceilingheinum;
|
||||
break;
|
||||
|
@ -6734,7 +6734,7 @@ void useSlopeChanger(DBloodActor* sourceactor, int objType, sectortype* pSect, D
|
|||
while (auto iactor = it.Next())
|
||||
{
|
||||
if (!(iactor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)) continue;
|
||||
else if (getflorzofslopeptrf(pSect, iactor->spr.pos) - kSlopeDist <= iactor->spr.pos.Z)
|
||||
else if (getflorzofslopeptr(pSect, iactor->spr.pos) - kSlopeDist <= iactor->spr.pos.Z)
|
||||
{
|
||||
sprite2sectorSlope(iactor, pSect, 0, true);
|
||||
|
||||
|
@ -6770,7 +6770,7 @@ void useSlopeChanger(DBloodActor* sourceactor, int objType, sectortype* pSect, D
|
|||
while (auto iactor = it.Next())
|
||||
{
|
||||
if (!(iactor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)) continue;
|
||||
else if (getceilzofslopeptrf(pSect, iactor->spr.pos) + kSlopeDist >= iactor->spr.pos.Z)
|
||||
else if (getceilzofslopeptr(pSect, iactor->spr.pos) + kSlopeDist >= iactor->spr.pos.Z)
|
||||
{
|
||||
sprite2sectorSlope(iactor, pSect, 1, true);
|
||||
|
||||
|
@ -6825,8 +6825,8 @@ void useSlopeChanger(DBloodActor* sourceactor, int objType, sectortype* pSect, D
|
|||
case 1: sprite2sectorSlope(objActor, objActor->sector(), 0, flag2); break;
|
||||
case 2: sprite2sectorSlope(objActor, objActor->sector(), 1, flag2); break;
|
||||
case 3:
|
||||
if (getflorzofslopeptrf(objActor->sector(), objActor->spr.pos) - kSlopeDist <= objActor->spr.pos.Z) sprite2sectorSlope(objActor, objActor->sector(), 0, flag2);
|
||||
if (getceilzofslopeptrf(objActor->sector(), objActor->spr.pos) + kSlopeDist >= objActor->spr.pos.Z) sprite2sectorSlope(objActor, objActor->sector(), 1, flag2);
|
||||
if (getflorzofslopeptr(objActor->sector(), objActor->spr.pos) - kSlopeDist <= objActor->spr.pos.Z) sprite2sectorSlope(objActor, objActor->sector(), 0, flag2);
|
||||
if (getceilzofslopeptr(objActor->sector(), objActor->spr.pos) + kSlopeDist >= objActor->spr.pos.Z) sprite2sectorSlope(objActor, objActor->sector(), 1, flag2);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -9261,9 +9261,9 @@ void clampSprite(DBloodActor* actor, int which)
|
|||
{
|
||||
GetActorExtents(actor, &zTop, &zBot);
|
||||
if (which & 0x01)
|
||||
actor->spr.pos.Z += min(getflorzofslopeptrf(actor->sector(), actor->spr.pos) - zBot, 0.);
|
||||
actor->spr.pos.Z += min(getflorzofslopeptr(actor->sector(), actor->spr.pos) - zBot, 0.);
|
||||
if (which & 0x02)
|
||||
actor->spr.pos.Z += max(getceilzofslopeptrf(actor->sector(), actor->spr.pos) - zTop, 0.);
|
||||
actor->spr.pos.Z += max(getceilzofslopeptr(actor->sector(), actor->spr.pos) - zTop, 0.);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1887,7 +1887,7 @@ void playerProcess(PLAYER* pPlayer)
|
|||
auto link = actor->sector()->lowerLink;
|
||||
if (link && (link->spr.type == kMarkerLowGoo || link->spr.type == kMarkerLowWater))
|
||||
{
|
||||
if (getceilzofslopeptrf(actor->sector(), actor->spr.pos) > pPlayer->zView)
|
||||
if (getceilzofslopeptr(actor->sector(), actor->spr.pos) > pPlayer->zView)
|
||||
pPlayer->isUnderwater = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -949,7 +949,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
{
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
double floorZ = getflorzofslopeptrf(pSector, actor->spr.pos);
|
||||
double floorZ = getflorzofslopeptr(pSector, actor->spr.pos);
|
||||
if (!(actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) && floorZ <= bottom)
|
||||
{
|
||||
viewBackupSpriteLoc(actor);
|
||||
|
@ -2194,8 +2194,8 @@ void AlignSlopes(void)
|
|||
|
||||
auto pos = pWall->center();
|
||||
viewInterpolateSector(§);
|
||||
alignflorslope(§, DVector3(pos, getflorzofslopeptrf(pNextSector, pos)));
|
||||
alignceilslope(§, DVector3(pos, getceilzofslopeptrf(pNextSector, pos)));
|
||||
alignflorslope(§, DVector3(pos, getflorzofslopeptr(pNextSector, pos)));
|
||||
alignceilslope(§, DVector3(pos, getceilzofslopeptr(pNextSector, pos)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
actor->sector()->upperLink = actor;
|
||||
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
actor->spr.pos.Z = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos.Z = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
break;
|
||||
case kMarkerLowWater:
|
||||
case kMarkerLowStack:
|
||||
|
@ -147,7 +147,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
actor->sector()->lowerLink = actor;
|
||||
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
actor->spr.pos.Z = getceilzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos.Z = getceilzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ int CheckLink(DBloodActor* actor)
|
|||
if (aUpper->spr.type == kMarkerUpLink)
|
||||
z = aUpper->spr.pos.Z;
|
||||
else
|
||||
z = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
if (z <= actor->spr.pos.Z)
|
||||
{
|
||||
aLower = aUpper->GetOwner();
|
||||
|
@ -215,7 +215,7 @@ int CheckLink(DBloodActor* actor)
|
|||
if (aLower->spr.type == kMarkerLowLink)
|
||||
z2 = aLower->spr.pos.Z;
|
||||
else
|
||||
z2 = getceilzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z2 = getceilzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos += DVector3(aLower->spr.pos.XY() - aUpper->spr.pos.XY(), z2 - z);
|
||||
actor->interpolated = false;
|
||||
return aUpper->spr.type;
|
||||
|
@ -227,7 +227,7 @@ int CheckLink(DBloodActor* actor)
|
|||
if (aLower->spr.type == kMarkerLowLink)
|
||||
z = aLower->spr.pos.Z;
|
||||
else
|
||||
z = getceilzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z = getceilzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
if (z >= actor->spr.pos.Z)
|
||||
{
|
||||
aUpper = aLower->GetOwner();
|
||||
|
@ -238,7 +238,7 @@ int CheckLink(DBloodActor* actor)
|
|||
if (aUpper->spr.type == kMarkerUpLink)
|
||||
z2 = aUpper->spr.pos.Z;
|
||||
else
|
||||
z2 = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
z2 = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos += DVector3(aUpper->spr.pos.XY() - aLower->spr.pos.XY(), z2 - z);
|
||||
actor->interpolated = false;
|
||||
return aLower->spr.type;
|
||||
|
@ -263,7 +263,7 @@ int CheckLink(DVector3& cPos, sectortype** pSector)
|
|||
if (aUpper->spr.type == kMarkerUpLink)
|
||||
z1 = aUpper->spr.pos.Z;
|
||||
else
|
||||
z1 = getflorzofslopeptrf(*pSector, cPos);
|
||||
z1 = getflorzofslopeptr(*pSector, cPos);
|
||||
if (z1 <= cPos.Z)
|
||||
{
|
||||
aLower = aUpper->GetOwner();
|
||||
|
@ -275,7 +275,7 @@ int CheckLink(DVector3& cPos, sectortype** pSector)
|
|||
if (aUpper->spr.type == kMarkerLowLink)
|
||||
z2 = aLower->spr.pos.Z;
|
||||
else
|
||||
z2 = getceilzofslopeptrf(*pSector, cPos);
|
||||
z2 = getceilzofslopeptr(*pSector, cPos);
|
||||
cPos.Z += z2 - z1;
|
||||
return aUpper->spr.type;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ int CheckLink(DVector3& cPos, sectortype** pSector)
|
|||
if (aLower->spr.type == kMarkerLowLink)
|
||||
z1 = aLower->spr.pos.Z;
|
||||
else
|
||||
z1 = getceilzofslopeptrf(*pSector, cPos);
|
||||
z1 = getceilzofslopeptr(*pSector, cPos);
|
||||
if (z1 >= cPos.Z)
|
||||
{
|
||||
aUpper = aLower->GetOwner();
|
||||
|
@ -297,7 +297,7 @@ int CheckLink(DVector3& cPos, sectortype** pSector)
|
|||
if (aLower->spr.type == kMarkerUpLink)
|
||||
z2 = aUpper->spr.pos.Z;
|
||||
else
|
||||
z2 = getflorzofslopeptrf(*pSector, cPos);
|
||||
z2 = getflorzofslopeptr(*pSector, cPos);
|
||||
cPos.Z += z2 - z1;
|
||||
return aLower->spr.type;
|
||||
}
|
||||
|
|
|
@ -2113,7 +2113,7 @@ bool money(DDukeActor* actor, int BLOODPOOL)
|
|||
deletesprite(actor);
|
||||
return false;
|
||||
}
|
||||
double l = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double l = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
|
||||
if (actor->spr.pos.Z > l)
|
||||
{
|
||||
|
@ -2178,8 +2178,8 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
return false;
|
||||
}
|
||||
|
||||
double fz = getflorzofslopeptrf(sectp, actor->spr.pos);
|
||||
double cz = getceilzofslopeptrf(sectp, actor->spr.pos);
|
||||
double fz = getflorzofslopeptr(sectp, actor->spr.pos);
|
||||
double cz = getceilzofslopeptr(sectp, actor->spr.pos);
|
||||
if (cz == fz)
|
||||
{
|
||||
deletesprite(actor);
|
||||
|
@ -2246,7 +2246,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
}
|
||||
actor->temp_data[2]++;
|
||||
}
|
||||
double ll = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double ll = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
|
||||
actor->spr.pos.Z = ll - 2;
|
||||
actor->vel.X = 0;
|
||||
|
@ -2525,7 +2525,7 @@ void gutsdir(DDukeActor* actor, int gtype, int n, int p)
|
|||
else sx = sy = 32;
|
||||
|
||||
double gutz = actor->spr.pos.Z - 8;
|
||||
double floorz = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorz = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
|
||||
if (gutz > floorz - 8)
|
||||
gutz = floorz - 8;
|
||||
|
|
|
@ -545,7 +545,7 @@ void guts_d(DDukeActor* actor, int gtype, int n, int p)
|
|||
else sx = sy = 32;
|
||||
|
||||
double gutz = actor->spr.pos.Z - 8;
|
||||
double floorz = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorz = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
|
||||
if (gutz > floorz - 8)
|
||||
gutz = floorz - 8;
|
||||
|
@ -3066,7 +3066,7 @@ void moveexplosions_d(void) // STATNUM 5
|
|||
case MONEY + 1:
|
||||
case MAIL + 1:
|
||||
case PAPER + 1:
|
||||
act->vel.Z = act->floorz = getflorzofslopeptrf(act->sector(), act->spr.pos.X, act->spr.pos.Y);
|
||||
act->vel.Z = act->floorz = getflorzofslopeptr(act->sector(), act->spr.pos.X, act->spr.pos.Y);
|
||||
break;
|
||||
case MONEY:
|
||||
case MAIL:
|
||||
|
@ -3581,14 +3581,14 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
if (actor->vel.Z > 0)
|
||||
{
|
||||
double f = getflorzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double f = getflorzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
actor->floorz = f;
|
||||
if (actor->spr.pos.Z > f - 30)
|
||||
actor->spr.pos.Z = f - 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double c = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
actor->ceilingz = c;
|
||||
if (actor->spr.pos.Z < c + 50)
|
||||
{
|
||||
|
@ -3604,7 +3604,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
actor->spr.pos.Z = actor->floorz;
|
||||
if (actor->vel.Z < 0)
|
||||
{
|
||||
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double c = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
if (actor->spr.pos.Z < c + 66)
|
||||
{
|
||||
actor->spr.pos.Z = c + 66;
|
||||
|
|
|
@ -453,7 +453,7 @@ void guts_r(DDukeActor* actor, int gtype, int n, int p)
|
|||
else sx = sy = 16;
|
||||
|
||||
double gutz = actor->spr.pos.Z - 8;
|
||||
double floorz = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
double floorz = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
|
||||
if (gutz > floorz - 8)
|
||||
gutz = floorz - 8;
|
||||
|
@ -2982,7 +2982,7 @@ void moveexplosions_r(void) // STATNUM 5
|
|||
deletesprite(act);
|
||||
continue;
|
||||
case FEATHER + 1: // feather
|
||||
act->spr.pos.Z = act->floorz = getflorzofslopeptrf(act->sector(), act->spr.pos.X, act->spr.pos.Y);
|
||||
act->spr.pos.Z = act->floorz = getflorzofslopeptr(act->sector(), act->spr.pos.X, act->spr.pos.Y);
|
||||
if (act->sector()->lotag == 800)
|
||||
{
|
||||
deletesprite(act);
|
||||
|
@ -3592,14 +3592,14 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (actor->vel.Z > 0)
|
||||
{
|
||||
double dist = isRRRA() ? 28 : 30;
|
||||
double f = getflorzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double f = getflorzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
actor->floorz = f;
|
||||
if (actor->spr.pos.Z > f - dist)
|
||||
actor->spr.pos.Z = f - dist;
|
||||
}
|
||||
else
|
||||
{
|
||||
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double c = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
actor->ceilingz = c;
|
||||
if (actor->spr.pos.Z < c + 50)
|
||||
{
|
||||
|
@ -3612,7 +3612,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
actor->spr.pos.Z = actor->floorz;
|
||||
if (actor->vel.Z < 0)
|
||||
{
|
||||
double c = getceilzofslopeptrf(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
double c = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
||||
if (actor->spr.pos.Z < c + 66)
|
||||
{
|
||||
actor->spr.pos.Z = c + 66;
|
||||
|
|
|
@ -2780,8 +2780,8 @@ void processinput_d(int snum)
|
|||
shrunk = (pact->spr.yrepeat < 32);
|
||||
getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 163, CLIPMASK0);
|
||||
|
||||
p->truefz = getflorzofslopeptrf(psectp, p->pos);
|
||||
p->truecz = getceilzofslopeptrf(psectp, p->pos);
|
||||
p->truefz = getflorzofslopeptr(psectp, p->pos);
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos);
|
||||
|
||||
truefdist = abs(p->pos.Z - p->truefz);
|
||||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + 16)
|
||||
|
|
|
@ -3396,16 +3396,16 @@ void processinput_r(int snum)
|
|||
if (pact->native_clipdist() == 64)
|
||||
{
|
||||
getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 163L, CLIPMASK0);
|
||||
tempfz = getflorzofslopeptrf(psectp, p->pos);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 4L, CLIPMASK0);
|
||||
tempfz = getflorzofslopeptrf(psectp, p->pos);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos);
|
||||
}
|
||||
|
||||
p->truefz = tempfz;
|
||||
p->truecz = getceilzofslopeptrf(psectp, p->pos);
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos);
|
||||
|
||||
double truefdist = abs(p->pos.Z - tempfz);
|
||||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + 16)
|
||||
|
|
|
@ -159,11 +159,11 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
{
|
||||
if (actj->sector()->lotag == 2)
|
||||
{
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.pos.Z = getceilzofslopeptr(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.cstat |= CSTAT_SPRITE_YFLIP;
|
||||
}
|
||||
else if (actj->sector()->lotag == 1)
|
||||
act->spr.pos.Z = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
act->spr.pos.Z = getflorzofslopeptr(act->sector(), act->spr.pos);
|
||||
}
|
||||
|
||||
if (sectp->floorpicnum == FLOORSLIME ||
|
||||
|
@ -296,7 +296,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_FLOOR;
|
||||
if (act->spr.picnum == LAVAPOOL) // Twentieth Anniversary World Tour
|
||||
{
|
||||
act->spr.pos.Z = getflorzofslopeptrf(act->sector(), act->spr.pos) - 0.78125;
|
||||
act->spr.pos.Z = getflorzofslopeptr(act->sector(), act->spr.pos) - 0.78125;
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
||||
|
@ -634,7 +634,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (actj)
|
||||
{
|
||||
double x = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
double x = getflorzofslopeptr(act->sector(), act->spr.pos);
|
||||
if (act->spr.pos.Z > x - 12)
|
||||
act->spr.pos.Z = x - 12;
|
||||
}
|
||||
|
|
|
@ -212,11 +212,11 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
{
|
||||
if (actj->sector()->lotag == 2)
|
||||
{
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.pos.Z = getceilzofslopeptr(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.cstat |= CSTAT_SPRITE_YFLIP;
|
||||
}
|
||||
else if (actj->sector()->lotag == 1)
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos);
|
||||
act->spr.pos.Z = getceilzofslopeptr(act->sector(), act->spr.pos);
|
||||
}
|
||||
|
||||
if (sectp->floorpicnum == FLOORSLIME ||
|
||||
|
@ -647,7 +647,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (actj)
|
||||
{
|
||||
double x = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
double x = getflorzofslopeptr(act->sector(), act->spr.pos);
|
||||
if (act->spr.pos.Z > x - 12)
|
||||
act->spr.pos.Z = x - 12;
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
|
|||
// workaround for mines and floor decals beneath the floor
|
||||
if (tsp->picnum == BETTY_R0 || tsp->picnum == FLOORBLOOD1)
|
||||
{
|
||||
double const florz = getflorzofslopeptrf(tActor->sector(), tActor->spr.pos);
|
||||
double const florz = getflorzofslopeptr(tActor->sector(), tActor->spr.pos);
|
||||
if (tActor->spr.pos.Z > florz)
|
||||
tsp->pos.Z = florz;
|
||||
}
|
||||
|
|
|
@ -6761,7 +6761,7 @@ Collision move_ground_missile(DSWActor* actor, const DVector2& change, double ce
|
|||
actor->user.z_tgt = 0;
|
||||
if ((dasect != actor->sector()) && (dasect != nullptr))
|
||||
{
|
||||
actor->spr.pos.Z = getflorzofslopeptrf(dasect, actor->spr.pos.X, actor->spr.pos.Y);
|
||||
actor->spr.pos.Z = getflorzofslopeptr(dasect, actor->spr.pos.X, actor->spr.pos.Y);
|
||||
ChangeActorSect(actor, dasect);
|
||||
}
|
||||
|
||||
|
|
|
@ -10173,7 +10173,7 @@ void SpawnBreakStaticFlames(DSWActor* actor)
|
|||
|
||||
actorNew->user.Radius = 200;
|
||||
actorNew->user.floor_dist = actorNew->user.ceiling_dist = 0;
|
||||
actorNew->spr.pos.Z = getflorzofslopeptrf(actorNew->sector(), actorNew->spr.pos);
|
||||
actorNew->spr.pos.Z = getflorzofslopeptr(actorNew->sector(), actorNew->spr.pos);
|
||||
|
||||
PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue