- renamed sectortype::floorz and ceilingz as preparation for floatification

This commit is contained in:
Christoph Oelckers 2022-02-03 00:35:12 +01:00
parent 02ae6476de
commit 0672572e63
85 changed files with 796 additions and 789 deletions

View file

@ -253,8 +253,8 @@ static int cliptestsector(int const dasect, int const nextsect, int32_t const fl
}
}
int32_t daz2 = sec2->floorz;
int32_t dacz2 = sec2->ceilingz;
int32_t daz2 = sec2->__int_floorz;
int32_t dacz2 = sec2->__int_ceilingz;
if ((sec2->floorstat|sec2->ceilingstat) & CSTAT_SECTOR_SLOPE)
getcorrectzsofslope(nextsect, pos.X, pos.Y, &dacz2, &daz2);
@ -264,8 +264,8 @@ static int cliptestsector(int const dasect, int const nextsect, int32_t const fl
auto const sec = &sector[dasect];
int32_t daz = sec->floorz;
int32_t dacz = sec->ceilingz;
int32_t daz = sec->__int_floorz;
int32_t dacz = sec->__int_ceilingz;
if ((sec->floorstat|sec->ceilingstat) & CSTAT_SECTOR_SLOPE)
getcorrectzsofslope(dasect, pos.X, pos.Y, &dacz, &daz);
@ -879,7 +879,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
tempint2 = getceilzofslopeptr(sect, pos->X, pos->Y) - pos->Z;
else
tempint2 = sect->ceilingz - pos->Z;
tempint2 = sect->__int_ceilingz - pos->Z;
if (tempint2 > 0)
{
@ -894,7 +894,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
tempint2 = pos->Z - getflorzofslopeptr(sect, pos->X, pos->Y);
else
tempint2 = pos->Z - sect->floorz;
tempint2 = pos->Z - sect->__int_floorz;
if (tempint2 <= 0)
{
@ -1098,8 +1098,8 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
if (wal.cstat & EWallFlags::FromInt(dawalclipmask)) continue; // XXX?
if (((nextsect->ceilingstat & CSTAT_SECTOR_SKY) == 0) && (pos.Z <= nextsect->ceilingz+(3<<8))) continue;
if (((nextsect->floorstat & CSTAT_SECTOR_SKY) == 0) && (pos.Z >= nextsect->floorz-(3<<8))) continue;
if (((nextsect->ceilingstat & CSTAT_SECTOR_SKY) == 0) && (pos.Z <= nextsect->__int_ceilingz+(3<<8))) continue;
if (((nextsect->floorstat & CSTAT_SECTOR_SKY) == 0) && (pos.Z >= nextsect->__int_floorz-(3<<8))) continue;
int nextsectno = ::sectnum(nextsect);
if (!clipsectormap[nextsectno])
@ -1366,9 +1366,9 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
while (auto sec = search.GetNext())
{
i = 1;
if (hitscan_trysector(sv, sec, &hitinfo, vx,vy,vz, sec->ceilingstat, sec->ceilingheinum, sec->ceilingz, -i))
if (hitscan_trysector(sv, sec, &hitinfo, vx,vy,vz, sec->ceilingstat, sec->ceilingheinum, sec->__int_ceilingz, -i))
continue;
if (hitscan_trysector(sv, sec, &hitinfo, vx,vy,vz, sec->floorstat, sec->floorheinum, sec->floorz, i))
if (hitscan_trysector(sv, sec, &hitinfo, vx,vy,vz, sec->floorstat, sec->floorheinum, sec->__int_floorz, i))
continue;
////////// Walls //////////

View file

@ -306,7 +306,7 @@ void MarkSectorSeen(sectortype* sec)
if (wal.nextWall()->cstat & bits) continue;
auto osec = wal.nextSector();
if (osec->lotag == 32767) continue;
if (osec->ceilingz >= osec->floorz) continue;
if (osec->__int_ceilingz >= osec->__int_floorz) continue;
show2dsector.Set(sectnum(osec));
}
}
@ -389,10 +389,10 @@ bool ShowRedLine(int j, int i)
}
if (automapMode == am_full)
{
if (sector[i].floorz != sector[i].ceilingz)
if (wal->nextSector()->floorz != wal->nextSector()->ceilingz)
if (sector[i].__int_floorz != sector[i].__int_ceilingz)
if (wal->nextSector()->__int_floorz != wal->nextSector()->__int_ceilingz)
if (((wal->cstat | wal->nextWall()->cstat) & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)) == 0)
if (sector[i].floorz == wal->nextSector()->floorz)
if (sector[i].__int_floorz == wal->nextSector()->__int_floorz)
return false;
if (sector[i].floorpicnum != wal->nextSector()->floorpicnum)
return false;
@ -420,8 +420,8 @@ void drawredlines(int cposx, int cposy, int czoom, int cang)
{
if (!gFullMap && !show2dsector[i]) continue;
int z1 = sector[i].ceilingz;
int z2 = sector[i].floorz;
int z1 = sector[i].__int_ceilingz;
int z2 = sector[i].__int_floorz;
for (auto& wal : wallsofsector(i))
{
@ -429,7 +429,7 @@ void drawredlines(int cposx, int cposy, int czoom, int cang)
auto osec = wal.nextSector();
if (osec->ceilingz == z1 && osec->floorz == z2)
if (osec->__int_ceilingz == z1 && osec->__int_floorz == z2)
if (((wal.cstat | wal.nextWall()->cstat) & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)) == 0) continue;
if (ShowRedLine(wallnum(&wal), i))

View file

@ -158,12 +158,12 @@ void calcSlope(const sectortype* sec, float xpos, float ypos, float* pceilz, flo
if (pceilz)
{
bits |= sec->ceilingstat;
*pceilz = float(sec->ceilingz);
*pceilz = float(sec->__int_ceilingz);
}
if (pflorz)
{
bits |= sec->floorstat;
*pflorz = float(sec->floorz);
*pflorz = float(sec->__int_floorz);
}
if ((bits & CSTAT_SECTOR_SLOPE) == CSTAT_SECTOR_SLOPE)
@ -527,7 +527,7 @@ sectortype* nextsectorneighborzptr(sectortype* sectp, int startz, int flags)
int factor = (flags & Find_Up)? -1 : 1;
int bestz = INT_MAX;
sectortype* bestsec = (flags & Find_Safe)? sectp : nullptr;
const auto planez = (flags & Find_Ceiling)? &sectortype::ceilingz : &sectortype::floorz;
const auto planez = (flags & Find_Ceiling)? &sectortype::__int_ceilingz : &sectortype::__int_floorz;
startz *= factor;
for(auto& wal : wallsofsector(sectp))

View file

@ -438,12 +438,12 @@ inline double SquareDistToLine(double px, double py, double lx1, double ly1, dou
inline void alignceilslope(sectortype* sect, int x, int y, int z)
{
sect->setceilingslope(getslopeval(sect, x, y, z, sect->ceilingz));
sect->setceilingslope(getslopeval(sect, x, y, z, sect->__int_ceilingz));
}
inline void alignflorslope(sectortype* sect, int x, int y, int z)
{
sect->setfloorslope(getslopeval(sect, x, y, z, sect->floorz));
sect->setfloorslope(getslopeval(sect, x, y, z, sect->__int_floorz));
}
#include "updatesector.h"

View file

@ -41,8 +41,8 @@ double Get(int index, DCoreActor* actor, int type)
{
switch(type)
{
case Interp_Sect_Floorz: return sector[index].floorz;
case Interp_Sect_Ceilingz: return sector[index].ceilingz;
case Interp_Sect_Floorz: return sector[index].__int_floorz;
case Interp_Sect_Ceilingz: return sector[index].__int_ceilingz;
case Interp_Sect_Floorheinum: return sector[index].floorheinum;
case Interp_Sect_Ceilingheinum: return sector[index].ceilingheinum;
case Interp_Sect_FloorPanX: return sector[index].floorxpan_;
@ -65,8 +65,8 @@ void Set(int index, DCoreActor* actor, int type, double val)
int old;
switch(type)
{
case Interp_Sect_Floorz: sector[index].setfloorz(xs_CRoundToInt(val)); break;
case Interp_Sect_Ceilingz: sector[index].setceilingz(xs_CRoundToInt(val)); break;
case Interp_Sect_Floorz: sector[index].set_int_floorz(xs_CRoundToInt(val)); break;
case Interp_Sect_Ceilingz: sector[index].set_int_ceilingz(xs_CRoundToInt(val)); break;
case Interp_Sect_Floorheinum: sector[index].floorheinum = (short)xs_CRoundToInt(val); break;
case Interp_Sect_Ceilingheinum: sector[index].ceilingheinum = (short)xs_CRoundToInt(val); break;
case Interp_Sect_FloorPanX: sector[index].floorxpan_ = float(val); break;

View file

@ -98,8 +98,8 @@ static void ReadSectorV7(FileReader& fr, sectortype& sect)
{
sect.wallptr = fr.ReadInt16();
sect.wallnum = fr.ReadInt16();
sect.setceilingz(fr.ReadInt32(), true);
sect.setfloorz(fr.ReadInt32(), true);
sect.set_int_ceilingz(fr.ReadInt32(), true);
sect.set_int_floorz(fr.ReadInt32(), true);
sect.ceilingstat = ESectorFlags::FromInt(fr.ReadUInt16());
sect.floorstat = ESectorFlags::FromInt(fr.ReadUInt16());
sect.ceilingpicnum = fr.ReadUInt16();
@ -129,8 +129,8 @@ static void ReadSectorV6(FileReader& fr, sectortype& sect)
sect.floorpicnum = fr.ReadUInt16();
sect.ceilingheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
sect.floorheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
sect.setceilingz(fr.ReadInt32(), true);
sect.setfloorz(fr.ReadInt32(), true);
sect.set_int_ceilingz(fr.ReadInt32(), true);
sect.set_int_floorz(fr.ReadInt32(), true);
sect.ceilingshade = fr.ReadInt8();
sect.floorshade = fr.ReadInt8();
sect.ceilingxpan_ = fr.ReadUInt8();
@ -156,8 +156,8 @@ static void ReadSectorV5(FileReader& fr, sectortype& sect)
sect.floorpicnum = fr.ReadUInt16();
sect.ceilingheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
sect.floorheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
sect.setceilingz(fr.ReadInt32(), true);
sect.setfloorz(fr.ReadInt32(), true);
sect.set_int_ceilingz(fr.ReadInt32(), true);
sect.set_int_floorz(fr.ReadInt32(), true);
sect.ceilingshade = fr.ReadInt8();
sect.floorshade = fr.ReadInt8();
sect.ceilingxpan_ = fr.ReadUInt8();

View file

@ -240,13 +240,20 @@ struct sectortype
#else
// Do not change directly!
int32_t ceilingz;
int32_t floorz;
int32_t __int_ceilingz;
int32_t __int_floorz;
void setceilingz(int cc, bool temp = false);
void setfloorz(int cc, bool temp = false);
void addceilingz(int cc, bool temp = false);
void addfloorz(int cc, bool temp = false);
/*
void setceilingz(double cc, bool temp = false);
void setfloorz(double cc, bool temp = false);
void addceilingz(double cc, bool temp = false);
void addfloorz(double cc, bool temp = false);
*/
void set_int_ceilingz(int cc, bool temp = false);
void set_int_floorz(int cc, bool temp = false);
void add_int_ceilingz(int cc, bool temp = false);
void add_int_floorz(int cc, bool temp = false);
int32_t* ceilingzptr(bool temp = false);
int32_t* floorzptr(bool temp = false);
@ -664,35 +671,35 @@ inline int walltype::Length()
#ifndef SECTOR_HACKJOB
inline void sectortype::setceilingz(int cc, bool temp)
inline void sectortype::set_int_ceilingz(int cc, bool temp)
{
ceilingz = cc;
__int_ceilingz = cc;
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
}
inline void sectortype::setfloorz(int cc, bool temp)
inline void sectortype::set_int_floorz(int cc, bool temp)
{
floorz = cc;
__int_floorz = cc;
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
}
inline void sectortype::addceilingz(int cc, bool temp)
inline void sectortype::add_int_ceilingz(int cc, bool temp)
{
ceilingz += cc;
__int_ceilingz += cc;
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
}
inline void sectortype::addfloorz(int cc, bool temp)
inline void sectortype::add_int_floorz(int cc, bool temp)
{
floorz += cc;
__int_floorz += cc;
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
}
inline int32_t* sectortype::ceilingzptr(bool temp)
{
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
return &ceilingz;
return &__int_ceilingz;
}
inline int32_t* sectortype::floorzptr(bool temp)
{
if (!temp) MarkVerticesForSector(sector.IndexOf(this));
return &floorz;
return &__int_floorz;
}
#endif

View file

@ -104,7 +104,7 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
auto ret = screen->mVertexData->AllocVertices(pIndices->Size());
auto vp = ret.first;
float base = (plane == 0 ? sec->floorz : sec->ceilingz) * (1 / -256.f);
float base = (plane == 0 ? sec->__int_floorz : sec->__int_ceilingz) * (1 / -256.f);
for (unsigned i = 0; i < pIndices->Size(); i++)
{
auto ii = (*pIndices)[i];
@ -421,10 +421,10 @@ void HWFlat::ProcessFlatSprite(HWDrawInfo* di, tspritetype* sprite, sectortype*
int tilenum = sprite->picnum;
texture = tileGetTexture(tilenum);
bool belowfloor = false;
if (sprite->int_pos().Z > sprite->sectp->floorz)
if (sprite->int_pos().Z > sprite->sectp->__int_floorz)
{
belowfloor = true;
sprite->set_int_z(sprite->sectp->floorz);
sprite->set_int_z(sprite->sectp->__int_floorz);
}
z = sprite->int_pos().Z * (1 / -256.f);
if (z == di->Viewpoint.Pos.Z) return; // looking right at the edge.

View file

@ -114,7 +114,7 @@ void HWWall::SkyPlane(HWDrawInfo *di, sectortype *sector, int plane, bool allowr
ptype = PORTALTYPE_PLANEMIRROR;
if (plane == plane_ceiling && (sector->ceilingstat & CSTAT_SECTOR_SLOPE)) return;
if (plane == plane_floor && (sector->floorstat & CSTAT_SECTOR_SLOPE)) return;
planemirror = plane == plane_floor ? &sector->floorz : &sector->ceilingz;
planemirror = plane == plane_floor ? &sector->__int_floorz : &sector->__int_ceilingz;
PutPortal(di, PORTALTYPE_PLANEMIRROR, plane);
}
else

View file

@ -790,13 +790,13 @@ void HWWall::DoOneSidedTexture(HWDrawInfo* di, walltype* wal, sectortype* fronts
{
if ((!(wal->cstat & CSTAT_WALL_BOTTOM_SWAP) && (wal->cstat & CSTAT_WALL_1WAY)) ||
((wal->cstat & CSTAT_WALL_BOTTOM_SWAP) && (wal->nextWall()->cstat & CSTAT_WALL_ALIGN_BOTTOM)))
refheight = frontsector->ceilingz;
refheight = frontsector->__int_ceilingz;
else
refheight = backsector->floorz;
refheight = backsector->__int_floorz;
}
else
{
refheight = (wal->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->floorz : frontsector->ceilingz;
refheight = (wal->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->__int_floorz : frontsector->__int_ceilingz;
}
type = RENDERWALL_M1S;
@ -813,7 +813,7 @@ void HWWall::DoUpperTexture(HWDrawInfo* di, walltype* wal, sectortype* frontsect
float topleft, float topright, float bottomleft, float bottomright)
{
// get the alignment reference position.
int refheight = (wal->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->ceilingz : backsector->ceilingz;
int refheight = (wal->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->__int_ceilingz : backsector->__int_ceilingz;
type = RENDERWALL_TOP;
DoTexture(di, wal, wal, refheight, topleft, topright, bottomleft, bottomright);
@ -831,7 +831,7 @@ void HWWall::DoLowerTexture(HWDrawInfo* di, walltype* wal, sectortype* frontsect
// get the alignment reference position.
int refheight;
auto refwall = (wal->cstat & CSTAT_WALL_BOTTOM_SWAP) ? wal->nextWall() : wal;
refheight = (refwall->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->ceilingz : backsector->floorz;
refheight = (refwall->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->__int_ceilingz : backsector->__int_floorz;
shade = refwall->shade;
palette = refwall->pal;
@ -858,15 +858,15 @@ void HWWall::DoMidTexture(HWDrawInfo* di, walltype* wal,
if (wal->cstat & CSTAT_WALL_1WAY)
{
// 1-sided wall
refheight = swapit ? front->ceilingz : back->ceilingz;
refheight = swapit ? front->__int_ceilingz : back->__int_ceilingz;
}
else
{
// masked wall
if (swapit)
refheight = min(front->floorz, back->floorz);
refheight = min(front->__int_floorz, back->__int_floorz);
else
refheight = max(front->ceilingz, back->ceilingz);
refheight = max(front->__int_ceilingz, back->__int_ceilingz);
}
if ((bch1 - fch1) * (bch2 - fch2) >= 0)
{
@ -1220,7 +1220,7 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, tspritetype* spr, sectortype* sec
if (!(sector->ceilingstat & CSTAT_SECTOR_SKY))
{
float polyh = (ztop[0] - zbottom[0]);
float ceilingz = sector->ceilingz * (1 / -256.f);
float ceilingz = sector->__int_ceilingz * (1 / -256.f);
if (ceilingz < ztop[0] && ceilingz >= zbottom[0])
{
float newv = (ceilingz - zbottom[0]) / polyh;
@ -1231,7 +1231,7 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, tspritetype* spr, sectortype* sec
if (!(sector->floorstat & CSTAT_SECTOR_SKY))
{
float polyh = (ztop[0] - zbottom[0]);
float floorz = sector->floorz * (1 / -256.f);
float floorz = sector->__int_floorz * (1 / -256.f);
if (floorz <= ztop[0] && floorz > zbottom[0])
{
float newv = (floorz - zbottom[0]) / polyh;

View file

@ -512,8 +512,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sectortype &c, sectort
("wallptr", c.wallptr, def->wallptr)
("wallnum", c.wallnum, def->wallnum)
#ifndef SECTOR_HACKJOB // can't save these in test mode...
("ceilingz", c.ceilingz, def->ceilingz)
("floorz", c.floorz, def->floorz)
("ceilingz", c.__int_ceilingz, def->__int_ceilingz)
("floorz", c.__int_floorz, def->__int_floorz)
#endif
("ceilingstat", c.ceilingstat, def->ceilingstat)
("floorstat", c.floorstat, def->floorstat)

View file

@ -437,9 +437,9 @@ void SectionGeometry::CreatePlaneMesh(Section* section, int plane, const FVector
auto texture = tileGetTexture(plane ? sectorp->ceilingpicnum : sectorp->floorpicnum);
auto& sdata = data[section->index];
auto& entry = sdata.planes[plane];
int fz = sectorp->floorz, cz = sectorp->ceilingz;
sectorp->setfloorz(0, true);
sectorp->setceilingz(0, true);
int fz = sectorp->__int_floorz, cz = sectorp->__int_ceilingz;
sectorp->set_int_floorz(0, true);
sectorp->set_int_ceilingz(0, true);
UVCalculator uvcalc(sectorp, plane, texture, offset);
@ -456,8 +456,8 @@ void SectionGeometry::CreatePlaneMesh(Section* section, int plane, const FVector
PlanesAtPoint(sectorp, pt.X, -pt.Y, plane ? &pt.Z : nullptr, !plane ? &pt.Z : nullptr);
tc = uvcalc.GetUV(pt.X, -pt.Y, pt.Z);
}
sectorp->setfloorz(fz, true);
sectorp->setceilingz(cz, true);
sectorp->set_int_floorz(fz, true);
sectorp->set_int_ceilingz(cz, true);
entry.normal = CalcNormal(sectorp, plane);
}

View file

@ -107,80 +107,80 @@ DEFINE_GLOBAL(sector)
double sector_floorz(sectortype* sect)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
return sect->floorz * zinttoworld;
return sect->__int_floorz * zinttoworld;
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, floorz, sector_floorz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
ACTION_RETURN_FLOAT(self->floorz * zinttoworld);
ACTION_RETURN_FLOAT(self->__int_floorz * zinttoworld);
}
double sector_ceilingz(sectortype* sect)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
return sect->ceilingz * zinttoworld;
return sect->__int_ceilingz * zinttoworld;
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, ceilingz, sector_ceilingz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
ACTION_RETURN_FLOAT(self->ceilingz * zinttoworld);
ACTION_RETURN_FLOAT(self->__int_ceilingz * zinttoworld);
}
void sector_setfloorz(sectortype* sect, double val)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
sect->setfloorz(int(val * zworldtoint));
sect->set_int_floorz(int(val * zworldtoint));
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, setfloorz, sector_floorz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
PARAM_FLOAT(z);
self->setfloorz(z);
self->set_int_floorz(z);
return 0;
}
void sector_setceilingz(sectortype* sect, double val)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
sect->setceilingz(int(val * zworldtoint));
sect->set_int_ceilingz(int(val * zworldtoint));
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, setceilingz, sector_ceilingz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
PARAM_FLOAT(z);
self->setceilingz(z);
self->set_int_ceilingz(z);
return 0;
}
void sector_addfloorz(sectortype* sect, double val)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
sect->addfloorz(int(val * zworldtoint));
sect->add_int_floorz(int(val * zworldtoint));
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, addfloorz, sector_floorz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
PARAM_FLOAT(z);
self->addfloorz(z);
self->add_int_floorz(z);
return 0;
}
void sector_addceilingz(sectortype* sect, double val)
{
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
sect->addceilingz(int(val * zworldtoint));
sect->add_int_ceilingz(int(val * zworldtoint));
}
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, addceilingz, sector_ceilingz)
{
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
PARAM_FLOAT(z);
self->addceilingz(z);
self->add_int_ceilingz(z);
return 0;
}

View file

@ -4829,7 +4829,7 @@ void MoveDude(DBloodActor* actor)
if (pDudeInfo->lockOut && pHitXSector && pHitXSector->Wallpush && !pHitXSector->Key && !pHitXSector->dudeLockout && !pHitXSector->state && !pHitXSector->busy && !pPlayer)
trTriggerSector(pHitSector, kCmdSectorPush, actor);
if (top < pHitSector->ceilingz || bottom > pHitSector->floorz)
if (top < pHitSector->__int_ceilingz || bottom > pHitSector->__int_floorz)
{
// ???
}

View file

@ -411,7 +411,7 @@ void batMoveToCeil(DBloodActor* actor)
aiNewState(actor, &batIdle);
}
else
aiSetTarget(actor, x, y, actor->sector()->ceilingz);
aiSetTarget(actor, x, y, actor->sector()->__int_ceilingz);
}
END_BLD_NS

View file

@ -111,7 +111,7 @@ void StompSeqCallback(int, DBloodActor* actor)
{
int top, bottom;
GetActorExtents(actor, &top, &bottom);
if (abs(bottom - pSector->floorz) == 0)
if (abs(bottom - pSector->__int_floorz) == 0)
{
int dx = abs(actor->int_pos().X - actor2->int_pos().X);
int dy = abs(actor->int_pos().Y - actor2->int_pos().Y);

View file

@ -415,7 +415,7 @@ void eelMoveToCeil(DBloodActor* actor)
aiNewState(actor, &eelIdle);
}
else
aiSetTarget(actor, x, y, actor->sector()->ceilingz);
aiSetTarget(actor, x, y, actor->sector()->__int_ceilingz);
}
END_BLD_NS

View file

@ -2486,9 +2486,9 @@ bool genDudePrepare(DBloodActor* actor, int propId)
// make sure dudes aren't in the floor or ceiling
int zTop, zBot; GetActorExtents(actor, &zTop, &zBot);
if (!(actor->sector()->ceilingstat & CSTAT_SECTOR_SKY))
actor->add_int_z(ClipLow(actor->sector()->ceilingz - zTop, 0));
actor->add_int_z(ClipLow(actor->sector()->__int_ceilingz - zTop, 0));
if (!(actor->sector()->floorstat & CSTAT_SECTOR_SKY))
actor->add_int_z(ClipHigh(actor->sector()->floorz - zBot, 0));
actor->add_int_z(ClipHigh(actor->sector()->__int_floorz - zBot, 0));
actor->spr.clipdist = ClipRange((actor->spr.xrepeat + actor->spr.yrepeat) >> 1, 4, 120);
if (propId) break;

View file

@ -444,10 +444,10 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
break;
sectortype* pSector = pTSprite->sectp;
pNSprite->set_int_pos({ pTSprite->int_pos().X, pTSprite->int_pos().Y, pSector->ceilingz });
pNSprite->set_int_pos({ pTSprite->int_pos().X, pTSprite->int_pos().Y, pSector->__int_ceilingz });
pNSprite->picnum = 624;
pNSprite->shade = ((pTSprite->int_pos().Z - pSector->ceilingz) >> 8) - 64;
pNSprite->shade = ((pTSprite->int_pos().Z - pSector->__int_ceilingz) >> 8) - 64;
pNSprite->pal = 2;
pNSprite->xrepeat = pNSprite->yrepeat = 64;
pNSprite->cstat |= CSTAT_SPRITE_ONE_SIDE | CSTAT_SPRITE_ALIGNMENT_FLOOR | CSTAT_SPRITE_YFLIP | CSTAT_SPRITE_TRANSLUCENT;
@ -462,9 +462,9 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
break;
sectortype* pSector = pTSprite->sectp;
pNSprite->set_int_pos({ pTSprite->int_pos().X, pTSprite->int_pos().Y, pSector->floorz });
pNSprite->set_int_pos({ pTSprite->int_pos().X, pTSprite->int_pos().Y, pSector->__int_floorz });
pNSprite->picnum = 624;
uint8_t nShade = (pSector->floorz - pTSprite->int_pos().Z) >> 8;
uint8_t nShade = (pSector->__int_floorz - pTSprite->int_pos().Z) >> 8;
pNSprite->shade = nShade - 32;
pNSprite->pal = 2;
pNSprite->xrepeat = pNSprite->yrepeat = nShade;
@ -848,12 +848,12 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
if (pTSprite->type != kMissileFlareRegular) break;
sectortype* pSector1 = pTSprite->sectp;
int zDiff = (pTSprite->int_pos().Z - pSector1->ceilingz) >> 8;
int zDiff = (pTSprite->int_pos().Z - pSector1->__int_ceilingz) >> 8;
if ((pSector1->ceilingstat & CSTAT_SECTOR_SKY) == 0 && zDiff < 64) {
viewAddEffect(tsprites, nTSprite, kViewEffectCeilGlow);
}
zDiff = (pSector1->floorz - pTSprite->int_pos().Z) >> 8;
zDiff = (pSector1->__int_floorz - pTSprite->int_pos().Z) >> 8;
if ((pSector1->floorstat & CSTAT_SECTOR_SKY) == 0 && zDiff < 64) {
viewAddEffect(tsprites, nTSprite, kViewEffectFloorGlow);
}

View file

@ -708,7 +708,7 @@ void sub_76A08(DBloodActor* actor, DBloodActor* actor2, PLAYER* pPlayer) // ???
{
int top, bottom;
GetActorExtents(actor, &top, &bottom);
actor->set_int_pos({ actor2->int_pos().X, actor2->int_pos().Y, actor2->sector()->floorz - (bottom - actor->int_pos().Z) });
actor->set_int_pos({ actor2->int_pos().X, actor2->int_pos().Y, actor2->sector()->__int_floorz - (bottom - actor->int_pos().Z) });
actor->spr.ang = actor2->spr.ang;
ChangeActorSect(actor, actor2->sector());
sfxPlay3DSound(actor2, 201, -1, 0);

View file

@ -257,8 +257,8 @@ void dbLoadMap(const char* pPath, int* pX, int* pY, int* pZ, short* pAngle, int*
}
pSector->wallptr = LittleShort(load.wallptr);
pSector->wallnum = LittleShort(load.wallnum);
pSector->setceilingz(LittleLong(load.ceilingz), true);
pSector->setfloorz(LittleLong(load.floorz), true);
pSector->set_int_ceilingz(LittleLong(load.ceilingz), true);
pSector->set_int_floorz(LittleLong(load.floorz), true);
pSector->ceilingstat = ESectorFlags::FromInt(LittleShort(load.ceilingstat));
pSector->floorstat = ESectorFlags::FromInt(LittleShort(load.floorstat));
pSector->ceilingpicnum = LittleShort(load.ceilingpicnum);

View file

@ -210,7 +210,7 @@ void CFX::fxProcess(void)
actAirDrag(actor, pFXData->drag);
actor->add_int_pos({ actor->vel.X >> 12, actor->vel.Y >> 12, actor->vel.Z >> 8 });
// Weird...
if (actor->vel.X || (actor->vel.Y && actor->int_pos().Z >= actor->sector()->floorz))
if (actor->vel.X || (actor->vel.Y && actor->int_pos().Z >= actor->sector()->__int_floorz))
{
updatesector(actor->int_pos().X, actor->int_pos().Y, &pSector);
if (pSector == nullptr)

View file

@ -524,9 +524,9 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
return 0;
int nOfs;
if (pWall->cstat & CSTAT_WALL_ALIGN_BOTTOM)
nOfs = ClipHigh(pSector->floorz, pSectorNext->floorz);
nOfs = ClipHigh(pSector->__int_floorz, pSectorNext->__int_floorz);
else
nOfs = ClipLow(pSector->ceilingz, pSectorNext->ceilingz);
nOfs = ClipLow(pSector->__int_ceilingz, pSectorNext->__int_ceilingz);
nOfs = (gHitInfo.hitpos.Z - nOfs) >> 8;
if (pWall->cstat & CSTAT_WALL_YFLIP)
nOfs = -nOfs;

View file

@ -746,8 +746,8 @@ void nnExtInitModernStuff(TArray<DBloodActor*>& actors)
// very quick fix for floor sprites with Touch trigger flag if their Z is equals sector floorz / ceilgz
if (actor->insector() && actor->xspr.Touch && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)) {
if (actor->int_pos().Z == actor->sector()->floorz) actor->add_int_z(-1);
else if (actor->int_pos().Z == actor->sector()->ceilingz) actor->add_int_z(1);
if (actor->int_pos().Z == actor->sector()->__int_floorz) actor->add_int_z(-1);
else if (actor->int_pos().Z == actor->sector()->__int_ceilingz) actor->add_int_z(1);
}
// make Proximity flag work not just for dudes and things...
@ -1893,7 +1893,7 @@ bool ceilIsTooLow(DBloodActor* actor)
if (actor != nullptr)
{
sectortype* pSector = actor->sector();
int a = pSector->ceilingz - pSector->floorz;
int a = pSector->__int_ceilingz - pSector->__int_floorz;
int top, bottom;
GetActorExtents(actor, &top, &bottom);
int b = top - bottom;
@ -3539,8 +3539,8 @@ void useSpriteDamager(DBloodActor* sourceactor, int objType, sectortype* targSec
case OBJ_SECTOR:
{
GetActorExtents(sourceactor, &top, &bottom);
floor = (bottom >= pSector->floorz);
ceil = (top <= pSector->ceilingz);
floor = (bottom >= pSector->__int_floorz);
ceil = (top <= pSector->__int_ceilingz);
wall = (sourceactor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL);
enter = (!floor && !ceil && !wall);
BloodSectIterator it(targSect);
@ -4255,12 +4255,12 @@ bool condCheckSector(DBloodActor* aCond, int cmpOp, bool PUSH)
if (cond == 55)// 60)
{
h = ClipLow(abs(pXSect->onFloorZ - pXSect->offFloorZ), 1);
curH = abs(pSect->floorz - pXSect->offFloorZ);
curH = abs(pSect->__int_floorz - pXSect->offFloorZ);
}
else
{
h = ClipLow(abs(pXSect->onCeilZ - pXSect->offCeilZ), 1);
curH = abs(pSect->ceilingz - pXSect->offCeilZ);
curH = abs(pSect->__int_ceilingz - pXSect->offCeilZ);
}
return condCmp((kPercFull * curH) / h, arg1, arg2, cmpOp);
default:

View file

@ -1028,9 +1028,9 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (dfz != 0)
{
int oldZ = pSector->floorz;
pSector->setfloorz((pSector->baseFloor = pXSector->offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16)));
pSector->velFloor += (pSector->floorz - oldZ) << 8;
int oldZ = pSector->__int_floorz;
pSector->set_int_floorz((pSector->baseFloor = pXSector->offFloorZ + MulScale(dfz, GetWaveValue(a3, a4), 16)));
pSector->velFloor += (pSector->__int_floorz - oldZ) << 8;
BloodSectIterator it(pSector);
while (auto actor = it.Next())
@ -1042,14 +1042,14 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD)
{
viewBackupSpriteLoc(actor);
actor->add_int_z(pSector->floorz - oldZ);
actor->add_int_z(pSector->__int_floorz - oldZ);
}
else if (actor->spr.flags & 2)
actor->spr.flags |= 4;
else if (oldZ <= bottom && !(actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK))
{
viewBackupSpriteLoc(actor);
actor->add_int_z(pSector->floorz - oldZ);
actor->add_int_z(pSector->__int_floorz - oldZ);
}
}
@ -1064,7 +1064,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD))
{
viewBackupSpriteLoc(ac);
ac->add_int_z(pSector->floorz - oldZ);
ac->add_int_z(pSector->__int_floorz - oldZ);
}
}
}
@ -1075,9 +1075,9 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (dcz != 0)
{
int oldZ = pSector->ceilingz;
pSector->setceilingz((pSector->baseCeil = pXSector->offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16)));
pSector->velCeil += (pSector->ceilingz - oldZ) << 8;
int oldZ = pSector->__int_ceilingz;
pSector->set_int_ceilingz((pSector->baseCeil = pXSector->offCeilZ + MulScale(dcz, GetWaveValue(a3, a4), 16)));
pSector->velCeil += (pSector->__int_ceilingz - oldZ) << 8;
BloodSectIterator it(pSector);
while (auto actor = it.Next())
@ -1087,7 +1087,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
{
viewBackupSpriteLoc(actor);
actor->add_int_z(pSector->ceilingz - oldZ);
actor->add_int_z(pSector->__int_ceilingz - oldZ);
}
}
@ -1102,7 +1102,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE))
{
viewBackupSpriteLoc(ac);
ac->add_int_z(pSector->ceilingz - oldZ);
ac->add_int_z(pSector->__int_ceilingz - oldZ);
}
}
}
@ -1121,7 +1121,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
DBloodActor* GetHighestSprite(sectortype* pSector, int nStatus, int* z)
{
*z = pSector->floorz;
*z = pSector->__int_floorz;
DBloodActor* found = nullptr;
BloodSectIterator it(pSector);
@ -1152,7 +1152,7 @@ DBloodActor* GetCrushedSpriteExtents(sectortype* pSector, int* pzTop, int* pzBot
assert(pzTop != NULL && pzBot != NULL);
assert(pSector);
DBloodActor* found = nullptr;
int foundz = pSector->ceilingz;
int foundz = pSector->__int_ceilingz;
BloodSectIterator it(pSector);
while (auto actor = it.Next())
@ -1201,9 +1201,9 @@ int VCrushBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
return 1;
viewInterpolateSector(pSector);
if (dz1 != 0)
pSector->setceilingz(vc);
pSector->set_int_ceilingz(vc);
if (dz2 != 0)
pSector->setfloorz(v10);
pSector->set_int_floorz(v10);
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(pSector, pXSector->txID, kCmdLink, initiator);
@ -1633,7 +1633,7 @@ void OperateTeleport(sectortype* pSector)
TeleFrag(pXSector->actordata, destactor->sector());
}
actor->set_int_xy(destactor->int_pos().X, destactor->int_pos().Y);
actor->add_int_z(destactor->sector()->floorz - pSector->floorz);
actor->add_int_z(destactor->sector()->__int_floorz - pSector->__int_floorz);
actor->spr.ang = destactor->spr.ang;
ChangeActorSect(actor, destactor->sector());
sfxPlay3DSound(destactor, 201, -1, 0);
@ -2130,9 +2130,9 @@ void ProcessMotion(void)
}
if (pXSector->bobFloor)
{
int floorZ = pSector->floorz;
int floorZ = pSector->__int_floorz;
viewInterpolateSector(pSector);
pSector->setfloorz(pSector->baseFloor + vdi);
pSector->set_int_floorz(pSector->baseFloor + vdi);
BloodSectIterator itr(pSector);
while (auto actor = itr.Next())
@ -2153,9 +2153,9 @@ void ProcessMotion(void)
}
if (pXSector->bobCeiling)
{
int ceilZ = pSector->ceilingz;
int ceilZ = pSector->__int_ceilingz;
viewInterpolateSector(pSector);
pSector->setceilingz(pSector->baseCeil + vdi);
pSector->set_int_ceilingz(pSector->baseCeil + vdi);
BloodSectIterator itr(pSector);
while (auto actor = itr.Next())
@ -2323,8 +2323,8 @@ void trInit(TArray<DBloodActor*>& actors)
for (auto& sect : sector)
{
sectortype* pSector = &sect;
pSector->baseFloor = pSector->floorz;
pSector->baseCeil = pSector->ceilingz;
pSector->baseFloor = pSector->__int_floorz;
pSector->baseCeil = pSector->__int_ceilingz;
if (pSector->hasX())
{
XSECTOR* pXSector = &pSector->xs();

View file

@ -361,7 +361,7 @@ void movedummyplayers(void)
if (ps[p].on_ground && ps[p].on_warping_sector == 1 && ps[p].cursector->lotag == 1)
{
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_int_z(act->sector()->ceilingz + (27 << 8));
act->set_int_z(act->sector()->__int_ceilingz + (27 << 8));
act->spr.ang = ps[p].angle.ang.asbuild();
if (act->temp_data[0] == 8)
act->temp_data[0] = 0;
@ -369,7 +369,7 @@ void movedummyplayers(void)
}
else
{
if (act->sector()->lotag != 2) act->set_int_z(act->sector()->floorz);
if (act->sector()->lotag != 2) act->set_int_z(act->sector()->__int_floorz);
act->spr.cstat = CSTAT_SPRITE_INVISIBLE;
}
}
@ -580,7 +580,7 @@ void movefx(void)
act->temp_data[0] = 0;
}
}
else if (act->spr.lotag < 999 && (unsigned)act->sector()->lotag < ST_9_SLIDING_ST_DOOR && snd_ambience && act->sector()->floorz != act->sector()->ceilingz)
else if (act->spr.lotag < 999 && (unsigned)act->sector()->lotag < ST_9_SLIDING_ST_DOOR && snd_ambience && act->sector()->__int_floorz != act->sector()->__int_ceilingz)
{
int flags = S_GetUserFlags(act->spr.lotag);
if (flags & SF_MSFX)
@ -670,15 +670,15 @@ void movecrane(DDukeActor *actor, int crane)
if (actor->temp_data[0] == 2)
{
if ((sectp->floorz - actor->int_pos().Z) < (64 << 8))
if ((sectp->__int_floorz - actor->int_pos().Z) < (64 << 8))
if (actor->spr.picnum > crane) actor->spr.picnum--;
if ((sectp->floorz - actor->int_pos().Z) < (4096 + 1024))
if ((sectp->__int_floorz - actor->int_pos().Z) < (4096 + 1024))
actor->temp_data[0]++;
}
if (actor->temp_data[0] == 7)
{
if ((sectp->floorz - actor->int_pos().Z) < (64 << 8))
if ((sectp->__int_floorz - actor->int_pos().Z) < (64 << 8))
{
if (actor->spr.picnum > crane) actor->spr.picnum--;
else
@ -738,7 +738,7 @@ void movecrane(DDukeActor *actor, int crane)
else if (actor->temp_data[0] == 5 || actor->temp_data[0] == 8)
{
if (actor->temp_data[0] == 8 && actor->spr.picnum < (crane + 2))
if ((sectp->floorz - actor->int_pos().Z) > 8192)
if ((sectp->__int_floorz - actor->int_pos().Z) > 8192)
actor->spr.picnum++;
if (actor->int_pos().Z < cpt.pos.Z)
@ -891,7 +891,7 @@ void moveflammable(DDukeActor* actor, int pool)
if (actorflag(actor, SFLAG_FALLINGFLAMMABLE))
{
makeitfall(actor);
actor->ceilingz = actor->sector()->ceilingz;
actor->ceilingz = actor->sector()->__int_ceilingz;
}
}
@ -1068,10 +1068,10 @@ void movewaterdrip(DDukeActor *actor, int drip)
void movedoorshock(DDukeActor* actor)
{
auto sectp = actor->sector();
int j = abs(sectp->ceilingz - sectp->floorz) >> 9;
int j = abs(sectp->__int_ceilingz - sectp->__int_floorz) >> 9;
actor->spr.yrepeat = j + 4;
actor->spr.xrepeat = 16;
actor->set_int_z(sectp->floorz);
actor->set_int_z(sectp->__int_floorz);
}
//---------------------------------------------------------------------------
@ -1088,18 +1088,18 @@ void movetouchplate(DDukeActor* actor, int plate)
if (actor->temp_data[1] == 1 && actor->spr.hitag >= 0) //Move the sector floor
{
x = sectp->floorz;
x = sectp->__int_floorz;
if (actor->temp_data[3] == 1)
{
if (x >= actor->temp_data[2])
{
sectp->setfloorz(x);
sectp->set_int_floorz(x);
actor->temp_data[1] = 0;
}
else
{
sectp->addfloorz(sectp->extra);
sectp->add_int_floorz(sectp->extra);
p = checkcursectnums(actor->sector());
if (p >= 0) ps[p].pos.Z += sectp->extra;
}
@ -1108,12 +1108,12 @@ void movetouchplate(DDukeActor* actor, int plate)
{
if (x <= actor->int_pos().Z)
{
sectp->setfloorz(actor->int_pos().Z);
sectp->set_int_floorz(actor->int_pos().Z);
actor->temp_data[1] = 0;
}
else
{
sectp->addfloorz(-sectp->extra);
sectp->add_int_floorz(-sectp->extra);
p = checkcursectnums(actor->sector());
if (p >= 0)
ps[p].pos.Z -= sectp->extra;
@ -1577,8 +1577,8 @@ void forcesphere(DDukeActor* actor, int forcesphere)
if (actor->spr.zvel < 6144)
actor->spr.zvel += 192;
actor->add_int_z(actor->spr.zvel);
if (actor->int_pos().Z > sectp->floorz)
actor->set_int_z(sectp->floorz);
if (actor->int_pos().Z > sectp->__int_floorz)
actor->set_int_z(sectp->__int_floorz);
actor->temp_data[3]--;
if (actor->temp_data[3] == 0)
{
@ -1615,8 +1615,8 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
actor->spr.shade += (sectp->ceilingshade - actor->spr.shade) >> 1;
else actor->spr.shade += (sectp->floorshade - actor->spr.shade) >> 1;
if (actor->int_pos().Z < sectp->ceilingz + (32 << 8))
actor->set_int_z(sectp->ceilingz + (32 << 8));
if (actor->int_pos().Z < sectp->__int_ceilingz + (32 << 8))
actor->set_int_z(sectp->__int_ceilingz + (32 << 8));
if (ud.multimode < 2)
{
@ -1887,7 +1887,7 @@ void reactor(DDukeActor* const actor, int REACTOR, int REACTOR2, int REACTORBURN
actor->temp_data[1]++;
actor->temp_data[4] = actor->int_pos().Z;
actor->set_int_z(sectp->floorz - (krand() % (sectp->floorz - sectp->ceilingz)));
actor->set_int_z(sectp->__int_floorz - (krand() % (sectp->__int_floorz - sectp->__int_ceilingz)));
switch (actor->temp_data[1])
{
@ -2248,7 +2248,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
actor->add_int_pos({ MulScale(actor->spr.xvel, bcos(actor->spr.ang), 14), MulScale(actor->spr.xvel, bsin(actor->spr.ang), 14), 0 });
actor->add_int_z(actor->spr.zvel);
if (floorcheck && actor->int_pos().Z >= actor->sector()->floorz)
if (floorcheck && actor->int_pos().Z >= actor->sector()->__int_floorz)
{
deletesprite(actor);
return false;
@ -2499,7 +2499,7 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
sectp = actor->sector();
}
if (actor->int_pos().Z < sectp->floorz - (2 << 8))
if (actor->int_pos().Z < sectp->__int_floorz - (2 << 8))
{
if (actor->temp_data[1] < 1) actor->temp_data[1]++;
else
@ -2609,20 +2609,20 @@ void handle_se00(DDukeActor* actor)
}
else actor->tempang = 256;
if (sect->floorz > actor->int_pos().Z) //z's are touching
if (sect->__int_floorz > actor->int_pos().Z) //z's are touching
{
sect->addfloorz(-512);
sect->add_int_floorz(-512);
zchange = -512;
if (sect->floorz < actor->int_pos().Z)
sect->setfloorz(actor->int_pos().Z);
if (sect->__int_floorz < actor->int_pos().Z)
sect->set_int_floorz(actor->int_pos().Z);
}
else if (sect->floorz < actor->int_pos().Z) //z's are touching
else if (sect->__int_floorz < actor->int_pos().Z) //z's are touching
{
sect->addfloorz(512);
sect->add_int_floorz(512);
zchange = 512;
if (sect->floorz > actor->int_pos().Z)
sect->setfloorz(actor->int_pos().Z);
if (sect->__int_floorz > actor->int_pos().Z)
sect->set_int_floorz(actor->int_pos().Z);
}
}
else if (actor->spr.extra == 3)
@ -2637,20 +2637,20 @@ void handle_se00(DDukeActor* actor)
}
else actor->tempang = 0;
if (sect->floorz > actor->temp_data[3]) //z's are touching
if (sect->__int_floorz > actor->temp_data[3]) //z's are touching
{
sect->addfloorz(-512);
sect->add_int_floorz(-512);
zchange = -512;
if (sect->floorz < actor->temp_data[3])
sect->setfloorz(actor->temp_data[3]);
if (sect->__int_floorz < actor->temp_data[3])
sect->set_int_floorz(actor->temp_data[3]);
}
else if (sect->floorz < actor->temp_data[3]) //z's are touching
else if (sect->__int_floorz < actor->temp_data[3]) //z's are touching
{
sect->addfloorz(512);
sect->add_int_floorz(512);
zchange = 512;
if (sect->floorz > actor->temp_data[3])
sect->setfloorz(actor->temp_data[3]);
if (sect->__int_floorz > actor->temp_data[3])
sect->set_int_floorz(actor->temp_data[3]);
}
}
@ -2825,7 +2825,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
if (actor->spr.xvel <= 64 && statstate)
S_StopSound(actor->ovel.X, actor);
if ((sc->floorz - sc->ceilingz) < (108 << 8))
if ((sc->__int_floorz - sc->__int_ceilingz) < (108 << 8))
{
if (ud.clipping == 0 && actor->spr.xvel >= 192)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
@ -2913,7 +2913,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
// I have no idea why this is here, but the SE's sector must never, *EVER* change, or the map will corrupt.
//SetActor(actor, actor->int_pos());
if ((sc->floorz - sc->ceilingz) < (108 << 8))
if ((sc->__int_floorz - sc->__int_ceilingz) < (108 << 8))
{
if (ud.clipping == 0 && actor->spr.xvel >= 192)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
@ -3014,7 +3014,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
int l = MulScale(actor->spr.xvel, bcos(actor->spr.ang), 14);
int x = MulScale(actor->spr.xvel, bsin(actor->spr.ang), 14);
if ((sc->floorz - sc->ceilingz) < (108 << 8))
if ((sc->__int_floorz - sc->__int_ceilingz) < (108 << 8))
if (ud.clipping == 0)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
{
@ -3076,7 +3076,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
ms(actor);
//SetActor(actor, actor->int_pos());
if ((sc->floorz - sc->ceilingz) < (108 << 8))
if ((sc->__int_floorz - sc->__int_ceilingz) < (108 << 8))
{
if (ud.clipping == 0)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
@ -3396,8 +3396,8 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
}
actor->add_int_z(actor->spr.zvel);
sc->addceilingz(actor->spr.zvel);
sector[actor->temp_data[0]].addceilingz(actor->spr.zvel);
sc->add_int_ceilingz(actor->spr.zvel);
sector[actor->temp_data[0]].add_int_ceilingz(actor->spr.zvel);
ms(actor);
//SetActor(actor, actor->int_pos());
}
@ -3495,7 +3495,7 @@ void handle_se10(DDukeActor* actor, const int* specialtags)
auto sc = actor->sector();
int sh = actor->spr.hitag;
if ((sc->lotag & 0xff) == 27 || (sc->floorz > sc->ceilingz && (sc->lotag & 0xff) != 23) || sc->lotag == 32791 - 65536)
if ((sc->lotag & 0xff) == 27 || (sc->__int_floorz > sc->__int_ceilingz && (sc->lotag & 0xff) != 23) || sc->lotag == 32791 - 65536)
{
int j = 1;
@ -3681,25 +3681,25 @@ void handle_se13(DDukeActor* actor)
{
if (actor->spriteextra)
{
if (abs(actor->temp_data[0] - sc->ceilingz) >= j)
sc->addceilingz(Sgn(actor->temp_data[0] - sc->ceilingz) * j);
else sc->setceilingz(actor->temp_data[0]);
if (abs(actor->temp_data[0] - sc->__int_ceilingz) >= j)
sc->add_int_ceilingz(Sgn(actor->temp_data[0] - sc->__int_ceilingz) * j);
else sc->set_int_ceilingz(actor->temp_data[0]);
}
else
{
if (abs(actor->temp_data[1] - sc->floorz) >= j)
sc->addfloorz(Sgn(actor->temp_data[1] - sc->floorz) * j);
else sc->setfloorz(actor->temp_data[1]);
if (abs(actor->temp_data[1] - sc->__int_floorz) >= j)
sc->add_int_floorz(Sgn(actor->temp_data[1] - sc->__int_floorz) * j);
else sc->set_int_floorz(actor->temp_data[1]);
}
}
else
{
if (abs(actor->temp_data[1] - sc->floorz) >= j)
sc->addfloorz(Sgn(actor->temp_data[1] - sc->floorz) * j);
else sc->setfloorz(actor->temp_data[1]);
if (abs(actor->temp_data[0] - sc->ceilingz) >= j)
sc->addceilingz(Sgn(actor->temp_data[0] - sc->ceilingz) * j);
sc->setceilingz(actor->temp_data[0]);
if (abs(actor->temp_data[1] - sc->__int_floorz) >= j)
sc->add_int_floorz(Sgn(actor->temp_data[1] - sc->__int_floorz) * j);
else sc->set_int_floorz(actor->temp_data[1]);
if (abs(actor->temp_data[0] - sc->__int_ceilingz) >= j)
sc->add_int_ceilingz(Sgn(actor->temp_data[0] - sc->__int_ceilingz) * j);
sc->set_int_ceilingz(actor->temp_data[0]);
}
if (actor->temp_data[3] == 1)
@ -3785,9 +3785,9 @@ void handle_se16(DDukeActor* actor, int REACTOR, int REACTOR2)
auto sc = actor->sector();
actor->temp_data[2] += 32;
if (sc->floorz < sc->ceilingz) actor->spr.shade = 0;
if (sc->__int_floorz < sc->__int_ceilingz) actor->spr.shade = 0;
else if (sc->ceilingz < actor->temp_data[3])
else if (sc->__int_ceilingz < actor->temp_data[3])
{
//The following code check to see if
@ -3810,8 +3810,8 @@ void handle_se16(DDukeActor* actor, int REACTOR, int REACTOR2)
else actor->spr.shade = 1;
}
if (actor->spr.shade) sc->addceilingz(1024);
else sc->addceilingz(-512);
if (actor->spr.shade) sc->add_int_ceilingz(1024);
else sc->add_int_ceilingz(-512);
ms(actor);
//SetActor(actor, actor->int_pos());
@ -3830,8 +3830,8 @@ void handle_se17(DDukeActor* actor)
int q = actor->temp_data[0] * (actor->spr.yvel << 2);
sc->addceilingz(q);
sc->addfloorz(q);
sc->add_int_ceilingz(q);
sc->add_int_floorz(q);
DukeSectIterator it(actor->sector());
while (auto act1 = it.Next())
@ -3851,13 +3851,13 @@ void handle_se17(DDukeActor* actor)
act1->add_int_z(q);
}
act1->floorz = sc->floorz;
act1->ceilingz = sc->ceilingz;
act1->floorz = sc->__int_floorz;
act1->ceilingz = sc->__int_ceilingz;
}
if (actor->temp_data[0]) //If in motion
{
if (abs(sc->floorz - actor->temp_data[2]) <= actor->spr.yvel)
if (abs(sc->__int_floorz - actor->temp_data[2]) <= actor->spr.yvel)
{
activatewarpelevators(actor, 0);
return;
@ -3865,10 +3865,10 @@ void handle_se17(DDukeActor* actor)
if (actor->temp_data[0] == -1)
{
if (sc->floorz > actor->temp_data[3])
if (sc->__int_floorz > actor->temp_data[3])
return;
}
else if (sc->ceilingz < actor->temp_data[4]) return;
else if (sc->__int_ceilingz < actor->temp_data[4]) return;
if (actor->temp_data[1] == 0) return;
actor->temp_data[1] = 0;
@ -3893,10 +3893,10 @@ void handle_se17(DDukeActor* actor)
ps[p].pos.X += act2->int_pos().X - actor->int_pos().X;
ps[p].pos.Y += act2->int_pos().Y - actor->int_pos().Y;
ps[p].pos.Z = act2->sector()->floorz - (sc->floorz - ps[p].pos.Z);
ps[p].pos.Z = act2->sector()->__int_floorz - (sc->__int_floorz - ps[p].pos.Z);
act3->floorz = act2->sector()->floorz;
act3->ceilingz = act2->sector()->ceilingz;
act3->floorz = act2->sector()->__int_floorz;
act3->ceilingz = act2->sector()->__int_ceilingz;
ps[p].bobpos.X = ps[p].opos.X = ps[p].pos.X;
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].pos.Y;
@ -3912,15 +3912,15 @@ void handle_se17(DDukeActor* actor)
else if (act3->spr.statnum != STAT_EFFECTOR)
{
act3->add_int_pos({ act2->int_pos().X - actor->int_pos().X ,act2->int_pos().Y - actor->int_pos().Y, 0 });
act3->set_int_z(act2->sector()->floorz - (sc->floorz - act3->int_pos().Z));
act3->set_int_z(act2->sector()->__int_floorz - (sc->__int_floorz - act3->int_pos().Z));
act3->backupz();
ChangeActorSect(act3, act2->sector());
SetActor(act3, act3->int_pos());
act3->floorz = act2->sector()->floorz;
act3->ceilingz = act2->sector()->ceilingz;
act3->floorz = act2->sector()->__int_floorz;
act3->ceilingz = act2->sector()->__int_ceilingz;
}
}
@ -3943,17 +3943,17 @@ void handle_se18(DDukeActor *actor, bool morecheck)
{
if (actor->spr.ang == 512)
{
sc->addceilingz(-sc->extra);
if (sc->ceilingz <= actor->temp_data[1])
sc->add_int_ceilingz(-sc->extra);
if (sc->__int_ceilingz <= actor->temp_data[1])
{
sc->setceilingz(actor->temp_data[1]);
sc->set_int_ceilingz(actor->temp_data[1]);
deletesprite(actor);
return;
}
}
else
{
sc->addfloorz(sc->extra);
sc->add_int_floorz(sc->extra);
if (morecheck)
{
DukeSectIterator it(actor->sector());
@ -3964,13 +3964,13 @@ void handle_se18(DDukeActor *actor, bool morecheck)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
{
a2->add_int_z(sc->extra);
a2->floorz = sc->floorz;
a2->floorz = sc->__int_floorz;
}
}
}
if (sc->floorz >= actor->temp_data[1])
if (sc->__int_floorz >= actor->temp_data[1])
{
sc->setfloorz(actor->temp_data[1]);
sc->set_int_floorz(actor->temp_data[1]);
deletesprite(actor);
return;
}
@ -3980,17 +3980,17 @@ void handle_se18(DDukeActor *actor, bool morecheck)
{
if (actor->spr.ang == 512)
{
sc->addceilingz(sc->extra);
if (sc->ceilingz >= actor->int_pos().Z)
sc->add_int_ceilingz(sc->extra);
if (sc->__int_ceilingz >= actor->int_pos().Z)
{
sc->setceilingz(actor->int_pos().Z);
sc->set_int_ceilingz(actor->int_pos().Z);
deletesprite(actor);
return;
}
}
else
{
sc->addfloorz(-sc->extra);
sc->add_int_floorz(-sc->extra);
if (morecheck)
{
DukeSectIterator it(actor->sector());
@ -4001,13 +4001,13 @@ void handle_se18(DDukeActor *actor, bool morecheck)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
{
a2->add_int_z(-sc->extra);
a2->floorz = sc->floorz;
a2->floorz = sc->__int_floorz;
}
}
}
if (sc->floorz <= actor->int_pos().Z)
if (sc->__int_floorz <= actor->int_pos().Z)
{
sc->setfloorz(actor->int_pos().Z);
sc->set_int_floorz(actor->int_pos().Z);
deletesprite(actor);
return;
}
@ -4072,11 +4072,11 @@ void handle_se19(DDukeActor *actor, int BIGFORCE)
}
}
if (sc->ceilingz < sc->floorz)
sc->addceilingz(actor->spr.yvel);
if (sc->__int_ceilingz < sc->__int_floorz)
sc->add_int_ceilingz(actor->spr.yvel);
else
{
sc->setceilingz(sc->floorz);
sc->set_int_ceilingz(sc->__int_floorz);
DukeStatIterator it(STAT_EFFECTOR);
while (auto a2 = it.Next())
@ -4251,7 +4251,7 @@ void handle_se22(DDukeActor* actor)
if (actor->temp_data[1])
{
if (getanimationgoal(anim_ceilingz, &sector[actor->temp_data[0]]) >= 0)
sc->addceilingz(sc->extra * 9);
sc->add_int_ceilingz(sc->extra * 9);
else actor->temp_data[1] = 0;
}
}
@ -4275,11 +4275,11 @@ void handle_se26(DDukeActor* actor)
if (actor->spr.shade > 7)
{
actor->set_int_xy( actor->temp_data[3], actor->temp_data[4]);
sc->addfloorz(-((actor->spr.zvel * actor->spr.shade) - actor->spr.zvel));
sc->add_int_floorz(-((actor->spr.zvel * actor->spr.shade) - actor->spr.zvel));
actor->spr.shade = 0;
}
else
sc->addfloorz(actor->spr.zvel);
sc->add_int_floorz(actor->spr.zvel);
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
@ -4436,27 +4436,27 @@ void handle_se25(DDukeActor* actor, int t_index, int snd1, int snd2)
{
auto sec = actor->sector();
if (sec->floorz <= sec->ceilingz)
if (sec->__int_floorz <= sec->__int_ceilingz)
actor->spr.shade = 0;
else if (sec->ceilingz <= actor->temp_data[t_index])
else if (sec->__int_ceilingz <= actor->temp_data[t_index])
actor->spr.shade = 1;
if (actor->spr.shade)
{
sec->addceilingz(actor->spr.yvel << 4);
if (sec->ceilingz > sec->floorz)
sec->add_int_ceilingz(actor->spr.yvel << 4);
if (sec->__int_ceilingz > sec->__int_floorz)
{
sec->setceilingz(sec->floorz);
sec->set_int_ceilingz(sec->__int_floorz);
if (pistonsound && snd1 >= 0)
S_PlayActorSound(snd1, actor);
}
}
else
{
sec->addceilingz(-actor->spr.yvel << 4);
if (sec->ceilingz < actor->temp_data[t_index])
sec->add_int_ceilingz(-actor->spr.yvel << 4);
if (sec->__int_ceilingz < actor->temp_data[t_index])
{
sec->setceilingz(actor->temp_data[t_index]);
sec->set_int_ceilingz(actor->temp_data[t_index]);
if (pistonsound && snd2 >= 0)
S_PlayActorSound(snd2, actor);
}
@ -4481,49 +4481,49 @@ void handle_se32(DDukeActor *actor)
{
if (actor->spr.ang != 1536)
{
if (abs(sc->ceilingz - actor->int_pos().Z) < (actor->spr.yvel << 1))
if (abs(sc->__int_ceilingz - actor->int_pos().Z) < (actor->spr.yvel << 1))
{
sc->setceilingz(actor->int_pos().Z);
sc->set_int_ceilingz(actor->int_pos().Z);
callsound(actor->sector(), actor);
actor->temp_data[2] = 0;
actor->temp_data[0] = 0;
}
else sc->addceilingz(Sgn(actor->int_pos().Z - sc->ceilingz) * actor->spr.yvel);
else sc->add_int_ceilingz(Sgn(actor->int_pos().Z - sc->__int_ceilingz) * actor->spr.yvel);
}
else
{
if (abs(sc->ceilingz - actor->temp_data[1]) < (actor->spr.yvel << 1))
if (abs(sc->__int_ceilingz - actor->temp_data[1]) < (actor->spr.yvel << 1))
{
sc->setceilingz(actor->temp_data[1]);
sc->set_int_ceilingz(actor->temp_data[1]);
callsound(actor->sector(), actor);
actor->temp_data[2] = 0;
actor->temp_data[0] = 0;
}
else sc->addceilingz(Sgn(actor->temp_data[1] - sc->ceilingz) * actor->spr.yvel);
else sc->add_int_ceilingz(Sgn(actor->temp_data[1] - sc->__int_ceilingz) * actor->spr.yvel);
}
return;
}
if ((actor->spr.ang & 2047) == 1536)
{
if (abs(sc->ceilingz - actor->int_pos().Z) < (actor->spr.yvel << 1))
if (abs(sc->__int_ceilingz - actor->int_pos().Z) < (actor->spr.yvel << 1))
{
actor->temp_data[0] = 0;
actor->temp_data[2] = !actor->temp_data[2];
callsound(actor->sector(), actor);
sc->setceilingz(actor->int_pos().Z);
sc->set_int_ceilingz(actor->int_pos().Z);
}
else sc->addceilingz(Sgn(actor->int_pos().Z - sc->ceilingz) * actor->spr.yvel);
else sc->add_int_ceilingz(Sgn(actor->int_pos().Z - sc->__int_ceilingz) * actor->spr.yvel);
}
else
{
if (abs(sc->ceilingz - actor->temp_data[1]) < (actor->spr.yvel << 1))
if (abs(sc->__int_ceilingz - actor->temp_data[1]) < (actor->spr.yvel << 1))
{
actor->temp_data[0] = 0;
actor->temp_data[2] = !actor->temp_data[2];
callsound(actor->sector(), actor);
}
else sc->addceilingz(-Sgn(actor->int_pos().Z - actor->temp_data[1]) * actor->spr.yvel);
else sc->add_int_ceilingz(-Sgn(actor->int_pos().Z - actor->temp_data[1]) * actor->spr.yvel);
}
}
@ -4539,7 +4539,7 @@ void handle_se35(DDukeActor *actor, int SMALLSMOKE, int EXPLOSION2)
{
auto sc = actor->sector();
if (sc->ceilingz > actor->int_pos().Z)
if (sc->__int_ceilingz > actor->int_pos().Z)
for (int j = 0; j < 8; j++)
{
actor->spr.ang += krand() & 511;
@ -4557,17 +4557,17 @@ void handle_se35(DDukeActor *actor, int SMALLSMOKE, int EXPLOSION2)
switch (actor->temp_data[0])
{
case 0:
sc->addceilingz(actor->spr.yvel);
if (sc->ceilingz > sc->floorz)
sc->setfloorz(sc->ceilingz);
if (sc->ceilingz > actor->int_pos().Z + (32 << 8))
sc->add_int_ceilingz(actor->spr.yvel);
if (sc->__int_ceilingz > sc->__int_floorz)
sc->set_int_floorz(sc->__int_ceilingz);
if (sc->__int_ceilingz > actor->int_pos().Z + (32 << 8))
actor->temp_data[0]++;
break;
case 1:
sc->addceilingz(-(actor->spr.yvel << 2));
if (sc->ceilingz < actor->temp_data[4])
sc->add_int_ceilingz(-(actor->spr.yvel << 2));
if (sc->__int_ceilingz < actor->temp_data[4])
{
sc->setceilingz(actor->temp_data[4]);
sc->set_int_ceilingz(actor->temp_data[4]);
actor->temp_data[0] = 0;
}
break;
@ -4629,7 +4629,7 @@ void handle_se130(DDukeActor *actor, int countmax, int EXPLOSION2)
}
else actor->temp_data[0]++;
int x = sc->floorz - sc->ceilingz;
int x = sc->__int_floorz - sc->__int_ceilingz;
if (rnd(64))
{
@ -4637,7 +4637,7 @@ void handle_se130(DDukeActor *actor, int countmax, int EXPLOSION2)
if (k)
{
k->spr.xrepeat = k->spr.yrepeat = 2 + (krand() & 7);
k->set_int_z(sc->floorz - (krand() % x));
k->set_int_z(sc->__int_floorz - (krand() % x));
k->spr.ang += 256 - (krand() % 511);
k->spr.xvel = krand() & 127;
ssp(k, CLIPMASK0);
@ -4669,9 +4669,9 @@ void handle_se31(DDukeActor* actor, bool choosedir)
{
if (actor->spr.ang != 1536)
{
if (abs(sec->floorz - actor->int_pos().Z) < actor->spr.yvel)
if (abs(sec->__int_floorz - actor->int_pos().Z) < actor->spr.yvel)
{
sec->setfloorz(actor->int_pos().Z);
sec->set_int_floorz(actor->int_pos().Z);
actor->temp_data[2] = 0;
actor->temp_data[0] = 0;
if (choosedir) actor->temp_data[3] = actor->spr.hitag;
@ -4679,8 +4679,8 @@ void handle_se31(DDukeActor* actor, bool choosedir)
}
else
{
int l = Sgn(actor->int_pos().Z - sec->floorz) * actor->spr.yvel;
sec->addfloorz(l);
int l = Sgn(actor->int_pos().Z - sec->__int_floorz) * actor->spr.yvel;
sec->add_int_floorz(l);
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
@ -4691,16 +4691,16 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
a2->floorz = sec->__int_floorz;
}
}
}
}
else
{
if (abs(sec->floorz - actor->temp_data[1]) < actor->spr.yvel)
if (abs(sec->__int_floorz - actor->temp_data[1]) < actor->spr.yvel)
{
sec->setfloorz(actor->temp_data[1]);
sec->set_int_floorz(actor->temp_data[1]);
callsound(actor->sector(), actor);
actor->temp_data[2] = 0;
actor->temp_data[0] = 0;
@ -4708,8 +4708,8 @@ void handle_se31(DDukeActor* actor, bool choosedir)
}
else
{
int l = Sgn(actor->temp_data[1] - sec->floorz) * actor->spr.yvel;
sec->addfloorz(l);
int l = Sgn(actor->temp_data[1] - sec->__int_floorz) * actor->spr.yvel;
sec->add_int_floorz(l);
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
@ -4720,7 +4720,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
a2->floorz = sec->__int_floorz;
}
}
}
@ -4730,7 +4730,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if ((actor->spr.ang & 2047) == 1536)
{
if (abs(actor->int_pos().Z - sec->floorz) < actor->spr.yvel)
if (abs(actor->int_pos().Z - sec->__int_floorz) < actor->spr.yvel)
{
callsound(actor->sector(), actor);
actor->temp_data[0] = 0;
@ -4739,8 +4739,8 @@ void handle_se31(DDukeActor* actor, bool choosedir)
}
else
{
int l = Sgn(actor->int_pos().Z - sec->floorz) * actor->spr.yvel;
sec->addfloorz(l);
int l = Sgn(actor->int_pos().Z - sec->__int_floorz) * actor->spr.yvel;
sec->add_int_floorz(l);
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
@ -4751,14 +4751,14 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(l);
a2->floorz = sec->floorz;
a2->floorz = sec->__int_floorz;
}
}
}
}
else
{
if (abs(sec->floorz - actor->temp_data[1]) < actor->spr.yvel)
if (abs(sec->__int_floorz - actor->temp_data[1]) < actor->spr.yvel)
{
actor->temp_data[0] = 0;
callsound(actor->sector(), actor);
@ -4768,7 +4768,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
else
{
int l = Sgn(actor->int_pos().Z - actor->temp_data[1]) * actor->spr.yvel;
sec->addfloorz(-l);
sec->add_int_floorz(-l);
DukeSectIterator it(actor->sector());
while (auto a2 = it.Next())
@ -4779,7 +4779,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
{
a2->add_int_z(-l);
a2->floorz = sec->floorz;
a2->floorz = sec->__int_floorz;
}
}
}
@ -4829,15 +4829,15 @@ void getglobalz(DDukeActor* actor)
}
else if(actor->spr.statnum == STAT_PROJECTILE && lz.actor()->isPlayer() && actor->GetOwner() == actor)
{
actor->ceilingz = actor->sector()->ceilingz;
actor->floorz = actor->sector()->floorz;
actor->ceilingz = actor->sector()->__int_ceilingz;
actor->floorz = actor->sector()->__int_floorz;
}
}
}
else
{
actor->ceilingz = actor->sector()->ceilingz;
actor->floorz = actor->sector()->floorz;
actor->ceilingz = actor->sector()->__int_ceilingz;
actor->floorz = actor->sector()->__int_floorz;
}
}
@ -4872,8 +4872,8 @@ void makeitfall(DDukeActor* actor)
}
else
{
actor->ceilingz = actor->sector()->ceilingz;
actor->floorz = actor->sector()->floorz;
actor->ceilingz = actor->sector()->__int_ceilingz;
actor->floorz = actor->sector()->__int_floorz;
}
if( actor->int_pos().Z < actor->floorz-(FOURSLEIGHT) )

View file

@ -222,7 +222,7 @@ bool ifsquished(DDukeActor* actor, int p)
return false;
auto sectp = actor->sector();
int floorceildist = sectp->floorz - sectp->ceilingz;
int floorceildist = sectp->__int_floorz - sectp->__int_ceilingz;
if (sectp->lotag != ST_23_SWINGING_DOOR)
{
@ -267,7 +267,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
while (auto dasectp = search.GetNext())
{
if (((dasectp->ceilingz - actor->int_pos().Z) >> 8) < r)
if (((dasectp->__int_ceilingz - actor->int_pos().Z) >> 8) < r)
{
auto wal = dasectp->firstWall();
int d = abs(wal->wall_int_pos().X - actor->int_pos().X) + abs(wal->wall_int_pos().Y - actor->int_pos().Y);
@ -770,14 +770,14 @@ void movefallers_d(void)
x = gs.gravity;
}
if (act->int_pos().Z < (sectp->floorz - FOURSLEIGHT))
if (act->int_pos().Z < (sectp->__int_floorz - FOURSLEIGHT))
{
act->spr.zvel += x;
if (act->spr.zvel > 6144)
act->spr.zvel = 6144;
act->add_int_z(act->spr.zvel);
}
if ((sectp->floorz - act->int_pos().Z) < (16 << 8))
if ((sectp->__int_floorz - act->int_pos().Z) < (16 << 8))
{
j = 1 + (krand() & 7);
for (x = 0; x < j; x++) RANDOMSCRAP(act);
@ -1847,7 +1847,7 @@ void movetransports_d(void)
int k = 0;
if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].pos.Z > (sectp->floorz - (16 << 8)) && (PlayerInput(p, SB_CROUCH) || ps[p].vel.Z > 2048))
if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].pos.Z > (sectp->__int_floorz - (16 << 8)) && (PlayerInput(p, SB_CROUCH) || ps[p].vel.Z > 2048))
// if( onfloorz && sectlotag == 1 && ps[p].pos.z > (sectp->floorz-(6<<8)) )
{
k = 1;
@ -1858,14 +1858,14 @@ void movetransports_d(void)
if (ps[p].GetActor()->spr.extra > 0)
S_PlayActorSound(DUKE_UNDERWATER, act2);
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->ceilingz + (7 << 8);
Owner->sector()->__int_ceilingz + (7 << 8);
ps[p].vel.X = 4096 - (krand() & 8192);
ps[p].vel.Y = 4096 - (krand() & 8192);
}
if (onfloorz && sectlotag == ST_2_UNDERWATER && ps[p].pos.Z < (sectp->ceilingz + (6 << 8)))
if (onfloorz && sectlotag == ST_2_UNDERWATER && ps[p].pos.Z < (sectp->__int_ceilingz + (6 << 8)))
{
k = 1;
// if( act2->spr.extra <= 0) break;
@ -1876,7 +1876,7 @@ void movetransports_d(void)
S_PlayActorSound(DUKE_GASP, act2);
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->floorz - (7 << 8);
Owner->sector()->__int_floorz - (7 << 8);
ps[p].jumping_toggle = 1;
ps[p].jumping_counter = 0;
@ -1934,10 +1934,10 @@ void movetransports_d(void)
{
warpspriteto = 0;
if (ll && sectlotag == 2 && act2->int_pos().Z < (sectp->ceilingz + ll))
if (ll && sectlotag == 2 && act2->int_pos().Z < (sectp->__int_ceilingz + ll))
warpspriteto = 1;
if (ll && sectlotag == 1 && act2->int_pos().Z > (sectp->floorz - ll))
if (ll && sectlotag == 1 && act2->int_pos().Z > (sectp->__int_floorz - ll))
warpspriteto = 1;
if (sectlotag == 0 && (onfloorz || abs(act2->int_pos().Z - act->int_pos().Z) < 4096))
@ -1989,7 +1989,7 @@ void movetransports_d(void)
{
if (act2->spr.statnum == STAT_PROJECTILE || (checkcursectnums(act->sector()) == -1 && checkcursectnums(Owner->sector()) == -1))
{
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X),(Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->floorz) });
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X),(Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->__int_floorz) });
act2->spr.ang = Owner->spr.ang;
act2->backupang();
@ -2022,13 +2022,13 @@ void movetransports_d(void)
break;
case ST_1_ABOVE_WATER:
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->ceilingz + ll);
act2->set_int_z(Owner->sector()->__int_ceilingz + ll);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
break;
case ST_2_UNDERWATER:
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->floorz - ll);
act2->set_int_z(Owner->sector()->__int_floorz - ll);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
break;
@ -2585,7 +2585,7 @@ static void heavyhbomb(DDukeActor *actor)
if (sectp->lotag != 1 && actor->int_pos().Z >= actor->floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
{
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->floorz))
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->__int_floorz))
S_PlayActorSound(PIPEBOMB_BOUNCE, actor);
actor->spr.zvel = -((4 - actor->spr.yvel) << 8);
if (actor->sector()->lotag == 2)
@ -3139,7 +3139,7 @@ void moveexplosions_d(void) // STATNUM 5
case SHELL:
case SHOTGUNSHELL:
shell(act, (sectp->floorz + (24 << 8)) < act->int_pos().Z);
shell(act, (sectp->__int_floorz + (24 << 8)) < act->int_pos().Z);
continue;
case GLASSPIECES:
@ -3436,7 +3436,7 @@ void moveeffectors_d(void) //STATNUM 3
case SE_29_WAVES:
act->spr.hitag += 64;
l = MulScale(act->spr.yvel, bsin(act->spr.hitag), 12);
sc->setfloorz(act->int_pos().Z + l);
sc->set_int_floorz(act->int_pos().Z + l);
break;
case SE_31_FLOOR_RISE_FALL: // True Drop Floor
handle_se31(act, true);
@ -3483,7 +3483,7 @@ void moveeffectors_d(void) //STATNUM 3
auto sc = act->sector();
if (sc->wallnum != 4) continue;
auto wal = sc->firstWall() + 2;
if (wal->nextSector()) alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->floorz);
if (wal->nextSector()) alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->__int_floorz);
}
}

View file

@ -225,7 +225,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
while (auto dasectp = search.GetNext())
{
if (((dasectp->ceilingz - actor->int_pos().Z) >> 8) < r)
if (((dasectp->__int_ceilingz - actor->int_pos().Z) >> 8) < r)
{
auto wal = dasectp->firstWall();
int d = abs(wal->wall_int_pos().X - actor->int_pos().X) + abs(wal->wall_int_pos().Y - actor->int_pos().Y);
@ -689,14 +689,14 @@ void movefallers_r(void)
x = gs.gravity;
}
if (act->int_pos().Z < (sectp->floorz - FOURSLEIGHT))
if (act->int_pos().Z < (sectp->__int_floorz - FOURSLEIGHT))
{
act->spr.zvel += x;
if (act->spr.zvel > 6144)
act->spr.zvel = 6144;
act->add_int_z(act->spr.zvel);
}
if ((sectp->floorz - act->int_pos().Z) < (16 << 8))
if ((sectp->__int_floorz - act->int_pos().Z) < (16 << 8))
{
int j = 1 + (krand() & 7);
for (x = 0; x < j; x++) RANDOMSCRAP(act);
@ -1493,23 +1493,23 @@ void movetransports_r(void)
if (isRRRA())
{
if (onfloorz && sectlotag == 160 && ps[p].pos.Z > (sectp->floorz - (48 << 8)))
if (onfloorz && sectlotag == 160 && ps[p].pos.Z > (sectp->__int_floorz - (48 << 8)))
{
k = 2;
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->ceilingz + (7 << 8);
Owner->sector()->__int_ceilingz + (7 << 8);
}
if (onfloorz && sectlotag == 161 && ps[p].pos.Z < (sectp->ceilingz + (6 << 8)))
if (onfloorz && sectlotag == 161 && ps[p].pos.Z < (sectp->__int_ceilingz + (6 << 8)))
{
k = 2;
if (ps[p].GetActor()->spr.extra <= 0) break;
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->floorz - (49 << 8);
Owner->sector()->__int_floorz - (49 << 8);
}
}
if ((onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].pos.Z > (sectp->floorz - (6 << 8))) ||
if ((onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].pos.Z > (sectp->__int_floorz - (6 << 8))) ||
(onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].OnMotorcycle))
{
if (ps[p].OnBoat) break;
@ -1520,12 +1520,12 @@ void movetransports_r(void)
}
S_PlayActorSound(DUKE_UNDERWATER, ps[p].GetActor());
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->ceilingz + (7 << 8);
Owner->sector()->__int_ceilingz + (7 << 8);
if (ps[p].OnMotorcycle)
ps[p].moto_underwater = 1;
}
if (onfloorz && sectlotag == ST_2_UNDERWATER && ps[p].pos.Z < (sectp->ceilingz + (6 << 8)))
if (onfloorz && sectlotag == ST_2_UNDERWATER && ps[p].pos.Z < (sectp->__int_ceilingz + (6 << 8)))
{
k = 1;
if (ps[p].GetActor()->spr.extra <= 0) break;
@ -1536,7 +1536,7 @@ void movetransports_r(void)
S_PlayActorSound(DUKE_GASP, ps[p].GetActor());
ps[p].opos.Z = ps[p].pos.Z =
Owner->sector()->floorz - (7 << 8);
Owner->sector()->__int_floorz - (7 << 8);
}
if (k == 1)
@ -1587,31 +1587,31 @@ void movetransports_r(void)
{
warpspriteto = 0;
if (ll && sectlotag == ST_2_UNDERWATER && act2->int_pos().Z < (sectp->ceilingz + ll))
if (ll && sectlotag == ST_2_UNDERWATER && act2->int_pos().Z < (sectp->__int_ceilingz + ll))
warpspriteto = 1;
if (ll && sectlotag == ST_1_ABOVE_WATER && act2->int_pos().Z > (sectp->floorz - ll))
if (ll && sectlotag == ST_1_ABOVE_WATER && act2->int_pos().Z > (sectp->__int_floorz - ll))
if (!isRRRA() || (act2->spr.picnum != CHEERBOAT && act2->spr.picnum != HULKBOAT && act2->spr.picnum != MINIONBOAT))
warpspriteto = 1;
if (isRRRA())
{
if (ll && sectlotag == 161 && act2->int_pos().Z < (sectp->ceilingz + ll) && warpdir == 1)
if (ll && sectlotag == 161 && act2->int_pos().Z < (sectp->__int_ceilingz + ll) && warpdir == 1)
{
warpspriteto = 1;
ll2 = ll - abs(act2->int_pos().Z - sectp->ceilingz);
ll2 = ll - abs(act2->int_pos().Z - sectp->__int_ceilingz);
}
else if (sectlotag == 161 && act2->int_pos().Z < (sectp->ceilingz + 1000) && warpdir == 1)
else if (sectlotag == 161 && act2->int_pos().Z < (sectp->__int_ceilingz + 1000) && warpdir == 1)
{
warpspriteto = 1;
ll2 = 1;
}
if (ll && sectlotag == 160 && act2->int_pos().Z > (sectp->floorz - ll) && warpdir == 2)
if (ll && sectlotag == 160 && act2->int_pos().Z > (sectp->__int_floorz - ll) && warpdir == 2)
{
warpspriteto = 1;
ll2 = ll - abs(sectp->floorz - act2->int_pos().Z);
ll2 = ll - abs(sectp->__int_floorz - act2->int_pos().Z);
}
else if (sectlotag == 160 && act2->int_pos().Z > (sectp->floorz - 1000) && warpdir == 2)
else if (sectlotag == 160 && act2->int_pos().Z > (sectp->__int_floorz - 1000) && warpdir == 2)
{
warpspriteto = 1;
ll2 = 1;
@ -1667,7 +1667,7 @@ void movetransports_r(void)
{
if (checkcursectnums(act->sector()) == -1 && checkcursectnums(Owner->sector()) == -1)
{
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->floorz) });
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->__int_floorz) });
act2->spr.ang = Owner->spr.ang;
act2->backupang();
@ -1698,7 +1698,7 @@ void movetransports_r(void)
break;
case ST_1_ABOVE_WATER:
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->ceilingz + ll);
act2->set_int_z(Owner->sector()->__int_ceilingz + ll);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
@ -1706,7 +1706,7 @@ void movetransports_r(void)
break;
case ST_2_UNDERWATER:
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->floorz - ll);
act2->set_int_z(Owner->sector()->__int_floorz - ll);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
@ -1716,7 +1716,7 @@ void movetransports_r(void)
case 160:
if (!isRRRA()) break;
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->ceilingz + ll2);
act2->set_int_z(Owner->sector()->__int_ceilingz + ll2);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
@ -1728,7 +1728,7 @@ void movetransports_r(void)
case 161:
if (!isRRRA()) break;
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), 0 });
act2->set_int_z(Owner->sector()->floorz - ll);
act2->set_int_z(Owner->sector()->__int_floorz - ll);
act2->backupz();
ChangeActorSect(act2, Owner->sector());
@ -1900,7 +1900,7 @@ static void rrra_specialstats()
act->spr.extra = 1;
}
movesprite_ex(act, 0, 0, -300, CLIPMASK0, coll);
if (act->sector()->ceilingz + (4 << 8) > act->int_pos().Z)
if (act->sector()->__int_ceilingz + (4 << 8) > act->int_pos().Z)
{
act->spr.picnum = 0;
act->spr.extra = 100;
@ -1908,7 +1908,7 @@ static void rrra_specialstats()
}
else if (act->spr.extra == 200)
{
SetActor(act, { act->int_pos().X, act->int_pos().Y, act->sector()->floorz - 10 });
SetActor(act, { act->int_pos().X, act->int_pos().Y, act->sector()->__int_floorz - 10 });
act->spr.extra = 1;
act->spr.picnum = PIG + 11;
spawn(act, TRANSPORTERSTAR);
@ -2132,8 +2132,8 @@ void rr_specialstats()
if (act->spr.hitag == 100)
{
act->add_int_z(4 << 8);
if (act->int_pos().Z >= act->sector()->floorz + 15168)
act->set_int_z(act->sector()->floorz + 15168);
if (act->int_pos().Z >= act->sector()->__int_floorz + 15168)
act->set_int_z(act->sector()->__int_floorz + 15168);
}
if (act->spr.picnum == LUMBERBLADE)
@ -2142,7 +2142,7 @@ void rr_specialstats()
if (act->spr.extra == 192)
{
act->spr.hitag = 0;
act->set_int_z(act->sector()->floorz - 15168);
act->set_int_z(act->sector()->__int_floorz - 15168);
act->spr.extra = 0;
act->spr.picnum = RRTILE3410;
DukeStatIterator it2(STAT_DEFAULT);
@ -2346,7 +2346,7 @@ static void heavyhbomb(DDukeActor *actor)
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != 160) && actor->int_pos().Z >= actor->floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
{
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->floorz))
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->__int_floorz))
{
if (actor->spr.picnum != CHEERBOMB)
S_PlayActorSound(PIPEBOMB_BOUNCE, actor);
@ -2687,7 +2687,7 @@ void moveactors_r(void)
act->spr.picnum = RRTILE3192;
break;
case 903:
if (act->int_pos().Z >= sectp->floorz - (8<<8))
if (act->int_pos().Z >= sectp->__int_floorz - (8<<8))
{
deletesprite(act);
continue;
@ -2726,7 +2726,7 @@ void moveactors_r(void)
}
if (sectp->lotag == 903)
{
if (act->int_pos().Z >= sectp->floorz - (4<<8))
if (act->int_pos().Z >= sectp->__int_floorz - (4<<8))
{
deletesprite(act);
continue;
@ -2750,12 +2750,12 @@ void moveactors_r(void)
MulScale(act->spr.xvel, bcos(act->spr.ang), 14),
MulScale(act->spr.xvel, bsin(act->spr.ang), 14),
act->spr.zvel,CLIPMASK0, coll);
if (act->int_pos().Z >= sectp->floorz - (8<<8))
if (act->int_pos().Z >= sectp->__int_floorz - (8<<8))
{
if (sectp->lotag == 1)
{
auto j = spawn(act, WATERSPLASH2);
if (j) j->set_int_z(j->sector()->floorz);
if (j) j->set_int_z(j->sector()->__int_floorz);
}
deletesprite(act);
continue;
@ -2924,7 +2924,7 @@ void moveexplosions_r(void) // STATNUM 5
{
case SHOTGUNSPRITE:
if (act->sector()->lotag == 800)
if (act->int_pos().Z >= act->sector()->floorz - (8 << 8))
if (act->int_pos().Z >= act->sector()->__int_floorz - (8 << 8))
{
deletesprite(act);
continue;
@ -3025,7 +3025,7 @@ void moveexplosions_r(void) // STATNUM 5
if (!money(act, BLOODPOOL)) continue;
if (act->sector()->lotag == 800)
if (act->int_pos().Z >= act->sector()->floorz - (8 << 8))
if (act->int_pos().Z >= act->sector()->__int_floorz - (8 << 8))
{
deletesprite(act);
continue;
@ -3080,7 +3080,7 @@ void moveexplosions_r(void) // STATNUM 5
isRRRA() && (act->spr.picnum == RRTILE2465 || act->spr.picnum == RRTILE2560))) continue;
if (act->sector()->lotag == 800)
if (act->int_pos().Z >= act->sector()->floorz - (8 << 8))
if (act->int_pos().Z >= act->sector()->__int_floorz - (8 << 8))
{
deletesprite(act);
continue;
@ -3092,7 +3092,7 @@ void moveexplosions_r(void) // STATNUM 5
if (!bloodpool(act, false)) continue;
if (act->sector()->lotag == 800)
if (act->int_pos().Z >= act->sector()->floorz - (8 << 8))
if (act->int_pos().Z >= act->sector()->__int_floorz - (8 << 8))
{
deletesprite(act);
}
@ -3163,12 +3163,12 @@ void handle_se06_r(DDukeActor *actor)
auto ns = spawn(actor, HULK);
if (ns)
{
ns->set_int_z(ns->sector()->ceilingz);
ns->set_int_z(ns->sector()->__int_ceilingz);
ns->spr.pal = 33;
}
if (!hulkspawn)
{
ns = EGS(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->sector()->ceilingz + 119428, 3677, -8, 16, 16, 0, 0, 0, actor, 5);
ns = EGS(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->sector()->__int_ceilingz + 119428, 3677, -8, 16, 16, 0, 0, 0, actor, 5);
if (ns)
{
ns->spr.cstat = CSTAT_SPRITE_TRANS_FLIP | CSTAT_SPRITE_TRANSLUCENT;
@ -3181,7 +3181,7 @@ void handle_se06_r(DDukeActor *actor)
{
ns->spr.cstat = 0;
ns->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
ns->set_int_z(actor->sector()->floorz - 6144);
ns->set_int_z(actor->sector()->__int_floorz - 6144);
}
deletesprite(actor);
return;
@ -3221,7 +3221,7 @@ void handle_se06_r(DDukeActor *actor)
}
else pn = UFO1_RRRA;
auto ns = spawn(actor, pn);
if (ns) ns->set_int_z(ns->sector()->ceilingz);
if (ns) ns->set_int_z(ns->sector()->__int_ceilingz);
}
}
}
@ -3397,7 +3397,7 @@ void moveeffectors_r(void) //STATNUM 3
case SE_29_WAVES:
act->spr.hitag += 64;
l = MulScale(act->spr.yvel, bsin(act->spr.hitag), 12);
sc->setfloorz(act->int_pos().Z + l);
sc->set_int_floorz(act->int_pos().Z + l);
break;
case SE_31_FLOOR_RISE_FALL: // True Drop Floor
@ -3445,7 +3445,7 @@ void moveeffectors_r(void) //STATNUM 3
auto sc = act->sector();
if (sc->wallnum != 4) continue;
auto wal = sc->firstWall() + 2;
alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->floorz);
alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->__int_floorz);
}
}
@ -3945,8 +3945,8 @@ void destroyit(DDukeActor *actor)
destwal->nextWall()->cstat = 0;
}
}
destsect->setfloorz(srcsect->floorz);
destsect->setceilingz(srcsect->ceilingz);
destsect->set_int_floorz(srcsect->__int_floorz);
destsect->set_int_ceilingz(srcsect->__int_ceilingz);
destsect->ceilingstat = srcsect->ceilingstat;
destsect->floorstat = srcsect->floorstat;
destsect->ceilingpicnum = srcsect->ceilingpicnum;

