From b14ab1bde36b334f6fd8d0d38622d51adb7c184c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 11 Sep 2022 08:45:06 +0200 Subject: [PATCH] - use a lower value range for the xy factor in movespritevel. --- source/games/exhumed/src/engine.h | 2 +- source/games/exhumed/src/fish.cpp | 4 ++-- source/games/exhumed/src/lavadude.cpp | 4 ++-- source/games/exhumed/src/move.cpp | 4 ++-- source/games/exhumed/src/object.cpp | 4 ++-- source/games/exhumed/src/spider.cpp | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/games/exhumed/src/engine.h b/source/games/exhumed/src/engine.h index 1f02bccd4..72616b101 100644 --- a/source/games/exhumed/src/engine.h +++ b/source/games/exhumed/src/engine.h @@ -36,7 +36,7 @@ Collision movesprite(DExhumedActor* spritenum, DVector2 vect, double dz, double inline Collision movespritevel(DExhumedActor* spritenum, const DVector3& pos, double xyfactor, int flordist, unsigned int clipmask) { - return movesprite(spritenum, pos.XY() * xyfactor / 16384., pos.Z, flordist, clipmask); + return movesprite(spritenum, pos.XY() * xyfactor / 64, pos.Z, flordist, clipmask); } void precache(); diff --git a/source/games/exhumed/src/fish.cpp b/source/games/exhumed/src/fish.cpp index 368ef1654..68d8f0bc0 100644 --- a/source/games/exhumed/src/fish.cpp +++ b/source/games/exhumed/src/fish.cpp @@ -130,7 +130,7 @@ void AIFishLimb::Tick(RunListEvent* ev) } else { - auto coll = movespritevel(pActor, pActor->vel, 256., -10, CLIPMASK1); + auto coll = movespritevel(pActor, pActor->vel, 1., -10, CLIPMASK1); if (coll.type != kHitNone) { pActor->vel.X = 0; @@ -469,7 +469,7 @@ void AIFish::Tick(RunListEvent* ev) auto pSector =pActor->sector(); // loc_2EF54 - Collision coll = movespritevel(pActor, pActor->vel * 4, 2048., 0, CLIPMASK0); + Collision coll = movespritevel(pActor, pActor->vel * 4, 8., 0, CLIPMASK0); if (!(pActor->sector()->Flag & kSectUnderwater)) { diff --git a/source/games/exhumed/src/lavadude.cpp b/source/games/exhumed/src/lavadude.cpp index daa984e77..2ccf1237c 100644 --- a/source/games/exhumed/src/lavadude.cpp +++ b/source/games/exhumed/src/lavadude.cpp @@ -73,7 +73,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev) pActor->spr.shade += 3; - auto coll = movespritevel(pActor, pActor->vel, 4096., -10, CLIPMASK1); + auto coll = movespritevel(pActor, pActor->vel, 16., -10, CLIPMASK1); if (coll.type || pActor->spr.shade > 100) { @@ -279,7 +279,7 @@ void AILavaDude::Tick(RunListEvent* ev) auto pos = pActor->spr.pos; auto pSector =pActor->sector(); - auto coll = movespritevel(pActor, DVector3(pActor->vel.XY(), 0), 256., 0, CLIPMASK0); + auto coll = movespritevel(pActor, DVector3(pActor->vel.XY(), 0), 1., 0, CLIPMASK0); if (pSector != pActor->sector()) { diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index ad47399d1..43489baba 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -539,7 +539,7 @@ void Gravity(DExhumedActor* pActor) Collision MoveCreature(DExhumedActor* pActor) { - return movespritevel(pActor, pActor->vel, 256., -20, CLIPMASK0); + return movespritevel(pActor, pActor->vel, 1., -20, CLIPMASK0); } //--------------------------------------------------------------------------- @@ -1250,7 +1250,7 @@ void AICreatureChunk::Tick(RunListEvent* ev) auto pSector = pActor->sector(); pActor->spr.pal = pSector->ceilingpal; - auto nVal = movespritevel(pActor, pActor->vel, 1024., -10, CLIPMASK1); + auto nVal = movespritevel(pActor, pActor->vel, 4., -10, CLIPMASK1); if (pActor->spr.pos.Z >= pSector->floorz) { diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 860285347..5620f7628 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1504,7 +1504,7 @@ void AISpark::Tick(RunListEvent* ev) pActor->vel.Z += 0.5; - auto nMov = movespritevel(pActor, pActor->vel, 4096, -10, CLIPMASK1); + auto nMov = movespritevel(pActor, pActor->vel, 16., -10, CLIPMASK1); if (!nMov.type && !nMov.exbits) { return; } @@ -2013,7 +2013,7 @@ void AIObject::Tick(RunListEvent* ev) FUNCOBJECT_GOTO: if (nStat != kStatExplodeTarget) { - auto nMov = movespritevel(pActor, pActor->vel, 64., 0, CLIPMASK0); + auto nMov = movespritevel(pActor, pActor->vel, 0.25, 0, CLIPMASK0); if (pActor->spr.statnum == kStatExplodeTrigger) { pActor->spr.pal = 1; diff --git a/source/games/exhumed/src/spider.cpp b/source/games/exhumed/src/spider.cpp index fe1735f5c..92253cab8 100644 --- a/source/games/exhumed/src/spider.cpp +++ b/source/games/exhumed/src/spider.cpp @@ -104,7 +104,7 @@ void AISpider::Tick(RunListEvent* ev) int nAction = spp->nAction; - int nVel = 6; + double nVel = 0.25; if (spp->nHealth) { @@ -164,7 +164,7 @@ void AISpider::Tick(RunListEvent* ev) case 1: { if (pTarget) { - nVel++; + nVel *= 2; } goto case_3; break; @@ -285,7 +285,7 @@ void AISpider::Tick(RunListEvent* ev) spp->vel.Y = 0; } - auto nMov = movespritevel(spp, spp->vel, 1 << nVel, -5, CLIPMASK0); + auto nMov = movespritevel(spp, spp->vel, nVel, -5, CLIPMASK0); if (nMov.type == kHitNone && nMov.exbits == 0) return;