mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- same for Blood's ClipMove
This commit is contained in:
parent
9257fe0078
commit
69f27d42aa
4 changed files with 7 additions and 7 deletions
|
@ -4511,7 +4511,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
if ((actor->GetOwner()) && !cl_bloodvanillaexplosions && !VanillaMode())
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), actor->int_clipdist(), (actor->spr.pos.Z - top) * 0.25, (bottom - actor->spr.pos.Z) * 0.25, CLIPMASK0, lhit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), actor->fClipdist(), (actor->spr.pos.Z - top) * 0.25, (bottom - actor->spr.pos.Z) * 0.25, CLIPMASK0, lhit);
|
||||
actor->hit.hit = lhit;
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
actor->spr.cstat = bakCstat;
|
||||
|
@ -4725,7 +4725,7 @@ void MoveDude(DBloodActor* actor)
|
|||
auto bakCstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
// Note: vel is Q16.16, ClipMove wants Q28.4, which passes it on to clipmove which wants Q14.18. Anyone confused yet...?
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), int(wdf * worldtoint), tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), wdf, tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
if (pSector == nullptr)
|
||||
{
|
||||
pSector = actor->sector();
|
||||
|
@ -5224,7 +5224,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL; // remove self collisions for accurate clipmove
|
||||
}
|
||||
Collision clipmoveresult;
|
||||
ClipMove(ppos, &pSector2, vel.XY(), actor->int_clipdist(), (ppos.Z - top) / 4, (bottom - ppos.Z) / 4, CLIPMASK0, clipmoveresult, 1);
|
||||
ClipMove(ppos, &pSector2, vel.XY(), actor->fClipdist(), (ppos.Z - top) / 4, (bottom - ppos.Z) / 4, CLIPMASK0, clipmoveresult, 1);
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
actor->spr.cstat = bakSpriteCstat;
|
||||
auto pSector = pSector2;
|
||||
|
|
|
@ -510,7 +510,7 @@ void GetZRangeAtXYZ(const DVector3& pos, sectortype* pSector, double* ceilZ, Col
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, int wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount)
|
||||
void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, double wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount)
|
||||
{
|
||||
auto opos = pos;
|
||||
sectortype* bakSect = *pSector;
|
||||
|
@ -521,7 +521,7 @@ void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, int wd,
|
|||
vel.X = (FloatToFixed(vect.X) >> 12) / 16.;
|
||||
vel.Y = (FloatToFixed(vect.Y) >> 12) / 16.;
|
||||
|
||||
clipmove(pos, &bakSect, vel, wd * inttoworld, cd, fd, nMask, hit, tracecount);
|
||||
clipmove(pos, &bakSect, vel, wd, cd, fd, nMask, hit, tracecount);
|
||||
if (bakSect == nullptr)
|
||||
{
|
||||
pos = opos;
|
||||
|
|
|
@ -39,7 +39,7 @@ int VectorScan(DBloodActor* pSprite, double nOffset, double nZOffset, const DVec
|
|||
void GetZRange(DBloodActor* pSprite, double* ceilZ, Collision* ceilHit, double* floorZ, Collision* floorHit, double nDist, unsigned int nMask, unsigned int nClipParallax = 0);
|
||||
void GetZRangeAtXYZ(const DVector3& pos, sectortype* pSector, double* ceilZ, Collision* ceilHit, double* floorZ, Collision* floorHit, double nDist, unsigned int nMask, unsigned int nClipParallax = 0);
|
||||
|
||||
void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, int wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3);
|
||||
void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, double wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3);
|
||||
BitArray GetClosestSpriteSectors(sectortype* pSector, const DVector2& pos, int nDist, TArray<walltype*>* pWalls, bool newSectCheckMethod = false);
|
||||
int picWidth(int nPic, int repeat);
|
||||
int picHeight(int nPic, int repeat);
|
||||
|
|
|
@ -1661,7 +1661,7 @@ void debrisMove(int listIndex)
|
|||
auto oldcstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), int(clipDistf * worldtoint), ceilDist, floorDist, CLIPMASK0, moveHit);
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.XY(), clipDistf, ceilDist, floorDist, CLIPMASK0, moveHit);
|
||||
actor->hit.hit = moveHit;
|
||||
|
||||
actor->spr.cstat = oldcstat;
|
||||
|
|
Loading…
Reference in a new issue