View file

@ -571,7 +571,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
int daz;
if ((sectp->lotag & 0xff) > 2 || h->spr.statnum == 4 || h->spr.statnum == 5 || h->spr.picnum == DRONE || h->spr.picnum == COMMANDER)
daz = sectp->floorz;
daz = sectp->__int_floorz;
else
daz = h->floorz;
@ -654,7 +654,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case BURNING2:
if (!OwnerAc) break;
if (!actorflag(OwnerAc, SFLAG_NOFLOORFIRE))
t->set_int_z(t->sectp->floorz);
t->set_int_z(t->sectp->__int_floorz);
t->shade = -127;
break;
case COOLEXPLOSION1:

View file

@ -729,7 +729,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (isRRRA() && sectp->lotag == 160) continue;
if ((sectp->lotag & 0xff) > 2 || h->spr.statnum == 4 || h->spr.statnum == 5 || h->spr.picnum == DRONE)
daz = sectp->floorz;
daz = sectp->__int_floorz;
else
daz = h->floorz;
@ -813,7 +813,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case FIRE:
case BURNING:
if (!OwnerAc || !actorflag(OwnerAc, SFLAG_NOFLOORFIRE))
t->set_int_z(t->sectp->floorz);
t->set_int_z(t->sectp->__int_floorz);
t->shade = -127;
break;
case WALLLIGHT3:

