diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index a3db864a3..f4fa4f016 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -746,8 +746,8 @@ void nnExtInitModernStuff(TArray& actors) // very quick fix for floor sprites with Touch trigger flag if their Z is equals sector florz / ceilgz if (actor->insector() && actor->xspr.Touch && (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)) { - if (actor->int_pos().Z == actor->sector()->int_floorz()) actor->spr.pos.Z -= zmaptoworld; - else if (actor->int_pos().Z == actor->sector()->int_ceilingz()) actor->spr.pos.Z += zmaptoworld; + if (actor->spr.pos.Z == actor->sector()->floorz) actor->spr.pos.Z -= zmaptoworld; + else if (actor->spr.pos.Z == actor->sector()->ceilingz) actor->spr.pos.Z += zmaptoworld; } // make Proximity flag work not just for dudes and things... diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 50001544a..a193c62b8 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -2821,7 +2821,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6) if (actor->spr.xvel <= 64 && statstate) S_StopSound(actor->tempsound, actor); - if ((sc->int_floorz() - sc->int_ceilingz()) < (108 << 8)) + if ((sc->floorz - sc->ceilingz) < 108) { if (ud.clipping == 0 && actor->spr.xvel >= 192) for (int p = connecthead; p >= 0; p = connectpoint2[p]) @@ -2910,7 +2910,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->spr.pos); - if ((sc->int_floorz() - sc->int_ceilingz()) < (108 << 8)) + if ((sc->floorz - sc->ceilingz) < 108) { if (ud.clipping == 0 && actor->spr.xvel >= 192) for (int p = connecthead; p >= 0; p = connectpoint2[p]) @@ -3011,7 +3011,7 @@ void handle_se30(DDukeActor *actor, int JIBS6) int l = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14); int x = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14); - if ((sc->int_floorz() - sc->int_ceilingz()) < (108 << 8)) + if ((sc->floorz - sc->ceilingz) < 108) if (ud.clipping == 0) for (int p = connecthead; p >= 0; p = connectpoint2[p]) { @@ -3775,7 +3775,7 @@ void handle_se16(DDukeActor* actor, int REACTOR, int REACTOR2) auto sc = actor->sector(); actor->temp_data[2] += 32; - if (sc->int_floorz() < sc->int_ceilingz()) actor->spr.shade = 0; + if (sc->floorz < sc->ceilingz) actor->spr.shade = 0; else if (sc->int_ceilingz() < actor->temp_data[3]) { @@ -3800,8 +3800,8 @@ void handle_se16(DDukeActor* actor, int REACTOR, int REACTOR2) else actor->spr.shade = 1; } - if (actor->spr.shade) sc->add_int_ceilingz(1024); - else sc->add_int_ceilingz(-512); + if (actor->spr.shade) sc->addceilingz(4); + else sc->addceilingz(-2); ms(actor); //SetActor(actor, actor->spr.pos); @@ -4062,11 +4062,11 @@ void handle_se19(DDukeActor *actor, int BIGFORCE) } } - if (sc->int_ceilingz() < sc->int_floorz()) + if (sc->ceilingz < sc->floorz) sc->add_int_ceilingz(actor->spr.yvel); else { - sc->set_int_ceilingz(sc->int_floorz()); + sc->setceilingz(sc->floorz); DukeStatIterator it(STAT_EFFECTOR); while (auto a2 = it.Next()) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a02cd75e8..6acfb0cc5 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -3167,7 +3167,7 @@ void handle_se06_r(DDukeActor *actor) auto ns = spawn(actor, HULK); if (ns) { - ns->set_int_z(ns->sector()->int_ceilingz()); + ns->spr.pos.Z = ns->sector()->ceilingz; ns->spr.pal = 33; } if (!hulkspawn) @@ -3225,7 +3225,7 @@ void handle_se06_r(DDukeActor *actor) } else pn = UFO1_RRRA; auto ns = spawn(actor, pn); - if (ns) ns->set_int_z(ns->sector()->int_ceilingz()); + if (ns) ns->spr.pos.Z = ns->sector()->ceilingz; } } } diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 3d73c1c21..08a7c1045 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -1728,7 +1728,7 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz, if (p->player_int_pos().Z > (fz - (k << 8))) p->pos.Z += (((fz - (k << 8)) - p->player_int_pos().Z) >> 1) * zinttoworld; - if (p->player_int_pos().Z < (pact->actor_int_ceilingz() + (18 << 8))) + if (p->pos.Z < pact->ceilingz + 18) p->pos.Z = pact->ceilingz + 18; } diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 8d4bcff1b..53cc3678f 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -881,7 +881,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel) nZVal = pSector->int_ceilingz(); pos.Z = pNextSector->int_ceilingz() + 256; - pSector->set_int_ceilingz(pNextSector->int_ceilingz()); + pSector->setceilingz(pNextSector->ceilingz); } else { diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 5c9d465e7..e05306aa3 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -879,7 +879,7 @@ void DoExplodeSector(short match) sectp = actor->sector(); - sectp->add_int_ceilingz(-Z(SP_TAG4(actor))); + sectp->addceilingz(-SP_TAG4(actor)); if (SP_TAG5(actor)) { @@ -1255,7 +1255,7 @@ void DoChangorMatch(short match) if (TEST_BOOL1(actor)) { sectp->ceilingpicnum = SP_TAG4(actor); - sectp->add_int_ceilingz(Z(SP_TAG5(actor))); + sectp->addceilingz(SP_TAG5(actor)); sectp->ceilingheinum += SP_TAG6(actor); if (sectp->ceilingheinum) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 28a57e5e7..3351035e4 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -11937,7 +11937,7 @@ int InitSwordAttack(PLAYER* pp) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { return 0; } @@ -12131,7 +12131,7 @@ int InitFistAttack(PLAYER* pp) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { return 0; } @@ -12922,7 +12922,7 @@ int InitShotgun(PLAYER* pp) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { continue; } @@ -15200,7 +15200,7 @@ int InitUzi(PLAYER* pp) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { return 0; } @@ -16056,7 +16056,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { return 0; } @@ -16189,7 +16189,7 @@ int InitEnemyUzi(DSWActor* actor) { if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY)) { - if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz()) + if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz) { return 0; } @@ -17189,7 +17189,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()->int_ceilingz()) + if (actor->spr.pos.Z < actor->sector()->ceilingz) { if (SectorIsUnderwaterArea(actor->user.hi_sectp)) {