From e80c32cfd4be924c5b7f9c159b2301044498f58d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 4 Oct 2022 19:24:00 +0200 Subject: [PATCH] - handle magic clipdist values --- source/games/sw/src/sector.cpp | 2 +- source/games/sw/src/sprite.cpp | 2 +- source/games/sw/src/track.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index cf44c628c..d699c90b4 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -1269,7 +1269,7 @@ void WeaponExplodeSectorInRange(DSWActor* wActor) // test to see if explosion is close to crack sprite double dist = (wActor->spr.pos - actor->spr.pos).Length(); - if (actor->native_clipdist() == 0) + if (actor->clipdist == 0) continue; double radius = actor->clipdist * 8; diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index d21f28633..e57a4114c 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -1844,7 +1844,7 @@ void SpriteSetup(void) { sectp->u_defined = true; sectp->number = actor->spr.lotag; - if (actor->native_clipdist() == 1) + if (actor->spr.clipdist == 1) // notreallyclipdist sectp->flags |= (SECTFU_CANT_SURFACE); change_actor_stat(actor, STAT_UNDERWATER2); } diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 0c451897a..12f7274bc 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -1067,7 +1067,7 @@ void SetupSectorObject(sectortype* sectp, short tag) break; case SPAWN_SPOT: - if (actor->native_clipdist() == 3) + if (actor->spr.clipdist == 3) // notreallyclipdist { change_actor_stat(actor, STAT_NO_STATE); SpawnUser(actor, 0, nullptr); @@ -2580,7 +2580,7 @@ void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATOR* animator) { case SPAWN_SPOT: - if (actor->native_clipdist() == 3) + if (actor->spr.clipdist == 3) // notreallyclipdist { if (animator) {