View file

@ -63,7 +63,7 @@ void pinsectorresetdown(sectortype* sec)
if (j == -1)
{
j = sec->floorz;
j = sec->__int_floorz;
setanimation(sec, anim_ceilingz, sec, j, 64);
}
}
@ -74,7 +74,7 @@ int pinsectorresetup(sectortype* sec)
if (j == -1)
{
j = nextsectorneighborzptr(sec, sec->ceilingz, Find_CeilingUp | Find_Safe)->ceilingz;
j = nextsectorneighborzptr(sec, sec->__int_ceilingz, Find_CeilingUp | Find_Safe)->__int_ceilingz;
setanimation(sec, anim_ceilingz, sec, j, 64);
return 1;
}

View file

@ -1062,12 +1062,12 @@ void DoSector(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
if (!bSet) SetGameVarID(lVar2, sectp->wallnum, sActor, sPlayer);
break;
case SECTOR_CEILINGZ:
if (bSet) sectp->setceilingz(lValue);
else SetGameVarID(lVar2, sectp->ceilingz, sActor, sPlayer);
if (bSet) sectp->set_int_ceilingz(lValue);
else SetGameVarID(lVar2, sectp->__int_ceilingz, sActor, sPlayer);
break;
case SECTOR_FLOORZ:
if (bSet) sectp->setfloorz(lValue);
else SetGameVarID(lVar2, sectp->floorz, sActor, sPlayer);
if (bSet) sectp->set_int_floorz(lValue);
else SetGameVarID(lVar2, sectp->__int_floorz, sActor, sPlayer);
break;
case SECTOR_CEILINGSTAT:
if (bSet) sectp->ceilingstat = ESectorFlags::FromInt(lValue);
@ -1993,7 +1993,7 @@ int ParseState::parse(void)
break;
case concmd_larrybird:
insptr++;
ps[g_p].pos.Z = ps[g_p].GetActor()->sector()->ceilingz;
ps[g_p].pos.Z = ps[g_p].GetActor()->sector()->__int_ceilingz;
ps[g_p].GetActor()->set_int_z(ps[g_p].pos.Z);
break;
case concmd_destroyit:
@ -2290,10 +2290,10 @@ int ParseState::parse(void)
parseifelse(ud.coop || numplayers > 2);
break;
case concmd_ifonmud:
parseifelse(abs(g_ac->int_pos().Z - g_ac->sector()->floorz) < (32 << 8) && g_ac->sector()->floorpicnum == 3073); // eew, hard coded tile numbers.. :?
parseifelse(abs(g_ac->int_pos().Z - g_ac->sector()->__int_floorz) < (32 << 8) && g_ac->sector()->floorpicnum == 3073); // eew, hard coded tile numbers.. :?
break;
case concmd_ifonwater:
parseifelse( abs(g_ac->int_pos().Z-g_ac->sector()->floorz) < (32<<8) && g_ac->sector()->lotag == ST_1_ABOVE_WATER);
parseifelse( abs(g_ac->int_pos().Z-g_ac->sector()->__int_floorz) < (32<<8) && g_ac->sector()->lotag == ST_1_ABOVE_WATER);
break;
case concmd_ifmotofast:
parseifelse(ps[g_p].MotoSpeed > 60);
@ -2502,7 +2502,7 @@ int ParseState::parse(void)
if (sectp)
{
if (isanearoperator(sectp->lotag))
if ((sectp->lotag & 0xff) == ST_23_SWINGING_DOOR || sectp->floorz == sectp->ceilingz)
if ((sectp->lotag & 0xff) == ST_23_SWINGING_DOOR || sectp->__int_floorz == sectp->__int_ceilingz)
if ((sectp->lotag & 16384) == 0 && (sectp->lotag & 32768) == 0)
{
DukeSectIterator it(sectp);

View file

@ -1029,7 +1029,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
((hit.hitWall->twoSided() && hit.hitSector != nullptr &&
hit.hitWall->nextSector()->lotag == 0 &&
hit.hitSector->lotag == 0 &&
(hit.hitSector->floorz - hit.hitWall->nextSector()->floorz) > (16 << 8)) ||
(hit.hitSector->__int_floorz - hit.hitWall->nextSector()->__int_floorz) > (16 << 8)) ||
(!hit.hitWall->twoSided() && hit.hitSector->lotag == 0)))
{
if ((hit.hitWall->cstat & CSTAT_WALL_MASKED) == 0)

View file

@ -278,7 +278,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
{
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
if (hit.hitWall->twoSided())
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->floorz))
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->__int_floorz))
hit.hitWall =hit.hitWall->nextWall();
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
@ -522,7 +522,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
if (hit.hitWall->twoSided())
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->floorz))
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->__int_floorz))
hit.hitWall = hit.hitWall->nextWall();
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);

