From c7c9ab52cef63e8bb2ad6f33f94478eaad09de34 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Aug 2022 22:21:35 +0200 Subject: [PATCH] - the last remaining set_int_z calls in SW. --- source/games/sw/src/draw.cpp | 6 +++--- source/games/sw/src/jweapon.cpp | 6 +++--- source/games/sw/src/spike.cpp | 4 ++-- source/games/sw/src/weapon.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index eaaa60729..c502f56f2 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -634,9 +634,9 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int // workaround for mines and floor decals beneath the floor if (tsp->picnum == BETTY_R0 || tsp->picnum == FLOORBLOOD1) { - int32_t const florz = getflorzofslopeptr(tActor->sector(), tActor->int_pos().X, tActor->int_pos().Y); - if (tActor->int_pos().Z > florz) - tsp->set_int_z(florz); + double const florz = getflorzofslopeptrf(tActor->sector(), tActor->spr.pos); + if (tActor->spr.pos.Z > florz) + tsp->pos.Z = florz; } if (r_shadows && (tActor->user.Flags & SPR_SHADOW)) diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index 99234dde5..c3bdbcec9 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -334,7 +334,7 @@ void SpawnFloorSplash(DSWActor* actor) int DoBloodSpray(DSWActor* actor) { - int cz,fz; + double cz,fz; if (actor->user.Flags & (SPR_UNDERWATER)) { @@ -356,9 +356,9 @@ int DoBloodSpray(DSWActor* actor) getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz); // pretend like we hit a sector - if (actor->int_pos().Z >= fz) + if (actor->spr.pos.Z >= fz) { - actor->set_int_z(fz); + actor->spr.pos.Z = fz; SpawnFloorSplash(actor); KillActor(actor); return true; diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index e67bd5a2d..49abc03ac 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -247,7 +247,7 @@ void SpikeAlign(DSWActor* actor) void MoveSpritesWithSpike(sectortype* sect) { - int cz,fz; + double cz,fz; SWSectIterator it(sect); while (auto actor = it.Next()) @@ -259,7 +259,7 @@ void MoveSpritesWithSpike(sectortype* sect) continue; getzsofslopeptr(sect, actor->spr.pos, &cz, &fz); - actor->set_int_z(fz); + actor->spr.pos.Z = fz; } } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 876906904..0013216ee 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -9731,7 +9731,7 @@ void SpawnBreakStaticFlames(DSWActor* actor) actorNew->user.Radius = 200; actorNew->user.floor_dist = actorNew->user.ceiling_dist = 0; - actorNew->set_int_z(getflorzofslopeptr(actorNew->sector(), actorNew->int_pos().X, actorNew->int_pos().Y)); + actorNew->spr.pos.Z = getflorzofslopeptrf(actorNew->sector(), actorNew->spr.pos); PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler); }