- use a lower value range for the xy factor in movespritevel.

This commit is contained in:
Christoph Oelckers 2022-09-11 08:45:06 +02:00
parent 59950062b7
commit b14ab1bde3
6 changed files with 12 additions and 12 deletions

View file

@ -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();

View file

@ -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))
{

View file

@ -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())
{

View file

@ -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)
{

View file

@ -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;

View file

@ -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;