View file

@ -119,11 +119,11 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
ny = hit.hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
if (hit.hitSector->lotag == 161)
{
nz = effector->GetOwner()->sector()->floorz;
nz = effector->GetOwner()->sector()->__int_floorz;
}
else
{
nz = effector->GetOwner()->sector()->ceilingz;
nz = effector->GetOwner()->sector()->__int_ceilingz;
}
hitscan({ nx, ny, nz }, effector->GetOwner()->sector(), { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
break;
@ -170,7 +170,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
{
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
if (hit.hitWall->twoSided())
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->floorz))
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->__int_floorz))
hit.hitWall = hit.hitWall->nextWall();
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
@ -274,11 +274,11 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
ny = hit.hitpos.Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
if (hit.hitSector->lotag == 161)
{
nz = effector->GetOwner()->sector()->floorz;
nz = effector->GetOwner()->sector()->__int_floorz;
}
else
{
nz = effector->GetOwner()->sector()->ceilingz;
nz = effector->GetOwner()->sector()->__int_ceilingz;
}
hitscan({ nx, ny, nz }, effector->GetOwner()->sector(), { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
break;
@ -421,7 +421,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
if (hit.hitWall->cstat & CSTAT_WALL_BOTTOM_SWAP)
if (hit.hitWall->twoSided())
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->floorz))
if (hit.hitpos.Z >= (hit.hitWall->nextSector()->__int_floorz))
hit.hitWall = hit.hitWall->nextWall();
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, SHOTSPARK1);
@ -3959,7 +3959,7 @@ HORIZONLY:
break;
}
if (ud.clipping == 0 && (!p->cursector || (p->cursector && p->cursector->ceilingz > (p->cursector->floorz - (12 << 8)))))
if (ud.clipping == 0 && (!p->cursector || (p->cursector && p->cursector->__int_ceilingz > (p->cursector->__int_floorz - (12 << 8)))))
{
quickkill(p);
return;

View file

@ -726,7 +726,7 @@ void prelevel_common(int g)
{
case 20:
case 22:
if (sectp->floorz > sectp->ceilingz)
if (sectp->__int_floorz > sectp->__int_ceilingz)
sectp->lotag |= 32768;
continue;
}

View file

@ -282,9 +282,9 @@ double getanimatevalue(int type, int index)
switch (type)
{
case anim_floorz:
return sector[index].floorz;
return sector[index].__int_floorz;
case anim_ceilingz:
return sector[index].ceilingz;
return sector[index].__int_ceilingz;
case anim_vertexx:
return wall[index].wall_int_pos().X;
case anim_vertexy:
@ -312,10 +312,10 @@ void setanimatevalue(int type, int index, double value)
switch (type)
{
case anim_floorz:
sector[index].setfloorz((int)value);
sector[index].set_int_floorz((int)value);
break;
case anim_ceilingz:
sector[index].setceilingz((int)value);
sector[index].set_int_ceilingz((int)value);
break;
case anim_vertexx:
@ -381,7 +381,7 @@ void doanimations(void)
{
for (p = connecthead; p >= 0; p = connectpoint2[p])
if (ps[p].cursector == dasectp)
if ((dasectp->floorz - ps[p].pos.Z) < (64 << 8))
if ((dasectp->__int_floorz - ps[p].pos.Z) < (64 << 8))
if (ps[p].GetActor()->GetOwner() != nullptr)
{
ps[p].pos.Z += v;
@ -395,7 +395,7 @@ void doanimations(void)
{
act->backupz();
act->add_int_z(v);
act->floorz = dasectp->floorz + v;
act->floorz = dasectp->__int_floorz + v;
}
}
}
@ -491,7 +491,7 @@ bool activatewarpelevators(DDukeActor* actor, int d) //Parm = sectoreffectornum
{
if (act2->spr.lotag == SE_17_WARP_ELEVATOR || (isRRRA() && act2->spr.lotag == SE_18_INCREMENTAL_SECTOR_RISE_FALL))
if (act2->spr.hitag == actor->spr.hitag)
if ((abs(sect->floorz - actor->temp_data[2]) > act2->spr.yvel) ||
if ((abs(sect->__int_floorz - actor->temp_data[2]) > act2->spr.yvel) ||
(act2->sector()->hitag == (sect->hitag - d)))
break;
}
@ -640,7 +640,7 @@ static void handle_st15(sectortype* sptr, DDukeActor* actor)
}
else
{
if (sptr->floorz > a2->int_pos().Z)
if (sptr->__int_floorz > a2->int_pos().Z)
activatewarpelevators(a2, -1);
else
activatewarpelevators(a2, 1);
@ -660,16 +660,16 @@ static void handle_st16(sectortype* sptr, DDukeActor* actor)
if (i == -1)
{
sectp = nextsectorneighborzptr(sptr, sptr->floorz, Find_FloorDown);
sectp = nextsectorneighborzptr(sptr, sptr->__int_floorz, Find_FloorDown);
if (sectp == nullptr)
{
sectp = nextsectorneighborzptr(sptr, sptr->floorz, Find_FloorUp);
sectp = nextsectorneighborzptr(sptr, sptr->__int_floorz, Find_FloorUp);
if (sectp == nullptr) return;
setanimation(sptr, anim_floorz, sptr, sectp->floorz, sptr->extra);
setanimation(sptr, anim_floorz, sptr, sectp->__int_floorz, sptr->extra);
}
else
{
setanimation(sptr, anim_floorz, sptr, sectp->floorz, sptr->extra);
setanimation(sptr, anim_floorz, sptr, sectp->__int_floorz, sptr->extra);
}
callsound(sptr, actor);
}
@ -687,12 +687,12 @@ static void handle_st18(sectortype* sptr, DDukeActor* actor)
if (i == -1)
{
auto sectp = nextsectorneighborzptr(sptr, sptr->floorz, Find_FloorUp);
if (sectp == nullptr) sectp = nextsectorneighborzptr(sptr, sptr->floorz, Find_FloorDown);
auto sectp = nextsectorneighborzptr(sptr, sptr->__int_floorz, Find_FloorUp);
if (sectp == nullptr) sectp = nextsectorneighborzptr(sptr, sptr->__int_floorz, Find_FloorDown);
if (sectp == nullptr) return;
int j = sectp->floorz;
int j = sectp->__int_floorz;
int q = sptr->extra;
int l = sptr->ceilingz - sptr->floorz;
int l = sptr->__int_ceilingz - sptr->__int_floorz;
setanimation(sptr, anim_floorz, sptr, j, q);
setanimation(sptr, anim_ceilingz, sptr, j + l, q);
callsound(sptr, actor);
@ -710,9 +710,9 @@ static void handle_st29(sectortype* sptr, DDukeActor* actor)
int j;
if (sptr->lotag & 0x8000)
j = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_FloorDown | Find_Safe)->floorz;
j = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_FloorDown | Find_Safe)->__int_floorz;
else
j = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_CeilingUp | Find_Safe)->ceilingz;
j = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_CeilingUp | Find_Safe)->__int_ceilingz;
DukeStatIterator it(STAT_EFFECTOR);
while (auto act2 = it.Next())
@ -758,13 +758,13 @@ REDODOOR:
}
}
if (a2 == nullptr)
j = sptr->floorz;
j = sptr->__int_floorz;
}
else
{
auto sectp = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_CeilingUp);
auto sectp = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_CeilingUp);
if (sectp) j = sectp->ceilingz;
if (sectp) j = sectp->__int_ceilingz;
else
{
sptr->lotag |= 32768;
@ -790,16 +790,16 @@ static void handle_st21(sectortype* sptr, DDukeActor* actor)
int j;
if (i >= 0)
{
if (animategoal[i] == sptr->ceilingz)
animategoal[i] = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_FloorDown | Find_Safe)->floorz;
else animategoal[i] = sptr->ceilingz;
if (animategoal[i] == sptr->__int_ceilingz)
animategoal[i] = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_FloorDown | Find_Safe)->__int_floorz;
else animategoal[i] = sptr->__int_ceilingz;
j = animategoal[i];
}
else
{
if (sptr->ceilingz == sptr->floorz)
j = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_FloorDown | Find_Safe)->floorz;
else j = sptr->ceilingz;
if (sptr->__int_ceilingz == sptr->__int_floorz)
j = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_FloorDown | Find_Safe)->__int_floorz;
else j = sptr->__int_ceilingz;
sptr->lotag ^= 0x8000;
@ -819,15 +819,15 @@ static void handle_st22(sectortype* sptr, DDukeActor* actor)
int j, q;
if ((sptr->lotag & 0x8000))
{
q = (sptr->ceilingz + sptr->floorz) >> 1;
q = (sptr->__int_ceilingz + sptr->__int_floorz) >> 1;
j = setanimation(sptr, anim_floorz, sptr, q, sptr->extra);
j = setanimation(sptr, anim_ceilingz, sptr, q, sptr->extra);
}
else
{
q = nextsectorneighborzptr(sptr, sptr->floorz, Find_FloorDown | Find_Safe)->floorz;
q = nextsectorneighborzptr(sptr, sptr->__int_floorz, Find_FloorDown | Find_Safe)->__int_floorz;
j = setanimation(sptr, anim_floorz, sptr, q, sptr->extra);
q = nextsectorneighborzptr(sptr, sptr->ceilingz, Find_CeilingUp | Find_Safe)->ceilingz;
q = nextsectorneighborzptr(sptr, sptr->__int_ceilingz, Find_CeilingUp | Find_Safe)->__int_ceilingz;
j = setanimation(sptr, anim_ceilingz, sptr, q, sptr->extra);
}
@ -1154,13 +1154,13 @@ void operateactivators(int low, int plnum)
case 0:
break;
case 1:
if (act->sector()->floorz != act->sector()->ceilingz)
if (act->sector()->__int_floorz != act->sector()->__int_ceilingz)
{
continue;
}
break;
case 2:
if (act->sector()->floorz == act->sector()->ceilingz)
if (act->sector()->__int_floorz == act->sector()->__int_ceilingz)
{
continue;
}
@ -1276,8 +1276,8 @@ void allignwarpelevators(void)
{
if ((act2->spr.lotag) == SE_17_WARP_ELEVATOR && act != act2 && act->spr.hitag == act2->spr.hitag)
{
act2->sector()->setfloorz(act->sector()->floorz);
act2->sector()->setceilingz(act->sector()->ceilingz);
act2->sector()->set_int_floorz(act->sector()->__int_floorz);
act2->sector()->set_int_ceilingz(act->sector()->__int_ceilingz);
}
}
}

