diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index e1371e328..2c79c536c 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -349,7 +349,7 @@ int DoActorSectorDamage(DSWActor* actor) } // note that most squishing is done in vator.c - if (actor->user.lo_sectp && actor->user.hi_sectp && abs(actor->user.int_loz() - actor->user.int_hiz()) < (int_ActorSizeZ(actor) >> 1)) + if (actor->user.lo_sectp && actor->user.hi_sectp && abs(actor->user.loz - actor->user.hiz) < (ActorSizeZ(actor) * 0.5)) { actor->user.Health = 0; if (SpawnShrap(actor, nullptr, WPN_NM_SECTOR_SQUISH)) @@ -429,7 +429,7 @@ int DoActorDebris(DSWActor* actor) if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 10) // JBF: added null check { actor->user.WaitTics = (actor->user.WaitTics + (ACTORMOVETICS << 3)) & 1023; - actor->set_int_z(actor->user.int_loz() - MulScale(Z(2), bsin(actor->user.WaitTics), 14)); + actor->spr.pos.Z = actor->user.loz - 2 * DAngle::fromBuild(actor->user.WaitTics).Sin(); } } else @@ -867,9 +867,9 @@ int DoFall(DSWActor* actor) actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS); // Stick like glue when you hit the ground - if (actor->int_pos().Z > actor->user.int_loz() - actor->user.int_floor_dist()) + if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist) { - actor->set_int_z(actor->user.int_loz() - actor->user.int_floor_dist()); + actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist; actor->user.Flags &= ~(SPR_FALLING); } diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index 12dca9952..2e6a0a193 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -232,7 +232,7 @@ int SetupSkull(DSWActor* actor) actor->user.Radius = 400; - if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16)) + if (ActorZOfBottom(actor) > actor->user.loz - 16) { actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum); @@ -617,7 +617,7 @@ int SetupBetty(DSWActor* actor) actor->user.Radius = 400; - if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16)) + if (ActorZOfBottom(actor) > actor->user.loz - 16) { actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum); diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index ca8d019c5..d4bcfa681 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -14601,11 +14601,11 @@ int InitCoolgFire(DSWActor* actor) int DoCoolgDrip(DSWActor* actor) { actor->user.Counter += 220; - actor->add_int_z(actor->user.Counter); + actor->spr.pos.Z += actor->user.Counter * maptoworld; - if (actor->int_pos().Z > actor->user.int_loz() - actor->user.int_floor_dist()) + if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist) { - actor->set_int_z(actor->user.int_loz() - actor->user.int_floor_dist()); + actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist; actor->spr.yrepeat = actor->spr.xrepeat = 32; ChangeState(actor, s_GoreFloorSplash); if (actor->user.spal == PALETTE_BLUE_LIGHTING)