View file

@ -655,8 +655,8 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, int x, int y, int z, int atw
}
if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == BIGFORCE) && wal->twoSided())
if (wal->nextSector()->floorz > z)
if (wal->nextSector()->floorz - wal->nextSector()->ceilingz)
if (wal->nextSector()->__int_floorz > z)
if (wal->nextSector()->__int_floorz - wal->nextSector()->__int_ceilingz)
switch (wal->overpicnum)
{
case W_FORCEFIELD:
@ -1132,7 +1132,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
if (gs.actorinfo[SHOTSPARK1].scriptaddress && proj->spr.extra != ScriptCode[gs.actorinfo[SHOTSPARK1].scriptaddress])
{
for (j = 0; j < 15; j++)
EGS(targ->sector(), targ->int_pos().X, targ->int_pos().Y, targ->sector()->floorz - (12 << 8) - (j << 9), SCRAP1 + (krand() & 15), -8, 64, 64,
EGS(targ->sector(), targ->int_pos().X, targ->int_pos().Y, targ->sector()->__int_floorz - (12 << 8) - (j << 9), SCRAP1 + (krand() & 15), -8, 64, 64,
krand() & 2047, (krand() & 127) + 64, -(krand() & 511) - 256, targ, 5);
spawn(targ, EXPLOSION2);
deletesprite(targ);
@ -1288,7 +1288,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
}
{
auto spawned = spawn(targ, STEAM);
if (spawned) spawned->set_int_z(targ->sector()->floorz - (32 << 8));
if (spawned) spawned->set_int_z(targ->sector()->__int_floorz - (32 << 8));
}
break;

View file

@ -965,7 +965,7 @@ static void lotsofpopcorn(DDukeActor *actor, walltype* wal, int n)
updatesector(x1, y1, &sect);
if (sect)
{
z = sect->floorz - (krand() & (abs(sect->ceilingz - sect->floorz)));
z = sect->__int_floorz - (krand() & (abs(sect->__int_ceilingz - sect->__int_floorz)));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.ang - 1024;
@ -996,8 +996,8 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, int x, int y, int z, int atw
}
if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == BIGFORCE) && wal->twoSided())
if (wal->nextSector()->floorz > z)
if (wal->nextSector()->floorz - wal->nextSector()->ceilingz)
if (wal->nextSector()->__int_floorz > z)
if (wal->nextSector()->__int_floorz - wal->nextSector()->__int_ceilingz)
switch (wal->overpicnum)
{
case FANSPRITE:
@ -2158,7 +2158,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
if (gs.actorinfo[SHOTSPARK1].scriptaddress && proj->spr.extra != ScriptCode[gs.actorinfo[SHOTSPARK1].scriptaddress])
{
for (j = 0; j < 15; j++)
EGS(targ->sector(), targ->int_pos().X, targ->int_pos().Y, targ->sector()->floorz - (12 << 8) - (j << 9), SCRAP1 + (krand() & 15), -8, 64, 64,
EGS(targ->sector(), targ->int_pos().X, targ->int_pos().Y, targ->sector()->__int_floorz - (12 << 8) - (j << 9), SCRAP1 + (krand() & 15), -8, 64, 64,
krand() & 2047, (krand() & 127) + 64, -(krand() & 511) - 256, targ, 5);
spawn(targ, EXPLOSION2);
deletesprite(targ);
@ -2284,7 +2284,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
}
{
auto spawned = spawn(targ, STEAM);
if (spawned) spawned->set_int_z(targ->sector()->floorz - (32 << 8));
if (spawned) spawned->set_int_z(targ->sector()->__int_floorz - (32 << 8));
}
break;

View file

@ -150,8 +150,8 @@ bool initspriteforspawn(DDukeActor* act)
act->movflag = 0;
act->tempang = 0;
act->dispicnum = 0;
act->floorz = act->sector()->floorz;
act->ceilingz = act->sector()->ceilingz;
act->floorz = act->sector()->__int_floorz;
act->ceilingz = act->sector()->__int_ceilingz;
act->ovel.X = 0;
act->ovel.Y = 0;
@ -303,7 +303,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
{
act->spr.xrepeat = 31;
act->spr.yrepeat = 1;
act->set_int_z(actj->sector()->floorz - (isRR() ? PHEIGHT_RR : PHEIGHT_DUKE));
act->set_int_z(actj->sector()->__int_floorz - (isRR() ? PHEIGHT_RR : PHEIGHT_DUKE));
}
else
{
@ -342,16 +342,16 @@ int spawnbloodpoolpart1(DDukeActor* act)
auto s1 = act->sector();
updatesector(act->int_pos().X + 108, act->int_pos().Y + 108, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X - 108, act->int_pos().Y - 108, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X + 108, act->int_pos().Y - 108, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X - 108, act->int_pos().Y + 108, &s1);
if (s1 && s1->floorz != act->sector()->floorz)
if (s1 && s1->__int_floorz != act->sector()->__int_floorz)
{
act->spr.xrepeat = act->spr.yrepeat = 0; ChangeActorStat(act, STAT_MISC); return true;
}
@ -384,16 +384,16 @@ void initfootprint(DDukeActor* actj, DDukeActor* act)
auto s1 = act->sector();
updatesector(act->int_pos().X + 84, act->int_pos().Y + 84, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X - 84, act->int_pos().Y - 84, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X + 84, act->int_pos().Y - 84, &s1);
if (s1 && s1->floorz == act->sector()->floorz)
if (s1 && s1->__int_floorz == act->sector()->__int_floorz)
{
updatesector(act->int_pos().X - 84, act->int_pos().Y + 84, &s1);
if (s1 && s1->floorz != act->sector()->floorz)
if (s1 && s1->__int_floorz != act->sector()->__int_floorz)
{
act->spr.xrepeat = act->spr.yrepeat = 0; ChangeActorStat(act, STAT_MISC); return;
}
@ -409,7 +409,7 @@ void initfootprint(DDukeActor* actj, DDukeActor* act)
act->spr.ang = actj->spr.ang;
}
act->set_int_z(sect->floorz);
act->set_int_z(sect->__int_floorz);
if (sect->lotag != 1 && sect->lotag != 2)
act->spr.xrepeat = act->spr.yrepeat = 32;
@ -478,7 +478,7 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_ONE_SIDE;
act->spr.picnum += 2;
act->set_int_z(sect->ceilingz + (48 << 8));
act->set_int_z(sect->__int_ceilingz + (48 << 8));
act->temp_data[4] = cranes.Reserve(1);
auto& apt = cranes[act->temp_data[4]];
@ -628,7 +628,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
}
else actor->SetOwner(actor);
actor->temp_data[4] = sectp->floorz == actor->int_pos().Z;
actor->temp_data[4] = sectp->__int_floorz == actor->int_pos().Z;
actor->spr.cstat = 0;
ChangeActorStat(actor, STAT_TRANSPORT);
return;
@ -640,15 +640,15 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
if (actor->spr.ang == 512)
{
actor->temp_data[1] = sectp->ceilingz;
actor->temp_data[1] = sectp->__int_ceilingz;
if (actor->spr.pal)
sectp->setceilingz(actor->int_pos().Z);
sectp->set_int_ceilingz(actor->int_pos().Z);
}
else
{
actor->temp_data[1] = sectp->floorz;
actor->temp_data[1] = sectp->__int_floorz;
if (actor->spr.pal)
sectp->setfloorz(actor->int_pos().Z);
sectp->set_int_floorz(actor->int_pos().Z);
}
actor->spr.hitag <<= 2;
@ -660,17 +660,17 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
case SE_25_PISTON: // Pistons
if (!isRR())
{
actor->temp_data[3] = sectp->ceilingz;
actor->temp_data[3] = sectp->__int_ceilingz;
actor->temp_data[4] = 1;
}
else
actor->temp_data[4] = sectp->ceilingz;
actor->temp_data[4] = sectp->__int_ceilingz;
sectp->setceilingz(actor->int_pos().Z);
sectp->set_int_ceilingz(actor->int_pos().Z);
StartInterpolation(sectp, Interp_Sect_Ceilingz);
break;
case SE_35:
sectp->setceilingz(actor->int_pos().Z);
sectp->set_int_ceilingz(actor->int_pos().Z);
break;
case SE_27_DEMO_CAM:
if (ud.recstat == 1)
@ -691,8 +691,8 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
case SE_13_EXPLOSIVE:
{
actor->temp_data[0] = sectp->ceilingz;
actor->temp_data[1] = sectp->floorz;
actor->temp_data[0] = sectp->__int_ceilingz;
actor->temp_data[1] = sectp->__int_floorz;
bool ceiling = (abs(actor->temp_data[0] - actor->int_pos().Z) < abs(actor->temp_data[1] - actor->int_pos().Z));
actor->spriteextra = ceiling;
@ -700,14 +700,14 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
if (actor->spr.ang == 512)
{
if (ceiling)
sectp->setceilingz(actor->int_pos().Z);
sectp->set_int_ceilingz(actor->int_pos().Z);
else
sectp->setfloorz(actor->int_pos().Z);
sectp->set_int_floorz(actor->int_pos().Z);
}
else
{
sectp->setceilingz(actor->int_pos().Z);
sectp->setfloorz(actor->int_pos().Z);
sectp->set_int_ceilingz(actor->int_pos().Z);
sectp->set_int_floorz(actor->int_pos().Z);
}
if (sectp->ceilingstat & CSTAT_SECTOR_SKY)
@ -746,9 +746,9 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
}
case SE_17_WARP_ELEVATOR:
{
actor->temp_data[2] = sectp->floorz; //Stopping loc
actor->temp_data[3] = nextsectorneighborzptr(sectp, sectp->floorz, Find_CeilingUp | Find_Safe)->ceilingz;
actor->temp_data[4] = nextsectorneighborzptr(sectp, sectp->ceilingz, Find_FloorDown | Find_Safe)->floorz;
actor->temp_data[2] = sectp->__int_floorz; //Stopping loc
actor->temp_data[3] = nextsectorneighborzptr(sectp, sectp->__int_floorz, Find_CeilingUp | Find_Safe)->__int_ceilingz;
actor->temp_data[4] = nextsectorneighborzptr(sectp, sectp->__int_ceilingz, Find_FloorDown | Find_Safe)->__int_floorz;
if (numplayers < 2)
{
@ -831,9 +831,9 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
break;
case SE_31_FLOOR_RISE_FALL:
actor->temp_data[1] = sectp->floorz;
actor->temp_data[1] = sectp->__int_floorz;
// actor->temp_data[2] = actor->spr.hitag;
if (actor->spr.ang != 1536) sectp->setfloorz(actor->int_pos().Z);
if (actor->spr.ang != 1536) sectp->set_int_floorz(actor->int_pos().Z);
for (auto& wal : wallsofsector(sectp))
if (wal.hitag == 0) wal.hitag = 9999;
@ -842,9 +842,9 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
break;
case SE_32_CEILING_RISE_FALL:
actor->temp_data[1] = sectp->ceilingz;
actor->temp_data[1] = sectp->__int_ceilingz;
actor->temp_data[2] = actor->spr.hitag;
if (actor->spr.ang != 1536) sectp->setceilingz(actor->int_pos().Z);
if (actor->spr.ang != 1536) sectp->set_int_ceilingz(actor->int_pos().Z);
for (auto& wal : wallsofsector(sectp))
if (wal.hitag == 0) wal.hitag = 9999;
@ -867,7 +867,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
case SE_9_DOWN_OPEN_DOOR_LIGHTS:
if (sectp->lotag &&
labs(sectp->ceilingz - actor->int_pos().Z) > 1024)
labs(sectp->__int_ceilingz - actor->int_pos().Z) > 1024)
sectp->lotag |= 32768; //If its open
[[fallthrough]];
case SE_8_UP_OPEN_DOOR_LIGHTS:
@ -918,7 +918,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
{
if (actor->spr.pal) actor->spr.clipdist = 1;
else actor->spr.clipdist = 0;
actor->temp_data[3] = sectp->floorz;
actor->temp_data[3] = sectp->__int_floorz;
sectp->hitagactor = actor;
}
@ -996,7 +996,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
}
else if (actor->spr.lotag == SE_16_REACTOR)
actor->temp_data[3] = sectp->ceilingz;
actor->temp_data[3] = sectp->__int_ceilingz;
else if (actor->spr.lotag == SE_26)
{
@ -1110,7 +1110,7 @@ void lotsofglass(DDukeActor *actor, walltype* wal, int n)
updatesector(x1, y1, &sect);
if (sect)
{
z = sect->floorz - (krand() & (abs(sect->ceilingz - sect->floorz)));
z = sect->__int_floorz - (krand() & (abs(sect->__int_ceilingz - sect->__int_floorz)));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.ang - 1024;
@ -1159,7 +1159,7 @@ void ceilingglass(DDukeActor* actor, sectortype* sectp, int n)
x1 += delta.X;
y1 += delta.Y;
a = krand() & 2047;
z = sectp->ceilingz + ((krand() & 15) << 8);
z = sectp->__int_ceilingz + ((krand() & 15) << 8);
EGS(sectp, x1, y1, z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, (krand() & 31), 0, actor, 5);
}
}
@ -1199,7 +1199,7 @@ void lotsofcolourglass(DDukeActor* actor, walltype* wal, int n)
y1 += delta.Y;
updatesector(x1, y1, &sect);
z = sect->floorz - (krand() & (abs(sect->ceilingz - sect->floorz)));
z = sect->__int_floorz - (krand() & (abs(sect->__int_ceilingz - sect->__int_floorz)));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.ang - 1024;

View file

@ -718,9 +718,9 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 6);
break;
case TOUCHPLATE:
act->temp_data[2] = sectp->floorz;
act->temp_data[2] = sectp->__int_floorz;
if (sectp->lotag != 1 && sectp->lotag != 2)
sectp->setfloorz(act->int_pos().Z);
sectp->set_int_floorz(act->int_pos().Z);
if (!isWorldTour())
{
if (act->spr.pal && ud.multimode > 1)

View file

@ -715,9 +715,9 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 6);
break;
case TOUCHPLATE:
act->temp_data[2] = sectp->floorz;
act->temp_data[2] = sectp->__int_floorz;
if (sectp->lotag != 1 && sectp->lotag != 2)
sectp->setfloorz(act->int_pos().Z);
sectp->set_int_floorz(act->int_pos().Z);
if (act->spr.pal && ud.multimode > 1)
{
act->spr.xrepeat = act->spr.yrepeat = 0;

View file

@ -234,7 +234,7 @@ void BuildExplosion(DExhumedActor* pActor)
{
edx = 75;
}
else if (pActor->int_pos().Z == pActor->sector()->floorz)
else if (pActor->int_pos().Z == pActor->sector()->__int_floorz)
{
edx = 34;
}
@ -272,7 +272,7 @@ void BuildSplash(DExhumedActor* pActor, sectortype* pSector)
nFlag = 0;
}
auto pSpawned = BuildAnim(nullptr, edx, 0, pActor->int_pos().X, pActor->int_pos().Y, pSector->floorz, pSector, nRepeat, nFlag);
auto pSpawned = BuildAnim(nullptr, edx, 0, pActor->int_pos().X, pActor->int_pos().Y, pSector->__int_floorz, pSector, nRepeat, nFlag);
if (!bIsLava)
{

View file

@ -55,7 +55,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
x = ap->int_pos().X;
y = ap->int_pos().Y;
z = ap->sector()->floorz;
z = ap->sector()->__int_floorz;
nAngle = ap->spr.ang;
}
@ -397,7 +397,7 @@ void AIAnubis::Damage(RunListEvent* ev)
{
auto pDrumActor = insertActor(ap->sector(), kStatAnubisDrum);
pDrumActor->set_int_pos({ ap->int_pos().X, ap->int_pos().Y, pDrumActor->sector()->floorz });
pDrumActor->set_int_pos({ ap->int_pos().X, ap->int_pos().Y, pDrumActor->sector()->__int_floorz });
pDrumActor->spr.xrepeat = 40;
pDrumActor->spr.yrepeat = 40;
pDrumActor->spr.shade = -64;
@ -420,7 +420,7 @@ void AIAnubis::Damage(RunListEvent* ev)
ap->spr.xvel = 0;
ap->spr.yvel = 0;
ap->spr.zvel = 0;
ap->set_int_z(ap->sector()->floorz);
ap->set_int_z(ap->sector()->__int_floorz);
ap->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
ap->nHealth = 0;

View file

@ -91,12 +91,12 @@ void AIBubble::Tick(RunListEvent* ev)
auto pSector = pActor->sector();
if (pActor->int_pos().Z <= pSector->ceilingz)
if (pActor->int_pos().Z <= pSector->__int_ceilingz)
{
auto pSectAbove = pSector->pAbove;
if (pActor->spr.hitag > -1 && pSectAbove != nullptr) {
BuildAnim(nullptr, 70, 0, pActor->int_pos().X, pActor->int_pos().Y, pSectAbove->floorz, pSectAbove, 64, 0);
BuildAnim(nullptr, 70, 0, pActor->int_pos().X, pActor->int_pos().Y, pSectAbove->__int_floorz, pSectAbove, 64, 0);
}
DestroyBubble(pActor);

View file

@ -682,11 +682,11 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
pSector = pBulletActor->sector();
while (pBulletActor->int_pos().Z < pSector->ceilingz)
while (pBulletActor->int_pos().Z < pSector->__int_ceilingz)
{
if (pSector->pAbove == nullptr)
{
pBulletActor->set_int_z(pSector->ceilingz);
pBulletActor->set_int_z(pSector->__int_ceilingz);
break;
}

View file

@ -98,7 +98,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
}
}
int FloorZ = pActor->sector()->floorz;
int FloorZ = pActor->sector()->__int_floorz;
if (FloorZ <= pActor->int_pos().Z)
{

View file

@ -152,7 +152,7 @@ void ExplodeGrenade(DExhumedActor* pActor)
}
else
{
if (pActor->int_pos().Z < pGrenadeSect->floorz)
if (pActor->int_pos().Z < pGrenadeSect->__int_floorz)
{
var_20 = 200;
var_28 = 36;

View file

@ -241,7 +241,7 @@ void SnapSectors(sectortype* pSectorA, sectortype* pSectorB, int b)
}
if (b) {
pSectorB->setceilingz(pSectorA->floorz);
pSectorB->set_int_ceilingz(pSectorA->__int_floorz);
}
if (pSectorA->Flag & 0x1000) {

View file

@ -113,7 +113,7 @@ void BuildLava(DExhumedActor* pActor, int x, int y, int, sectortype* pSector, in
ChangeActorStat(pActor, 118);
}
pActor->set_int_pos({ x, y, pSector->floorz });
pActor->set_int_pos({ x, y, pSector->__int_floorz });
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.xrepeat = 200;
pActor->spr.yrepeat = 200;

View file

@ -264,7 +264,7 @@ void AddFlash(sectortype* pSector, int x, int y, int z, int val)
if (wal.pal < 5)
{
if (!pNextSector || pNextSector->floorz < pSector->floorz)
if (!pNextSector || pNextSector->__int_floorz < pSector->__int_floorz)
{
int nFlash = GrabFlash();
if (nFlash < 0) {

View file

@ -52,7 +52,7 @@ void BuildLion(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
ChangeActorStat(pActor, 104);
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
nAngle = pActor->spr.ang;
}

View file

@ -250,7 +250,7 @@ int BelowNear(DExhumedActor* pActor, int x, int y, int walldist)
}
else
{
z2 = pSector->floorz + pSector->Depth;
z2 = pSector->__int_floorz + pSector->Depth;
BFSSectorSearch search(pSector);
@ -280,7 +280,7 @@ int BelowNear(DExhumedActor* pActor, int x, int y, int walldist)
pSect2 = pSect2->pBelow;
}
int ecx = pTempSect->floorz + pTempSect->Depth;
int ecx = pTempSect->__int_floorz + pTempSect->Depth;
int eax = ecx - z;
if (eax < 0 && eax >= -5120)
@ -331,17 +331,17 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis
}
int spriteZ = pActor->int_pos().Z;
int floorZ = pSector->floorz;
int floorZ = pSector->__int_floorz;
int ebp = spriteZ + z;
int eax = pSector->ceilingz + (height >> 1);
int eax = pSector->__int_ceilingz + (height >> 1);
if ((nSectFlags & kSectUnderwater) && ebp < eax) {
ebp = eax;
}
// loc_151E7:
while (ebp > pActor->sector()->floorz && pActor->sector()->pBelow != nullptr)
while (ebp > pActor->sector()->__int_floorz && pActor->sector()->pBelow != nullptr)
{
ChangeActorSect(pActor, pActor->sector()->pBelow);
}
@ -363,7 +363,7 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis
}
else
{
while ((ebp < pActor->sector()->ceilingz) && (pActor->sector()->pAbove != nullptr))
while ((ebp < pActor->sector()->__int_ceilingz) && (pActor->sector()->pAbove != nullptr))
{
ChangeActorSect(pActor, pActor->sector()->pAbove);
}
@ -502,7 +502,7 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist
auto pSector = pActor->sector();
assert(pSector);
int floorZ = pSector->floorz;
int floorZ = pSector->__int_floorz;
if ((pSector->Flag & kSectUnderwater) || (floorZ < z))
{
@ -553,7 +553,7 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist
dz = 0;
}
if ((pSector->floorz - z) < (dz + flordist))
if ((pSector->__int_floorz - z) < (dz + flordist))
{
pActor->set_int_xy( x, y);
}
@ -633,7 +633,7 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
if (pSector != pSectorPre)
{
int zDiff = pSectorPre->floorz - pSector->floorz;
int zDiff = pSectorPre->__int_floorz - pSector->__int_floorz;
if (zDiff < 0) {
zDiff = -zDiff;
}
@ -749,7 +749,7 @@ void CheckSectorFloor(sectortype* pSector, int z, int *x, int *y)
int nFlag = pSector->Flag;
int nAng = nFlag & kAngleMask;
if (z >= pSector->floorz)
if (z >= pSector->__int_floorz)
{
*x += bcos(nAng, 3) * nSpeed;
*y += bsin(nAng, 3) * nSpeed;
@ -819,7 +819,7 @@ void CreatePushBlock(sectortype* pSector)
sBlockInfo[nBlock].pActor = pActor;
pActor->set_int_pos({ xAvg, yAvg, pSector->floorz - 256 });
pActor->set_int_pos({ xAvg, yAvg, pSector->__int_floorz - 256 });
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
int var_28 = 0;
@ -872,7 +872,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
int nBlock = pSector->extra;
int nSectFlag = pSector->Flag;
int nFloorZ = pSector->floorz;
int nFloorZ = pSector->__int_floorz;
walltype *pStartWall = pSector->firstWall();
sectortype* pNextSector = pStartWall->nextSector();
@ -894,17 +894,17 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
if (nSectFlag & kSectUnderwater)
{
nZVal = pSector->ceilingz;
pos.Z = pNextSector->ceilingz + 256;
nZVal = pSector->__int_ceilingz;
pos.Z = pNextSector->__int_ceilingz + 256;
pSector->setceilingz(pNextSector->ceilingz);
pSector->set_int_ceilingz(pNextSector->__int_ceilingz);
}
else
{
nZVal = pSector->floorz;
pos.Z = pNextSector->floorz - 256;
nZVal = pSector->__int_floorz;
pos.Z = pNextSector->__int_floorz - 256;
pSector->setfloorz(pNextSector->floorz);
pSector->set_int_floorz(pNextSector->__int_floorz);
}
auto pSectorB = pSector;
@ -1060,10 +1060,10 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
}
if (nSectFlag & kSectUnderwater) {
pSector->setceilingz(nZVal);
pSector->set_int_ceilingz(nZVal);
}
else {
pSector->setfloorz(nZVal);
pSector->set_int_floorz(nZVal);
}
*nXVel = xvect;
@ -1403,7 +1403,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
auto nVal = movesprite(pActor, pActor->spr.xvel << 10, pActor->spr.yvel << 10, pActor->spr.zvel, 2560, -2560, CLIPMASK1);
if (pActor->int_pos().Z >= pSector->floorz)
if (pActor->int_pos().Z >= pSector->__int_floorz)
{
// re-grab this variable as it may have changed in movesprite(). Note the check above is against the value *before* movesprite so don't change it.
pSector = pActor->sector();
@ -1411,7 +1411,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->spr.zvel = 0;
pActor->set_int_z(pSector->floorz);
pActor->set_int_z(pSector->__int_floorz);
}
else
{

View file

@ -448,7 +448,7 @@ void AIMummy::Damage(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->spr.zvel = 0;
pActor->set_int_z(pActor->sector()->floorz);
pActor->set_int_z(pActor->sector()->__int_floorz);
}
else
{

View file

@ -393,7 +393,7 @@ DExhumedActor* BuildWallSprite(sectortype* pSector)
auto pActor = insertActor(pSector, 401);
pActor->set_int_pos({ wal->center().X, wal->center().Y, (pSector->floorz + pSector->ceilingz) / 2 });
pActor->set_int_pos({ wal->center().X, wal->center().Y, (pSector->__int_floorz + pSector->__int_ceilingz) / 2 });
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
return pActor;
@ -457,7 +457,7 @@ DExhumedActor* FindWallSprites(sectortype* pSector)
{
pAct = insertActor(pSector, 401);
pAct->set_int_pos({ (var_24 + esi) / 2, (ecx + edi) / 2, pSector->floorz });
pAct->set_int_pos({ (var_24 + esi) / 2, (ecx + edi) / 2, pSector->__int_floorz });
pAct->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pAct->spr.intowner = -1;
pAct->spr.lotag = 0;
@ -588,7 +588,7 @@ int CheckSectorSprites(sectortype* pSector, int nVal)
if (nVal)
{
int nZDiff = pSector->floorz - pSector->ceilingz;
int nZDiff = pSector->__int_floorz - pSector->__int_ceilingz;
ExhumedSectIterator it(pSector);
while (auto pActor= it.Next())
@ -632,7 +632,7 @@ int CheckSectorSprites(sectortype* pSector, int nVal)
// done
void MoveSectorSprites(sectortype* pSector, int z)
{
int newz = pSector->floorz;
int newz = pSector->__int_floorz;
int oldz = newz - z;
int minz = min(newz, oldz);
int maxz = max(newz, oldz);
@ -764,7 +764,7 @@ void AIElev::Tick(RunListEvent* ev)
int nZVal = Elevator[nElev].zOffsets[nZOffset];
StartInterpolation(pSector, Interp_Sect_Floorz);
int nVal = LongSeek((int*)&pSector->floorz, nZVal, Elevator[nElev].nParam1, Elevator[nElev].nParam2);
int nVal = LongSeek((int*)&pSector->__int_floorz, nZVal, Elevator[nElev].nParam1, Elevator[nElev].nParam2);
ebp = nVal;
if (!nVal)
@ -798,7 +798,7 @@ void AIElev::Tick(RunListEvent* ev)
else
{
// loc_20FC3:
int ceilZ = pSector->ceilingz;
int ceilZ = pSector->__int_ceilingz;
int nZOffset = Elevator[nElev].nCurZOffset;
int zVal = Elevator[nElev].zOffsets[nZOffset];
@ -854,7 +854,7 @@ void AIElev::Tick(RunListEvent* ev)
}
StartInterpolation(pSector, Interp_Sect_Ceilingz);
pSector->setceilingz(ceilZ);
pSector->set_int_ceilingz(ceilZ);
}
// maybe this doesn't go here?
@ -1018,7 +1018,7 @@ int BuildSlide(int nChannel, walltype* pStartWall, walltype* pWall1, walltype* p
SlideData[nSlide].pActor = pActor;
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->set_int_pos({ pStartWall->wall_int_pos().X, pStartWall->wall_int_pos().Y, pSector->floorz });
pActor->set_int_pos({ pStartWall->wall_int_pos().X, pStartWall->wall_int_pos().Y, pSector->__int_floorz });
pActor->backuppos();
SlideData[nSlide].nRunC = 0;
@ -1578,10 +1578,10 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
// GrabTimeSlot(3);
pActor->set_int_z(pSector->firstWall()->nextSector()->floorz);
pActor->set_int_z(pSector->firstWall()->nextSector()->__int_floorz);
// CHECKME - name of this variable?
int nRepeat = (pActor->int_pos().Z - pSector->floorz) >> 8;
int nRepeat = (pActor->int_pos().Z - pSector->__int_floorz) >> 8;
if (nRepeat > 255) {
nRepeat = 255;
}
@ -1656,9 +1656,9 @@ void ExplodeEnergyBlock(DExhumedActor* pActor)
pSector->floorshade = 50;
pSector->extra = -1;
pSector->setfloorz(pActor->int_pos().Z);
pSector->set_int_floorz(pActor->int_pos().Z);
pActor->set_int_z((pActor->int_pos().Z + pSector->floorz) / 2);
pActor->set_int_z((pActor->int_pos().Z + pSector->__int_floorz) / 2);
BuildSpark(pActor, 3);
@ -1763,15 +1763,15 @@ void AIEnergyBlock::RadialDamage(RunListEvent* ev)
return;
}
int nFloorZ = pSector->floorz;
int nFloorZ = pSector->__int_floorz;
pSector->setfloorz(pActor->int_pos().Z);
pSector->set_int_floorz(pActor->int_pos().Z);
pActor->add_int_z(-256);
ev->nDamage = runlist_CheckRadialDamage(pActor);
// restore previous values
pSector->setfloorz(nFloorZ);
pSector->set_int_floorz(nFloorZ);
pActor->add_int_z(256);
if (ev->nDamage <= 0) {
@ -1919,7 +1919,7 @@ void AIObject::Tick(RunListEvent* ev)
int var_18;
// red branch
if ((nStat == kStatExplodeTarget) || (pActor->int_pos().Z < pActor->sector()->floorz))
if ((nStat == kStatExplodeTarget) || (pActor->int_pos().Z < pActor->sector()->__int_floorz))
{
var_18 = 36;
}
@ -1929,7 +1929,7 @@ void AIObject::Tick(RunListEvent* ev)
}
AddFlash(pActor->sector(), pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, 128);
BuildAnim(nullptr, var_18, 0, pActor->int_pos().X, pActor->int_pos().Y, pActor->sector()->floorz, pActor->sector(), 240, 4);
BuildAnim(nullptr, var_18, 0, pActor->int_pos().X, pActor->int_pos().Y, pActor->sector()->__int_floorz, pActor->sector(), 240, 4);
// int edi = nSprite | 0x4000;
@ -2113,15 +2113,15 @@ void DoDrips()
if (sBob[i].field_3)
{
pSector->setceilingz(edx + sBob[i].z);
pSector->set_int_ceilingz(edx + sBob[i].z);
}
else
{
int nFloorZ = pSector->floorz;
int nFloorZ = pSector->__int_floorz;
pSector->setfloorz(edx + sBob[i].z);
pSector->set_int_floorz(edx + sBob[i].z);
MoveSectorSprites(pSector, pSector->floorz - nFloorZ);
MoveSectorSprites(pSector, pSector->__int_floorz - nFloorZ);
}
}
}
@ -2174,10 +2174,10 @@ void AddSectorBob(sectortype* pSector, int nHitag, int bx)
int z;
if (bx == 0) {
z = pSector->floorz;
z = pSector->__int_floorz;
}
else {
z = pSector->ceilingz;
z = pSector->__int_ceilingz;
}
sBob[nBobs].z = z;

View file

@ -71,20 +71,20 @@ static int osdcmd_spawn(CCmdFuncPtr parm)
if (parm->numparms != 1) return CCMD_SHOWHELP;
auto c = parm->parms[0];
auto sectp = initsectp;
if (!stricmp(c, "anubis")) BuildAnubis(nullptr, initx, inity, sectp->floorz, sectp, inita, false);
else if (!stricmp(c, "spider")) BuildSpider(nullptr, initx, inity, sectp->floorz, sectp, inita);
else if (!stricmp(c, "mummy")) BuildMummy(nullptr, initx, inity, sectp->floorz, sectp, inita);
if (!stricmp(c, "anubis")) BuildAnubis(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, false);
else if (!stricmp(c, "spider")) BuildSpider(nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else if (!stricmp(c, "mummy")) BuildMummy(nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else if (!stricmp(c, "fish")) BuildFish(nullptr, initx, inity, initz + PlayerList[nLocalPlayer].eyelevel, sectp, inita);
else if (!stricmp(c, "lion")) BuildLion(nullptr, initx, inity, sectp->floorz, sectp, inita);
else if (!stricmp(c, "lava")) BuildLava(nullptr, initx, inity, sectp->floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "rex")) BuildRex(nullptr, initx, inity, sectp->floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "set")) BuildSet(nullptr, initx, inity, sectp->floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "queen")) BuildQueen(nullptr, initx, inity, sectp->floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "roach")) BuildRoach(0, nullptr, initx, inity, sectp->floorz, sectp, inita);
else if (!stricmp(c, "roach2")) BuildRoach(1, nullptr, initx, inity, sectp->floorz, sectp, inita);
else if (!stricmp(c, "wasp")) BuildWasp(nullptr, initx, inity, sectp->floorz - 25600, sectp, inita, false);
else if (!stricmp(c, "scorp")) BuildScorp(nullptr, initx, inity, sectp->floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "rat")) BuildRat(nullptr, initx, inity, sectp->floorz, sectp, inita);
else if (!stricmp(c, "lion")) BuildLion(nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else if (!stricmp(c, "lava")) BuildLava(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "rex")) BuildRex(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "set")) BuildSet(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "queen")) BuildQueen(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "roach")) BuildRoach(0, nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else if (!stricmp(c, "roach2")) BuildRoach(1, nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else if (!stricmp(c, "wasp")) BuildWasp(nullptr, initx, inity, sectp->__int_floorz - 25600, sectp, inita, false);
else if (!stricmp(c, "scorp")) BuildScorp(nullptr, initx, inity, sectp->__int_floorz, sectp, inita, nNetPlayerCount);
else if (!stricmp(c, "rat")) BuildRat(nullptr, initx, inity, sectp->__int_floorz, sectp, inita);
else Printf("Unknown creature type %s\n", c);
return CCMD_OK;
}

View file

@ -278,7 +278,7 @@ void RestartPlayer(int nPlayer)
}
else
{
pActor->set_int_pos({ plr->sPlayerSave.x, plr->sPlayerSave.y, plr->sPlayerSave.pSector->floorz });
pActor->set_int_pos({ plr->sPlayerSave.x, plr->sPlayerSave.y, plr->sPlayerSave.pSector->__int_floorz });
plr->angle.ang = buildang(plr->sPlayerSave.nAngle&kAngleMask);
pActor->spr.ang = plr->angle.ang.asbuild();
@ -454,7 +454,7 @@ void StartDeathSeq(int nPlayer, int nVal)
auto pGunActor = GrabBodyGunSprite();
ChangeActorSect(pGunActor, pSector);
pGunActor->set_int_pos({ pActor->int_pos().X, pActor->int_pos().Y, pSector->floorz - 512 });
pGunActor->set_int_pos({ pActor->int_pos().X, pActor->int_pos().Y, pSector->__int_floorz - 512 });
ChangeActorStat(pGunActor, nGunLotag[nWeapon] + 900);
@ -882,7 +882,7 @@ void AIPlayer::Tick(RunListEvent* ev)
vec3_t pos = pPlayerActor->int_pos();
SetActor(pPlayerActor, &pos);
pPlayerActor->set_int_z(pPlayerActor->sector()->floorz);
pPlayerActor->set_int_z(pPlayerActor->sector()->__int_floorz);
}
else
{
@ -1093,7 +1093,7 @@ sectdone:
while (1)
{
int nCeilZ = pViewSect->ceilingz;
int nCeilZ = pViewSect->__int_ceilingz;
if (EyeZ >= nCeilZ)
break;
@ -1118,7 +1118,7 @@ sectdone:
ChangeActorSect(pPlayerActor, pViewSect);
int var_FC = pViewSect->floorz + (-5120);
int var_FC = pViewSect->__int_floorz + (-5120);
pPlayerActor->set_int_pos({ spr_x, spr_y, var_FC });
auto coll = movesprite(pPlayerActor, x, y, 0, 5120, 0, CLIPMASK0);
@ -1223,7 +1223,7 @@ sectdone:
{
auto pTmpSect = pPlayerActor->sector();
if (PlayerList[nPlayer].totalvel > 25 && pPlayerActor->int_pos().Z > pTmpSect->floorz)
if (PlayerList[nPlayer].totalvel > 25 && pPlayerActor->int_pos().Z > pTmpSect->__int_floorz)
{
if (pTmpSect->Depth && !pTmpSect->Speed && !pTmpSect->Damage)
{
@ -1265,7 +1265,7 @@ sectdone:
ChangeActorSect(pFloorActor, pPlayerActor->sector());
}
pFloorActor->set_int_z(pPlayerActor->sector()->floorz);
pFloorActor->set_int_z(pPlayerActor->sector()->__int_floorz);
}
int var_30 = 0;
@ -2254,7 +2254,7 @@ sectdone:
// loc_1BC57:
// CHECKME - are we finished with 'nSector' variable at this point? if so, maybe set it to pPlayerActor->spr.sector so we can make this code a bit neater. Don't assume pPlayerActor->spr.sector == nSector here!!
if (nStandHeight > (pPlayerActor->sector()->floorz - pPlayerActor->sector()->ceilingz)) {
if (nStandHeight > (pPlayerActor->sector()->__int_floorz - pPlayerActor->sector()->__int_ceilingz)) {
var_48 = 1;
}
@ -2452,7 +2452,7 @@ sectdone:
{
pPlayerActor->spr.picnum = seq_GetSeqPicnum(kSeqJoe, 120, 0);
pPlayerActor->spr.cstat = 0;
pPlayerActor->set_int_z(pPlayerActor->sector()->floorz);
pPlayerActor->set_int_z(pPlayerActor->sector()->__int_floorz);
}
// will invalidate nPlayerSprite
@ -2500,7 +2500,7 @@ sectdone:
case 16:
PlayerList[nPlayer].nSeqSize = SeqSize[var_AC] - 1;
if (pPlayerActor->int_pos().Z < pPlayerActor->sector()->floorz) {
if (pPlayerActor->int_pos().Z < pPlayerActor->sector()->__int_floorz) {
pPlayerActor->add_int_z(256);
}

View file

@ -447,7 +447,7 @@ void BuildQueenEgg(int nQueen, int nVal)
int x = pActor->int_pos().X;
int y = pActor->int_pos().Y;
auto pSector =pActor->sector();
int nFloorZ = pSector->floorz;
int nFloorZ = pSector->__int_floorz;
int nAngle = pActor->spr.ang;
auto pActor2 = insertActor(pSector, 121);
@ -706,7 +706,7 @@ void BuildQueenHead(int nQueen)
int y = pActor->int_pos().Y;
int nAngle = pActor->spr.ang;
auto pSector = pActor->sector();
int z = pSector->floorz;
int z = pSector->__int_floorz;
auto pActor2 = insertActor(pSector, 121);
@ -1113,7 +1113,7 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
ChangeActorStat(pActor, 121);
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
nAngle = pActor->spr.ang;
}

View file

@ -131,7 +131,7 @@ DExhumedActor* FindFood(DExhumedActor* pActor)
int y = pActor->int_pos().Y;
int z = pActor->int_pos().Z;
int z2 = (z + pSector->ceilingz) / 2;
int z2 = (z + pSector->__int_ceilingz) / 2;
if (nChunkTotal)
{

View file

@ -47,7 +47,7 @@ void BuildRex(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
{
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
nAngle = pActor->spr.ang;
ChangeActorStat(pActor, 119);

View file

@ -46,7 +46,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
ChangeActorStat(pActor, 105);
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
angle = pActor->spr.ang;
}

View file

@ -615,10 +615,10 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
This function searches z-coordinates of neighboring sectors to find the
closest (next) ceiling starting at the given z-coordinate (thez).
*/
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -634,10 +634,10 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 2: // Floor Doom door
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->ceilingz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_ceilingz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -683,10 +683,10 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 5: // Permanent floor raise
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz + 1, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz + 1, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -694,11 +694,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 6: // Touchplate floor lower, single
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 400, 400, 2, nextSectorP->floorz, pSector->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 400, 400, 2, nextSectorP->__int_floorz, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -706,17 +706,17 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
pSector->setfloorz(nextSectorP->floorz);
pSector->set_int_floorz(nextSectorP->__int_floorz);
return;
}
case 7: // Touchplate floor lower, multiple
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -732,11 +732,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 8: // Permanent floor lower
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -744,11 +744,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 9: // Switch activated lift down
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -760,11 +760,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 10: // Touchplate Floor Raise
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -789,12 +789,12 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
*/
int zVal = 0;
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP != nullptr) {
zVal = nextSectorP->floorz;
zVal = nextSectorP->__int_floorz;
}
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, zVal);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -809,12 +809,12 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
*/
int zVal = 0;
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP != nullptr) {
zVal = nextSectorP->floorz;
zVal = nextSectorP->__int_floorz;
}
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, zVal);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -833,12 +833,12 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
*/
int zVal = 0;
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP != nullptr) {
zVal = nextSectorP->floorz;
zVal = nextSectorP->__int_floorz;
}
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, zVal);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -850,11 +850,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 15: // Sector raise/lower
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -862,7 +862,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 16: // Stuttering noise (floor makes noise)
{
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, pSector->floorz - 8);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, pSector->__int_floorz - 8);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -878,7 +878,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 17: // Reserved?
{
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, pSector->floorz - 8);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, pSector->__int_floorz - 8);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -890,15 +890,15 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 18: // Raises floor AND lowers ceiling
{
int ebx = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
int ebx = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->floorz, ebx);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_floorz, ebx);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
int ebx2 = (((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz) - 8;
int ebx2 = (((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz) - 8;
int nElev2 = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, ebx2);
int nElev2 = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, ebx2);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev2, 0);
@ -925,12 +925,12 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
*/
int zVal = 0;
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP) {
zVal = nextSectorP->floorz;
zVal = nextSectorP->__int_floorz;
}
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 32767, 200, 2, pSector->floorz, zVal);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 32767, 200, 2, pSector->__int_floorz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -942,11 +942,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 24: // Ceiling door, channel trigger only
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -958,11 +958,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 25:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -974,11 +974,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 26:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -990,11 +990,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 27:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1006,11 +1006,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 28:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1022,11 +1022,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 31: // Touchplate
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1038,11 +1038,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 32:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1050,11 +1050,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 33: // Ceiling Crusher
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(20, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, pSector->floorz);
int nElev = BuildElevC(20, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->__int_ceilingz, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1062,11 +1062,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 34: // Triggerable Ceiling Crusher(Inactive)
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(28, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->ceilingz, pSector->floorz);
int nElev = BuildElevC(28, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, nextSectorP->__int_ceilingz, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1088,11 +1088,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 37:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1100,11 +1100,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 39: // Touchplate
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 0x7FFF, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1163,12 +1163,12 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
*/
int zVal = 0;
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingDown | Find_Safe);
if (nextSectorP != nullptr) {
zVal = nextSectorP->ceilingz;
zVal = nextSectorP->__int_ceilingz;
}
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, zVal);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, zVal);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1176,11 +1176,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 49:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1188,11 +1188,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 50: // Floor lower / raise
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 200, 2, nextSectorP->floorz, pSector->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 0x7FFF, 200, 2, nextSectorP->__int_floorz, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1200,15 +1200,15 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 51:
{
int edx = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
int edx = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->floorz, edx);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_floorz, edx);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
int eax = (((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz) - 8;
int eax = (((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz) - 8;
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->ceilingz, eax);
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), 200, nSpeed * 100, 2, pSector->__int_ceilingz, eax);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1220,15 +1220,15 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 52:
{
int eax = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
int eax = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
eax = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
eax = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->ceilingz);
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1244,15 +1244,15 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 53:
{
int eax = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
int eax = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->floorz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
eax = ((pSector->floorz - pSector->ceilingz) / 2) + pSector->ceilingz;
eax = ((pSector->__int_floorz - pSector->__int_ceilingz) / 2) + pSector->__int_ceilingz;
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->ceilingz);
nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, eax, pSector->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1264,11 +1264,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 54:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1280,11 +1280,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 55:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1296,11 +1296,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 56:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1308,11 +1308,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 57:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->ceilingz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_ceilingz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1333,10 +1333,10 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
nEnergyChan = nChannel;
}
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1344,11 +1344,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 59:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1364,17 +1364,17 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 61:
{
zListB[0] = pSector->floorz;
zListB[0] = pSector->__int_floorz;
int var_1C = 1;
while (1)
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorUp | Find_Safe);
if (nextSectorP == nullptr || var_1C >= 8) {
break;
}
zListB[var_1C] = nextSectorP->floorz;
zListB[var_1C] = nextSectorP->__int_floorz;
var_1C++;
}
@ -1388,17 +1388,17 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 62:
{
zListA[0] = pSector->floorz;
zListA[0] = pSector->__int_floorz;
int var_20 = 1;
while (1)
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr || var_20 >= 8) {
break;
}
zListA[var_20] = nextSectorP->floorz;
zListA[var_20] = nextSectorP->__int_floorz;
var_20++;
}
@ -1419,11 +1419,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 68:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->floorz, Find_FloorDown | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_floorz, Find_FloorDown | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->floorz);
int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->__int_floorz, nextSectorP->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;
@ -1432,11 +1432,11 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 70:
case 71:
{
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->ceilingz, Find_CeilingUp | Find_Safe);
auto nextSectorP = nextsectorneighborzptr(pSector, pSector->__int_ceilingz, Find_CeilingUp | Find_Safe);
if (nextSectorP == nullptr) break;
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, (int)pSector->floorz, (int)nextSectorP->ceilingz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, (int)pSector->__int_floorz, (int)nextSectorP->__int_ceilingz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
@ -1452,7 +1452,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag)
case 75:
{
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, (int)pSector->ceilingz, (int)pSector->floorz);
int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, (int)pSector->__int_ceilingz, (int)pSector->__int_floorz);
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
return;

View file

@ -50,7 +50,7 @@ void BuildScorp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
nAngle = pActor->spr.ang;
}

View file

@ -617,7 +617,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
else
{
auto pSector =pTSprite->sectp;
int nFloorZ = pSector->floorz;
int nFloorZ = pSector->__int_floorz;
if (nFloorZ <= PlayerList[nLocalPlayer].eyelevel + initz) {
pTSprite->ownerActor = nullptr;

View file

@ -50,7 +50,7 @@ void BuildSet(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
ChangeActorStat(pActor, 120);
x = pActor->int_pos().X;
y = pActor->int_pos().Y;
z = pActor->sector()->floorz;
z = pActor->sector()->__int_floorz;
nAngle = pActor->spr.ang;
}
@ -110,7 +110,7 @@ void BuildSoul(DExhumedActor* pSet)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->spr.zvel = (-256) - RandomSize(10);
pActor->set_int_pos({ pSet->int_pos().X, pSet->int_pos().Y, (RandomSize(8) << 8) + 8192 + pActor->sector()->ceilingz - GetActorHeight(pActor) });
pActor->set_int_pos({ pSet->int_pos().X, pSet->int_pos().Y, (RandomSize(8) << 8) + 8192 + pActor->sector()->__int_ceilingz - GetActorHeight(pActor) });
//pActor->spr.hitag = nSet;
pActor->pTarget = pSet;
@ -406,9 +406,9 @@ void AISet::Tick(RunListEvent* ev)
if (pSector)
{
if ((pActor->int_pos().Z - pSector->floorz) < 55000)
if ((pActor->int_pos().Z - pSector->__int_floorz) < 55000)
{
if (pActor->int_pos().Z > pSector->ceilingz)
if (pActor->int_pos().Z > pSector->__int_ceilingz)
{
pActor->nIndex = 1;
pActor->nAction = 7;

View file

@ -675,7 +675,7 @@ void CheckAmbience(sectortype* sect)
walltype* pWall = pSector2->firstWall();
if (!soundEngine->IsSourcePlayingSomething(SOURCE_Ambient, &amb, 0))
{
vec3_t v = { pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector2->floorz };
vec3_t v = { pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector2->__int_floorz };
amb = GetSoundPos(v);
soundEngine->StartSound(SOURCE_Ambient, &amb, nullptr, CHAN_BODY, CHANF_TRANSIENT, sect->Sound + 1, 1.f, ATTN_NORM);
return;
@ -690,7 +690,7 @@ void CheckAmbience(sectortype* sect)
}
else
{
vec3_t v = { pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector2->floorz };
vec3_t v = { pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector2->__int_floorz };
amb = GetSoundPos(v);
}
return 1;

View file

@ -48,7 +48,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, int x, int y, int z, sectortype*
x = spp->int_pos().X;
y = spp->int_pos().Y;
z = spp->sector()->floorz;
z = spp->sector()->__int_floorz;
nAngle = spp->spr.ang;
}
@ -100,7 +100,7 @@ void AISpider::Tick(RunListEvent* ev)
{
if (spp->spr.cstat & CSTAT_SPRITE_YFLIP)
{
spp->set_int_z(spp->sector()->ceilingz + GetActorHeight(spp));
spp->set_int_z(spp->sector()->__int_ceilingz + GetActorHeight(spp));
}
else
{
@ -177,7 +177,7 @@ void AISpider::Tick(RunListEvent* ev)
if (spp->spr.cstat & CSTAT_SPRITE_YFLIP)
{
spp->spr.zvel = 0;
spp->set_int_z(pSector->ceilingz + (tileHeight(spp->spr.picnum) << 5));
spp->set_int_z(pSector->__int_ceilingz + (tileHeight(spp->spr.picnum) << 5));
if (pSector->ceilingstat & CSTAT_SECTOR_SKY)
{
@ -210,7 +210,7 @@ void AISpider::Tick(RunListEvent* ev)
{
spp->spr.cstat ^= CSTAT_SPRITE_YFLIP;
spp->spr.zvel = 1;
spp->set_int_z(pSector->ceilingz + GetActorHeight(spp));
spp->set_int_z(pSector->__int_ceilingz + GetActorHeight(spp));
}
else
{
@ -288,7 +288,7 @@ void AISpider::Tick(RunListEvent* ev)
&& !((spp->sector()->ceilingstat) & CSTAT_SECTOR_SKY))
{
spp->spr.cstat |= CSTAT_SPRITE_YFLIP;
spp->set_int_z(GetActorHeight(spp) + spp->sector()->ceilingz);
spp->set_int_z(GetActorHeight(spp) + spp->sector()->__int_ceilingz);
spp->spr.zvel = 0;
spp->nAction = 1;

View file

@ -290,7 +290,7 @@ void AISWStepOn::TouchFloor(RunListEvent* ev)
if (var_14 != sRunChannels[nChannel].c)
{
auto pWall = pSector->firstWall();
PlayFXAtXYZ(StaticSound[nSwitchSound], pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector->floorz);
PlayFXAtXYZ(StaticSound[nSwitchSound], pWall->wall_int_pos().X, pWall->wall_int_pos().Y, pSector->__int_floorz);
assert(sRunChannels[nChannel].c < 8);

View file

@ -274,7 +274,7 @@ void DrawView(double smoothRatio, bool sceneonly)
else
{
viewz = playerZ + nQuake[nLocalPlayer];
int floorZ = pPlayerActor->sector()->floorz;
int floorZ = pPlayerActor->sector()->__int_floorz;
if (viewz > floorZ)
viewz = floorZ;
@ -297,10 +297,10 @@ void DrawView(double smoothRatio, bool sceneonly)
if (pSector != nullptr)
{
int Z = pSector->ceilingz + 256;
int Z = pSector->__int_ceilingz + 256;
if (Z <= viewz)
{
Z = pSector->floorz - 256;
Z = pSector->__int_floorz - 256;
if (Z < viewz)
viewz = Z;

View file

@ -334,7 +334,7 @@ void AIWasp::Tick(RunListEvent* ev)
pActor->add_int_z(pActor->spr.zvel);
if (pActor->int_pos().Z >= pSector->floorz)
if (pActor->int_pos().Z >= pSector->__int_floorz)
{
if (pSector->pBelow != nullptr)
{

View file

@ -331,7 +331,7 @@ int DoActorSectorDamage(DSWActor* actor)
}
}
}
else if (ActorZOfBottom(actor) >= sectp->floorz)
else if (ActorZOfBottom(actor) >= sectp->__int_floorz)
{
if ((actor->user.DamageTics -= synctics) < 0)
{

View file

@ -741,7 +741,7 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, int *x, int *y, int *z,
if (!wp->twoSided())
{
// white wall
*z = ((*sectp)->floorz + (*sectp)->ceilingz) >> 1;
*z = ((*sectp)->__int_floorz + (*sectp)->__int_ceilingz) >> 1;
}
else
{
@ -751,16 +751,16 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, int *x, int *y, int *z,
ASSERT(wp->twoSided());
// floor and ceiling meet
if (next_sect->floorz == next_sect->ceilingz)
*z = ((*sectp)->floorz + (*sectp)->ceilingz) >> 1;
if (next_sect->__int_floorz == next_sect->__int_ceilingz)
*z = ((*sectp)->__int_floorz + (*sectp)->__int_ceilingz) >> 1;
else
// floor is above other sector
if (next_sect->floorz < (*sectp)->floorz)
*z = (next_sect->floorz + (*sectp)->floorz) >> 1;
if (next_sect->__int_floorz < (*sectp)->__int_floorz)
*z = (next_sect->__int_floorz + (*sectp)->__int_floorz) >> 1;
else
// ceiling is below other sector
if (next_sect->ceilingz > (*sectp)->ceilingz)
*z = (next_sect->ceilingz + (*sectp)->ceilingz) >> 1;
if (next_sect->__int_ceilingz > (*sectp)->__int_ceilingz)
*z = (next_sect->__int_ceilingz + (*sectp)->__int_ceilingz) >> 1;
}
*ang = wall_ang;

View file

@ -211,8 +211,8 @@ void CopySectorMatch(int match)
dsectp->hitag = ssectp->hitag;
dsectp->lotag = ssectp->lotag;
dsectp->setfloorz(ssectp->floorz);
dsectp->setceilingz(ssectp->ceilingz);
dsectp->set_int_floorz(ssectp->__int_floorz);
dsectp->set_int_ceilingz(ssectp->__int_ceilingz);
dsectp->floorshade = ssectp->floorshade;
dsectp->ceilingshade = ssectp->ceilingshade;

View file

@ -546,7 +546,7 @@ DSWActor* ConnectCopySprite(spritetypebase const* tsp)
newsector = tsp->sectp;
testz = GetSpriteZOfTop(tsp) - Z(10);
if (testz < tsp->sectp->ceilingz)
if (testz < tsp->sectp->__int_ceilingz)
updatesectorz(tsp->int_pos().X, tsp->int_pos().Y, testz, &newsector);
if (newsector != nullptr && newsector != tsp->sectp)
@ -560,7 +560,7 @@ DSWActor* ConnectCopySprite(spritetypebase const* tsp)
newsector = tsp->sectp;
testz = GetSpriteZOfBottom(tsp) + Z(10);
if (testz > tsp->sectp->floorz)
if (testz > tsp->sectp->__int_floorz)
updatesectorz(tsp->int_pos().X, tsp->int_pos().Y, testz, &newsector);
if (newsector != nullptr && newsector != tsp->sectp)

View file

@ -424,13 +424,13 @@ int DoEelMatchPlayerZ(DSWActor* actor)
{
if (actor->user.hi_sectp)
{
actor->user.hiz = actor->sector()->ceilingz + Z(16);
actor->user.hiz = actor->sector()->__int_ceilingz + Z(16);
actor->user.hi_sectp = actor->sector();
}
else
{
if (actor->user.hiz < actor->sector()->ceilingz + Z(16))
actor->user.hiz = actor->sector()->ceilingz + Z(16);
if (actor->user.hiz < actor->sector()->__int_ceilingz + Z(16))
actor->user.hiz = actor->sector()->__int_ceilingz + Z(16);
}
}

View file

@ -2113,7 +2113,7 @@ struct ANIM
switch (animtype)
{
case ANIM_Floorz:
return sector[animindex].floorz;
return sector[animindex].__int_floorz;
case ANIM_SopZ:
return SectorObject[animindex].pmid.Z;
case ANIM_Spritez:
@ -2134,7 +2134,7 @@ struct ANIM
switch (animtype)
{
case ANIM_Floorz:
sector[animindex].setfloorz(value);
sector[animindex].set_int_floorz(value);
break;
case ANIM_SopZ:
SectorObject[animindex].pmid.Z = value;

View file

@ -99,9 +99,9 @@ static double getvalue(so_interp::interp_data& element)
case soi_wally:
return wall[index].pos.Y;
case soi_ceil:
return sector[index].ceilingz;
return sector[index].__int_ceilingz;
case soi_floor:
return sector[index].floorz;
return sector[index].__int_floorz;
case soi_sox:
return SectorObject[index].pmid.X;
case soi_soy:
@ -141,10 +141,10 @@ static void setvalue(so_interp::interp_data& element, double value)
wall[index].moved();
break;
case soi_ceil:
sector[index].setceilingz((int)value);
sector[index].set_int_ceilingz((int)value);
break;
case soi_floor:
sector[index].setfloorz((int)value);
sector[index].set_int_floorz((int)value);
break;
case soi_sox:
SectorObject[index].pmid.X = (int)value;

View file

@ -347,8 +347,8 @@ void MorphTornado(SECTOR_OBJECT* sop)
dragpoint(sop->morph_wall_point, mx, my);
// bound the Z
ceilingz = sop->op_main_sector->ceilingz;
floorz = sop->op_main_sector->floorz;
ceilingz = sop->op_main_sector->__int_ceilingz;
floorz = sop->op_main_sector->__int_floorz;
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
{
@ -425,7 +425,7 @@ void MorphFloor(SECTOR_OBJECT* sop)
dragpoint(sop->morph_wall_point, mx, my);
// bound the Z
floorz = sop->op_main_sector->floorz;
floorz = sop->op_main_sector->__int_floorz;
#define MORPH_FLOOR_ZRANGE Z(300)
@ -522,7 +522,7 @@ void SpikeFloor(SECTOR_OBJECT* sop)
my = y;
// bound the Z
floorz = sop->op_main_sector->floorz;
floorz = sop->op_main_sector->__int_floorz;
#define MORPH_FLOOR_ZRANGE Z(300)

View file

@ -1417,7 +1417,7 @@ void DoPlayerSetWadeDepth(PLAYER* pp)
if ((sectp->extra & SECTFX_SINK))
{
// make sure your even in the water
if (pp->pos.Z + PLAYER_HEIGHT > pp->lo_sectp->floorz - Z(FixedToInt(pp->lo_sectp->depth_fixed)))
if (pp->pos.Z + PLAYER_HEIGHT > pp->lo_sectp->__int_floorz - Z(FixedToInt(pp->lo_sectp->depth_fixed)))
pp->WadeDepth = FixedToInt(pp->lo_sectp->depth_fixed);
}
}
@ -1687,7 +1687,7 @@ void UpdatePlayerUnderSprite(PLAYER* pp)
ASSERT(act_over->hasU());
// dont bother spawning if you ain't really in the water
water_level_z = act_over->sector()->floorz; // - Z(pp->WadeDepth);
water_level_z = act_over->sector()->__int_floorz; // - Z(pp->WadeDepth);
// if not below water
above_water = (ActorZOfBottom(act_over) <= water_level_z);
@ -1726,7 +1726,7 @@ void UpdatePlayerUnderSprite(PLAYER* pp)
zdiff = ActorZOfBottom(act_over) - water_level_z;
// add diff to ceiling
act_under->set_int_z(act_under->sector()->ceilingz + zdiff);
act_under->set_int_z(act_under->sector()->__int_ceilingz + zdiff);
act_under->user.State = act_over->user.State;
act_under->user.Rot = act_over->user.Rot;
@ -1755,7 +1755,7 @@ void UpdatePlayerSprite(PLAYER* pp)
if (pp->sop_control)
{
actor->set_int_z(pp->cursector->floorz);
actor->set_int_z(pp->cursector->__int_floorz);
ChangeActorSect(pp->actor, pp->cursector);
}
else if (pp->DoPlayerAction == DoPlayerCrawl)
@ -2619,7 +2619,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
if (vel > 13000)
{
vec3_t hit_pos = { (x[0] + x[1]) >> 1, (y[0] + y[1]) >> 1, pp->cursector->floorz - Z(10) };
vec3_t hit_pos = { (x[0] + x[1]) >> 1, (y[0] + y[1]) >> 1, pp->cursector->__int_floorz - Z(10) };
hitscan(hit_pos, pp->cursector,
{ MOVEx(256, pp->angle.ang.asbuild()), MOVEy(256, pp->angle.ang.asbuild()), 0 },
@ -3252,14 +3252,14 @@ void DoPlayerClimb(PLAYER* pp)
if (PlayerCeilingHit(pp, pp->hiz + Z(4)))
{
// put player at the ceiling
pp->pos.Z = pp->LadderSector->ceilingz + Z(4);
pp->pos.Z = pp->LadderSector->__int_ceilingz + Z(4);
NewStateGroup(pp->actor, sg_PlayerNinjaClimb);
}
// if floor is ABOVE you && your head goes above it, do a jump up to
// terrace
if (pp->pos.Z < pp->LadderSector->floorz - Z(6))
if (pp->pos.Z < pp->LadderSector->__int_floorz - Z(6))
{
pp->jump_speed = PLAYER_CLIMB_JUMP_AMT;
pp->Flags &= ~(PF_CLIMBING|PF_WEAPON_DOWN);
@ -3365,7 +3365,7 @@ int DoPlayerWadeSuperJump(PLAYER* pp)
unsigned i;
//short angs[3];
static short angs[3] = {0, 0, 0};
int zh = pp->cursector->floorz - Z(pp->WadeDepth) - Z(2);
int zh = pp->cursector->__int_floorz - Z(pp->WadeDepth) - Z(2);
if (Prediction) return false; // !JIM! 8/5/97 Teleporter FAFhitscan SuperJump bug.
@ -3380,7 +3380,7 @@ int DoPlayerWadeSuperJump(PLAYER* pp)
{
hit.hitSector = hit.hitWall->nextSector();
if (hit.hitSector != nullptr && labs(hit.hitSector->floorz - pp->pos.Z) < Z(50))
if (hit.hitSector != nullptr && labs(hit.hitSector->__int_floorz - pp->pos.Z) < Z(50))
{
if (Distance(pp->pos.X, pp->pos.Y, hit.hitpos.X, hit.hitpos.Y) < ((((int)pp->actor->spr.clipdist)<<2) + 256))
return true;
@ -3455,7 +3455,7 @@ void DoPlayerCrawl(PLAYER* pp)
if (FAF_ConnectArea(pp->cursector))
{
// adjust the z
pp->pos.Z = pp->cursector->ceilingz + Z(12);
pp->pos.Z = pp->cursector->__int_ceilingz + Z(12);
}
DoPlayerBeginDiveNoWarp(pp);
@ -3815,7 +3815,7 @@ int PlayerCanDiveNoWarp(PLAYER* pp)
if (SectorIsUnderwaterArea(sect))
{
pp->setcursector(sect);
pp->pos.Z = sect->ceilingz;
pp->pos.Z = sect->__int_ceilingz;
pp->pos.Z += Z(20);
pp->z_speed = Z(20);
@ -3881,7 +3881,7 @@ int GetOverlapSector(int x, int y, sectortype** over, sectortype** under)
// the are overlaping - check the z coord
if (found == 2)
{
if (sf[0]->floorz > sf[1]->floorz)
if (sf[0]->__int_floorz > sf[1]->__int_floorz)
{
*under = sf[0];
*over = sf[1];
@ -3971,7 +3971,7 @@ int GetOverlapSector2(int x, int y, sectortype** over, sectortype** under)
// the are overlaping - check the z coord
if (found == 2)
{
if (sf[0]->floorz > sf[1]->floorz)
if (sf[0]->__int_floorz > sf[1]->__int_floorz)
{
*under = sf[0];
*over = sf[1];
@ -4054,7 +4054,7 @@ void DoPlayerWarpToUnderwater(PLAYER* pp)
else
pp->setcursector(over);
pp->pos.Z = under_act->sector()->ceilingz + Z(6);
pp->pos.Z = under_act->sector()->__int_ceilingz + Z(6);
pp->opos.X = pp->pos.X;
pp->opos.Y = pp->pos.Y;
@ -4122,7 +4122,7 @@ void DoPlayerWarpToSurface(PLAYER* pp)
pp->setcursector(over);
}
pp->pos.Z = over_act->sector()->floorz - Z(2);
pp->pos.Z = over_act->sector()->__int_floorz - Z(2);
// set z range and wade depth so we know how high to set view
DoPlayerZrange(pp);
@ -4418,18 +4418,18 @@ void DoPlayerDive(PLAYER* pp)
if (pp->z_speed < 0 && FAF_ConnectArea(pp->cursector))
{
if (pp->pos.Z < pp->cursector->ceilingz + Z(10))
if (pp->pos.Z < pp->cursector->__int_ceilingz + Z(10))
{
auto sect = pp->cursector;
// check for sector above to see if it is an underwater sector also
updatesectorz(pp->pos.X, pp->pos.Y, pp->cursector->ceilingz - Z(8), &sect);
updatesectorz(pp->pos.X, pp->pos.Y, pp->cursector->__int_ceilingz - Z(8), &sect);
if (!SectorIsUnderwaterArea(sect))
{
// if not underwater sector we must surface
// force into above sector
pp->pos.Z = pp->cursector->ceilingz - Z(8);
pp->pos.Z = pp->cursector->__int_ceilingz - Z(8);
pp->setcursector(sect);
DoPlayerStopDiveNoWarp(pp);
DoPlayerBeginRun(pp);
@ -5092,7 +5092,7 @@ void PlayerRemoteReset(PLAYER* pp, sectortype* sect)
auto rsp = pp->remoteActor;
pp->pos.X = rsp->int_pos().X;
pp->pos.Y = rsp->int_pos().Y;
pp->pos.Z = sect->floorz - PLAYER_HEIGHT;
pp->pos.Z = sect->__int_floorz - PLAYER_HEIGHT;
pp->vect.X = pp->vect.Y = pp->ovect.X = pp->ovect.Y = pp->slide_vect.X = pp->slide_vect.Y = 0;
@ -5267,7 +5267,7 @@ void DoPlayerDeathFall(PLAYER* pp)
if (pp->lo_sectp && (pp->lo_sectp->extra & SECTFX_SINK))
{
loz = pp->lo_sectp->floorz;
loz = pp->lo_sectp->__int_floorz;
}
else
loz = pp->loz;

View file

@ -643,7 +643,7 @@ void GetUpperLowerSector(short match, int x, int y, sectortype** upper, sectorty
if (sln == 2)
{
if (sectorlist[0]->floorz < sectorlist[1]->floorz)
if (sectorlist[0]->__int_floorz < sectorlist[1]->__int_floorz)
{
// swap
// make sectorlist[0] the LOW sector

View file

@ -498,8 +498,8 @@ void SectorSetup(void)
swf->sectp = sectp;
ASSERT(swf->sectp->hitag != 0);
swf->range = range = Z(swf->sectp->hitag);
swf->floor_origz = swf->sectp->floorz - (range >> 2);
swf->ceiling_origz = swf->sectp->ceilingz - (range >> 2);
swf->floor_origz = swf->sectp->__int_floorz - (range >> 2);
swf->ceiling_origz = swf->sectp->__int_ceilingz - (range >> 2);
// look for the rest by distance
auto near_sectp = sectp, base_sectp = sectp;
@ -519,8 +519,8 @@ void SectorSetup(void)
peak_dist = near_sectp->hitag;
swf->sectp = near_sectp;
swf->floor_origz = swf->sectp->floorz - (range >> 2);
swf->ceiling_origz = swf->sectp->ceilingz - (range >> 2);
swf->floor_origz = swf->sectp->__int_floorz - (range >> 2);
swf->ceiling_origz = swf->sectp->__int_ceilingz - (range >> 2);
range -= range_diff;
swf->range = range;
@ -573,8 +573,8 @@ void SectorSetup(void)
swf->range = Z(4);
// reset origz's based on new range
swf->floor_origz = swf->sectp->floorz - (swf->range >> 2);
swf->ceiling_origz = swf->sectp->ceilingz - (swf->range >> 2);
swf->floor_origz = swf->sectp->__int_floorz - (swf->range >> 2);
swf->ceiling_origz = swf->sectp->__int_ceilingz - (swf->range >> 2);
}
}
@ -601,7 +601,7 @@ void SectorMidPoint(sectortype* sectp, int *xmid, int *ymid, int *zmid)
*xmid = xsum / (sectp->wallnum);
*ymid = ysum / (sectp->wallnum);
*zmid = (sectp->floorz + sectp->ceilingz) >> 1;
*zmid = (sectp->__int_floorz + sectp->__int_ceilingz) >> 1;
}
@ -630,7 +630,7 @@ void DoSpringBoardDown(void)
{
int destz;
destz = nextsectorneighborzptr(sbp->sectp, sbp->sectp->floorz, Find_FloorDown | Find_Safe)->floorz;
destz = nextsectorneighborzptr(sbp->sectp, sbp->sectp->__int_floorz, Find_FloorDown | Find_Safe)->__int_floorz;
AnimSet(ANIM_Floorz, sbp->sectp, destz, 256);
@ -874,7 +874,7 @@ void DoExplodeSector(short match)
sectp = actor->sector();
sectp->addceilingz(-Z(SP_TAG4(actor)));
sectp->add_int_ceilingz(-Z(SP_TAG4(actor)));
if (SP_TAG5(actor))
{
@ -886,7 +886,7 @@ void DoExplodeSector(short match)
sectp->setceilingslope(SP_TAG6(actor));
}
for (zh = sectp->ceilingz; zh < sectp->floorz; zh += Z(60))
for (zh = sectp->__int_ceilingz; zh < sectp->__int_floorz; zh += Z(60))
{
SectorExp(actor, actor->sector(), orig_ang, zh + Z(RANDOM_P2(64)) - Z(32));
}
@ -1250,7 +1250,7 @@ void DoChangorMatch(short match)
if (TEST_BOOL1(actor))
{
sectp->ceilingpicnum = SP_TAG4(actor);
sectp->addceilingz(Z(SP_TAG5(actor)));
sectp->add_int_ceilingz(Z(SP_TAG5(actor)));
sectp->ceilingheinum += SP_TAG6(actor);
if (sectp->ceilingheinum)
@ -1264,7 +1264,7 @@ void DoChangorMatch(short match)
else
{
sectp->floorpicnum = SP_TAG4(actor);
sectp->addfloorz(Z(SP_TAG5(actor)));
sectp->add_int_floorz(Z(SP_TAG5(actor)));
sectp->floorheinum += SP_TAG6(actor);
if (sectp->floorheinum)
@ -2293,7 +2293,7 @@ void PlayerOperateEnv(PLAYER* pp)
{
PlayerTakeSectorDamage(pp);
}
else if ((ActorZOfBottom(pp->actor) >= sectp->floorz) && !(pp->Flags & PF_DIVING))
else if ((ActorZOfBottom(pp->actor) >= sectp->__int_floorz) && !(pp->Flags & PF_DIVING))
{
PlayerTakeSectorDamage(pp);
}
@ -2348,13 +2348,13 @@ void DoSineWaveFloor(void)
if ((flags & SINE_FLOOR))
{
newz = swf->floor_origz + MulScale(swf->range, bsin(swf->sintable_ndx), 14);
swf->sectp->setfloorz(newz);
swf->sectp->set_int_floorz(newz);
}
if ((flags & SINE_CEILING))
{
newz = swf->ceiling_origz + MulScale(swf->range, bsin(swf->sintable_ndx), 14);
swf->sectp->setceilingz(newz);
swf->sectp->set_int_ceilingz(newz);
}
}
@ -2387,7 +2387,7 @@ void DoSineWaveFloor(void)
wal = sect->firstWall() + 2;
//Pass (Sector, x, y, z)
alignflorslope(sect,wal->wall_int_pos().X,wal->wall_int_pos().Y, wal->nextSector()->floorz);
alignflorslope(sect,wal->wall_int_pos().X,wal->wall_int_pos().Y, wal->nextSector()->__int_floorz);
}
}
}

View file

@ -863,8 +863,8 @@ void SpawnUser(DSWActor* actor, short id, STATE* state)
// Problem with sprites spawned really close to white sector walls
// cant do a getzrange there
// Just put in some valid starting values
actor->user.loz = actor->sector()->floorz;
actor->user.hiz = actor->sector()->ceilingz;
actor->user.loz = actor->sector()->__int_floorz;
actor->user.hiz = actor->sector()->__int_ceilingz;
actor->user.lowActor = nullptr;
actor->user.highActor = nullptr;
actor->user.lo_sectp = actor->sector();
@ -2044,42 +2044,42 @@ void SpriteSetup(void)
if (floor_vator)
{
// start off
actor->user.pos.Z = sectp->floorz;
actor->user.pos.Z = sectp->__int_floorz;
actor->user.z_tgt = actor->int_pos().Z;
if (start_on)
{
int amt;
amt = actor->int_pos().Z - sectp->floorz;
amt = actor->int_pos().Z - sectp->__int_floorz;
// start in the on position
sectp->addfloorz(amt);
sectp->add_int_floorz(amt);
actor->user.z_tgt = actor->user.pos.Z;
MoveSpritesWithSector(actor->sector(), amt, false); // floor
}
// set orig z
actor->user.oz = actor->opos.Z = sectp->floorz;
actor->user.oz = actor->opos.Z = sectp->__int_floorz;
}
else
{
// start off
actor->user.pos.Z = sectp->ceilingz;
actor->user.pos.Z = sectp->__int_ceilingz;
actor->user.z_tgt = actor->int_pos().Z;
if (start_on)
{
int amt;
amt = actor->int_pos().Z - sectp->ceilingz;
amt = actor->int_pos().Z - sectp->__int_ceilingz;
// starting in the on position
sectp->addceilingz(amt);
sectp->add_int_ceilingz(amt);
actor->user.z_tgt = actor->user.pos.Z;
MoveSpritesWithSector(actor->sector(), amt, true); // ceiling
}
// set orig z
actor->user.oz = actor->opos.Z = sectp->ceilingz;
actor->user.oz = actor->opos.Z = sectp->__int_ceilingz;
}
@ -2449,9 +2449,9 @@ void SpriteSetup(void)
sectp->setceilingslope(0);
}
SP_TAG4(actor) = abs(sectp->ceilingz - sectp->floorz)>>8;
SP_TAG4(actor) = abs(sectp->__int_ceilingz - sectp->__int_floorz)>>8;
sectp->setceilingz(sectp->floorz);
sectp->set_int_ceilingz(sectp->__int_floorz);
change_actor_stat(actor, STAT_EXPLODING_CEIL_FLOOR);
break;
@ -4686,7 +4686,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
int DoStayOnFloor(DSWActor* actor)
{
actor->set_int_z(actor->sector()->floorz);
actor->set_int_z(actor->sector()->__int_floorz);
return 0;
}
@ -6516,7 +6516,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
if (retval.type != kHitNone && (actor->sector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (actor->int_pos().Z < actor->sector()->ceilingz)
if (actor->int_pos().Z < actor->sector()->__int_ceilingz)
{
retval.setVoid();
}
@ -6524,7 +6524,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
if (retval.type != kHitNone && (actor->sector()->floorstat & CSTAT_SECTOR_SKY))
{
if (actor->int_pos().Z > actor->sector()->floorz)
if (actor->int_pos().Z > actor->sector()->__int_floorz)
{
retval.setVoid();
}

View file

@ -249,7 +249,7 @@ short ActorFindTrack(DSWActor* actor, int8_t player_dir, int track_type, int* tr
updatesector(near_tp->x, near_tp->y, &track_sect);
// if can see the point, return the track number
if (track_sect && FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - Z(16), actor->sector(), near_tp->x, near_tp->y, track_sect->floorz - Z(32), track_sect))
if (track_sect && FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - Z(16), actor->sector(), near_tp->x, near_tp->y, track_sect->__int_floorz - Z(32), track_sect))
{
return short(near_track - &Track[0]);
}
@ -761,18 +761,18 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop)
// detection and recognition
sect->extra |= SECTFX_SECTOR_OBJECT;
sop->zorig_floor[sop->num_sectors] = sect->floorz;
sop->zorig_ceiling[sop->num_sectors] = sect->ceilingz;
sop->zorig_floor[sop->num_sectors] = sect->__int_floorz;
sop->zorig_ceiling[sop->num_sectors] = sect->__int_ceilingz;
if ((sect->extra & SECTFX_SINK))
sop->zorig_floor[sop->num_sectors] += Z(FixedToInt(sect->depth_fixed));
// lowest and highest floorz's
if (sect->floorz > sop->floor_loz)
sop->floor_loz = sect->floorz;
if (sect->__int_floorz > sop->floor_loz)
sop->floor_loz = sect->__int_floorz;
if (sect->floorz < sop->floor_hiz)
sop->floor_hiz = sect->floorz;
if (sect->__int_floorz < sop->floor_hiz)
sop->floor_hiz = sect->__int_floorz;
sop->num_sectors++;
}
@ -874,7 +874,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop)
itActor->user.pos.X = sop->pmid.X - itActor->int_pos().X;
itActor->user.pos.Y = sop->pmid.Y - itActor->int_pos().Y;
itActor->user.pos.Z = sop->mid_sector->floorz - itActor->int_pos().Z;
itActor->user.pos.Z = sop->mid_sector->__int_floorz - itActor->int_pos().Z;
itActor->user.Flags |= (SPR_SO_ATTACHED);
@ -905,7 +905,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop)
if (sop->sectp[j] == itActor->sector())
{
itActor->user.Flags |= (SPR_ON_SO_SECTOR);
itActor->user.pos.Z = itActor->sector()->floorz - itActor->int_pos().Z;
itActor->user.pos.Z = itActor->sector()->__int_floorz - itActor->int_pos().Z;
break;
}
}
@ -1598,7 +1598,7 @@ void MovePoints(SECTOR_OBJECT* sop, short delta_ang, int nx, int ny)
// setting floorz if need be
if ((sop->flags & SOBJ_ZMID_FLOOR))
sop->pmid.Z = sop->mid_sector->floorz;
sop->pmid.Z = sop->mid_sector->__int_floorz;
DVector2 pivot = { sop->pmid.X * inttoworld, sop->pmid.Y * inttoworld };
DVector2 move = { nx * inttoworld, ny * inttoworld };
@ -1707,12 +1707,12 @@ PlayerPart:
if (actor->user.Flags & (SPR_ON_SO_SECTOR))
{
// move with sector its on
actor->set_int_z(actor->sector()->floorz - actor->user.pos.Z);
actor->set_int_z(actor->sector()->__int_floorz - actor->user.pos.Z);
}
else
{
// move with the mid sector
actor->set_int_z(sop->mid_sector->floorz - actor->user.pos.Z);
actor->set_int_z(sop->mid_sector->__int_floorz - actor->user.pos.Z);
}
}
@ -2037,7 +2037,7 @@ void MoveZ(SECTOR_OBJECT* sop)
if (sop->sectp[i]->hasU() && (sop->sectp[i]->flags & SECTFU_SO_DONT_BOB))
continue;
(*sectp)->setfloorz(sop->zorig_floor[i] + sop->bob_diff);
(*sectp)->set_int_floorz(sop->zorig_floor[i] + sop->bob_diff);
}
}
@ -2386,7 +2386,7 @@ void DoTrack(SECTOR_OBJECT* sop, short locktics, int *nx, int *ny)
if (sop->sectp[i]->hasU() && (sop->sectp[i]->flags & SECTFU_SO_DONT_SINK))
continue;
ndx = AnimSet(ANIM_Floorz, *sectp, dest_sector->floorz, tpoint->tag_high);
ndx = AnimSet(ANIM_Floorz, *sectp, dest_sector->__int_floorz, tpoint->tag_high);
AnimSetCallback(ndx, CallbackSOsink, sop);
AnimSetVelAdj(ndx, 6);
}
@ -2406,7 +2406,7 @@ void DoTrack(SECTOR_OBJECT* sop, short locktics, int *nx, int *ny)
{
if ((*sectp) && (*sectp)->stag == SECT_SO_FORM_WHIRLPOOL)
{
AnimSet(ANIM_Floorz, *sectp, (*sectp)->floorz + Z((*sectp)->height), 128);
AnimSet(ANIM_Floorz, *sectp, (*sectp)->__int_floorz + Z((*sectp)->height), 128);
(*sectp)->floorshade += (*sectp)->height / 6;
(*sectp)->extra &= ~(SECTFX_NO_RIDE);
@ -2534,7 +2534,7 @@ void DoTrack(SECTOR_OBJECT* sop, short locktics, int *nx, int *ny)
// churn through sectors setting their new z values
for (i = 0; sop->sectp[i] != nullptr; i++)
{
AnimSet(ANIM_Floorz, sop->sectp[i], dz - (sop->mid_sector->floorz - sop->sectp[i]->floorz), sop->z_rate);
AnimSet(ANIM_Floorz, sop->sectp[i], dz - (sop->mid_sector->__int_floorz - sop->sectp[i]->__int_floorz), sop->z_rate);
}
}
}
@ -2597,7 +2597,7 @@ void OperateSectorObjectForTics(SECTOR_OBJECT* sop, short newang, int newx, int
if (sop->sectp[i]->hasU() && (sop->sectp[i]->flags & SECTFU_SO_DONT_BOB))
continue;
(*sectp)->setfloorz(sop->zorig_floor[i] + sop->bob_diff);
(*sectp)->set_int_floorz(sop->zorig_floor[i] + sop->bob_diff);
}
}
@ -2708,7 +2708,7 @@ void DoTornadoObject(SECTOR_OBJECT* sop)
yvect = sop->vel * bcos(*ang);
auto cursect = sop->op_main_sector; // for sop->vel
floor_dist = (abs(cursect->ceilingz - cursect->floorz)) >> 2;
floor_dist = (abs(cursect->__int_ceilingz - cursect->__int_floorz)) >> 2;
pos.X = sop->pmid.X;
pos.Y = sop->pmid.Y;
pos.Z = floor_dist;
@ -3024,7 +3024,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
if (!hit.hitWall->twoSided())
return false;
zdiff = labs(actor->int_pos().Z - hit.hitWall->nextSector()->floorz) >> 8;
zdiff = labs(actor->int_pos().Z - hit.hitWall->nextSector()->__int_floorz) >> 8;
actor->user.jump_speed = PickJumpSpeed(actor, zdiff);
}
@ -3284,7 +3284,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
if (actor->user.Flags & (SPR_ZDIFF_MODE))
{
actor->user.Flags &= ~(SPR_ZDIFF_MODE);
actor->set_int_z(actor->sector()->floorz);
actor->set_int_z(actor->sector()->__int_floorz);
actor->spr.zvel = 0;
}
else
@ -3342,9 +3342,9 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
// destination z for climbing
if (wal->twoSided())
actor->user.pos.Z = wal->nextSector()->floorz;
actor->user.pos.Z = wal->nextSector()->__int_floorz;
else
actor->user.pos.Z = wal->sectorp()->ceilingz; // don't crash on bad setups.
actor->user.pos.Z = wal->sectorp()->__int_ceilingz; // don't crash on bad setups.
DoActorZrange(actor);

View file

@ -455,7 +455,7 @@ int DoVator(DSWActor* actor)
{
if (itActor->spr.statnum == STAT_ENEMY)
{
if (labs(sectp->ceilingz - sectp->floorz) < ActorSizeZ(itActor))
if (labs(sectp->__int_ceilingz - sectp->__int_floorz) < ActorSizeZ(itActor))
{
InitBloodSpray(itActor, true, -1);
UpdateSinglePlayKills(itActor);
@ -501,7 +501,7 @@ int DoVator(DSWActor* actor)
{
if (itActor->spr.statnum == STAT_ENEMY)
{
if (labs(sectp->ceilingz - sectp->floorz) < ActorSizeZ(itActor))
if (labs(sectp->__int_ceilingz - sectp->__int_floorz) < ActorSizeZ(itActor))
{
InitBloodSpray(itActor, true, -1);
UpdateSinglePlayKills(itActor);

View file

@ -4299,7 +4299,7 @@ bool WeaponMoveHit(DSWActor* actor)
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpicnum != FAF_MIRROR_PIC)
{
if (labs(actor->int_pos().Z - sectp->ceilingz) < ActorSizeZ(actor))
if (labs(actor->int_pos().Z - sectp->__int_ceilingz) < ActorSizeZ(actor))
{
SetSuicide(actor);
return true;
@ -4502,7 +4502,7 @@ int DoFireballFlames(DSWActor* actor)
{
if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 0)
{
if (labs(actor->sector()->floorz - actor->int_pos().Z) <= Z(4))
if (labs(actor->sector()->__int_floorz - actor->int_pos().Z) <= Z(4))
{
KillActor(actor);
return 0;
@ -4575,7 +4575,7 @@ int DoBreakFlames(DSWActor* actor)
{
if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 0)
{
if (labs(actor->sector()->floorz - actor->int_pos().Z) <= Z(4))
if (labs(actor->sector()->__int_floorz - actor->int_pos().Z) <= Z(4))
{
KillActor(actor);
return 0;
@ -10205,7 +10205,7 @@ void AddSpriteToSectorObject(DSWActor* actor, SECTOR_OBJECT* sop)
actor->user.pos.X = sop->pmid.X - actor->int_pos().X;
actor->user.pos.Y = sop->pmid.Y - actor->int_pos().Y;
actor->user.pos.Z = sop->mid_sector->floorz - actor->int_pos().Z;
actor->user.pos.Z = sop->mid_sector->__int_floorz - actor->int_pos().Z;
actor->user.sang = actor->spr.ang;
}
@ -10255,13 +10255,13 @@ void SpawnBigGunFlames(DSWActor* actor, DSWActor* Operator, SECTOR_OBJECT* sop,
if (actor->user.Flags & (SPR_ON_SO_SECTOR))
{
// move with sector its on
expActor->set_int_z(actor->sector()->floorz - actor->user.pos.Z);
expActor->set_int_z(actor->sector()->__int_floorz - actor->user.pos.Z);
expActor->backupz();
}
else
{
// move with the mid sector
expActor->set_int_z(sop->mid_sector->floorz - actor->user.pos.Z);
expActor->set_int_z(sop->mid_sector->__int_floorz - actor->user.pos.Z);
expActor->backupz();
}
@ -11938,7 +11938,7 @@ int InitSwordAttack(PLAYER* pp)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -12132,7 +12132,7 @@ int InitFistAttack(PLAYER* pp)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -12752,13 +12752,13 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
if (hit.actor() == nullptr && hit.hitWall == nullptr)
{
if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1))
if (labs(hit.hitpos.Z - hit.hitSector->__int_ceilingz) <= Z(1))
{
hit.hitpos.Z += Z(16);
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
return 0;
}
else if (labs(hit.hitpos.Z - hit.hitSector->floorz) <= Z(1))
else if (labs(hit.hitpos.Z - hit.hitSector->__int_floorz) <= Z(1))
{
}
}
@ -12769,7 +12769,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -12885,7 +12885,7 @@ int InitShotgun(PLAYER* pp)
if (hit.actor() == nullptr && hit.hitWall == nullptr)
{
if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1))
if (labs(hit.hitpos.Z - hit.hitSector->__int_ceilingz) <= Z(1))
{
hit.hitpos.Z += Z(16);
cstat |= (CSTAT_SPRITE_YFLIP);
@ -12900,7 +12900,7 @@ int InitShotgun(PLAYER* pp)
continue;
}
}
else if (labs(hit.hitpos.Z - hit.hitSector->floorz) <= Z(1))
else if (labs(hit.hitpos.Z - hit.hitSector->__int_floorz) <= Z(1))
{
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
{
@ -12923,7 +12923,7 @@ int InitShotgun(PLAYER* pp)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
continue;
}
@ -15217,7 +15217,7 @@ int InitUzi(PLAYER* pp)
// check to see what you hit
if (hit.actor() == nullptr && hit.hitWall == nullptr)
{
if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1))
if (labs(hit.hitpos.Z - hit.hitSector->__int_ceilingz) <= Z(1))
{
hit.hitpos.Z += Z(16);
cstat |= (CSTAT_SPRITE_YFLIP);
@ -15232,7 +15232,7 @@ int InitUzi(PLAYER* pp)
return 0;
}
}
else if (labs(hit.hitpos.Z - hit.hitSector->floorz) <= Z(1))
else if (labs(hit.hitpos.Z - hit.hitSector->__int_floorz) <= Z(1))
{
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
{
@ -15256,7 +15256,7 @@ int InitUzi(PLAYER* pp)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -15706,7 +15706,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
if (hit.actor() == nullptr && hit.hitWall == nullptr)
{
if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1))
if (labs(hit.hitpos.Z - hit.hitSector->__int_ceilingz) <= Z(1))
{
hit.hitpos.Z += Z(16);
cstat |= (CSTAT_SPRITE_YFLIP);
@ -15714,7 +15714,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
return 0;
}
else if (labs(hit.hitpos.Z - hit.hitSector->floorz) <= Z(1))
else if (labs(hit.hitpos.Z - hit.hitSector->__int_floorz) <= Z(1))
{
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
{
@ -16087,7 +16087,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
if (hit.actor() == nullptr && hit.hitWall == nullptr)
{
if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1))
if (labs(hit.hitpos.Z - hit.hitSector->__int_ceilingz) <= Z(1))
{
hit.hitpos.Z += Z(16);
cstat |= (CSTAT_SPRITE_YFLIP);
@ -16095,7 +16095,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
continue;
}
else if (labs(hit.hitpos.Z - hit.hitSector->floorz) <= Z(1))
else if (labs(hit.hitpos.Z - hit.hitSector->__int_floorz) <= Z(1))
{
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
{
@ -16112,7 +16112,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -16245,7 +16245,7 @@ int InitEnemyUzi(DSWActor* actor)
{
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
{
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
if (hit.hitpos.Z < hit.hitWall->nextSector()->__int_ceilingz)
{
return 0;
}
@ -16810,7 +16810,7 @@ bool WarpToUnderwater(sectortype** psectu, int *x, int *y, int *z)
*psectu = under;
}
*z = underActor->sector()->ceilingz + Z(1);
*z = underActor->sector()->__int_ceilingz + Z(1);
return true;
}
@ -16875,7 +16875,7 @@ bool WarpToSurface(sectortype** psectu, int *x, int *y, int *z)
*psectu = over;
}
*z = overActor->sector()->floorz - Z(2);
*z = overActor->sector()->__int_floorz - Z(2);
return true;
}
@ -16944,7 +16944,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor)
ChangeActorSect(actor, over);
}
actor->set_int_z(underActor->sector()->ceilingz + actor->user.ceiling_dist+Z(1));
actor->set_int_z(underActor->sector()->__int_ceilingz + actor->user.ceiling_dist+Z(1));
actor->backuppos();
@ -17013,7 +17013,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
ChangeActorSect(actor, over);
}
actor->set_int_z(overActor->sector()->floorz - Z(2));
actor->set_int_z(overActor->sector()->__int_floorz - Z(2));
// set z range and wade depth so we know how high to set view
DoActorZrange(actor);
@ -17103,7 +17103,7 @@ bool MissileHitDiveArea(DSWActor* actor)
return false;
// Check added by Jim because of sprite bridge over water
if (actor->int_pos().Z < (hit_sect->floorz-Z(20)))
if (actor->int_pos().Z < (hit_sect->__int_floorz-Z(20)))
return false;
actor->user.Flags |= (SPR_UNDERWATER);
@ -17245,7 +17245,7 @@ int DoBubble(DSWActor* actor)
actor->spr.xrepeat = actor->user.pos.X + (RANDOM_P2(8 << 8) >> 8) - 4;
actor->spr.yrepeat = actor->user.pos.Y + (RANDOM_P2(8 << 8) >> 8) - 4;
if (actor->int_pos().Z < actor->sector()->ceilingz)
if (actor->int_pos().Z < actor->sector()->__int_ceilingz)
{
if (SectorIsUnderwaterArea(actor->user.hi_sectp))
{