mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- Blood: don't pass an actor's position directly to ClipMove
This commit is contained in:
parent
4f391e46ce
commit
04c9422db8
2 changed files with 9 additions and 3 deletions
|
@ -4541,7 +4541,9 @@ 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.X >> 12, actor->vel.Y >> 12, actor->spr.clipdist << 2, (actor->spr.pos.Z - top) / 4, (bottom - actor->spr.pos.Z) / 4, CLIPMASK0, lhit);
|
||||
auto pos = actor->spr.pos;
|
||||
ClipMove(pos, &pSector, actor->vel.X >> 12, actor->vel.Y >> 12, actor->spr.clipdist << 2, (actor->spr.pos.Z - top) / 4, (bottom - actor->spr.pos.Z) / 4, CLIPMASK0, lhit);
|
||||
actor->set_int_pos(pos);
|
||||
actor->hit.hit = lhit;
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
actor->spr.cstat = bakCstat;
|
||||
|
@ -4761,7 +4763,9 @@ void MoveDude(DBloodActor* actor)
|
|||
{
|
||||
auto bakCstat = actor->spr.cstat;
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
ClipMove(actor->spr.pos, &pSector, actor->vel.X >> 12, actor->vel.Y >> 12, wd, tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
auto pos = actor->spr.pos;
|
||||
ClipMove(pos, &pSector, actor->vel.X >> 12, actor->vel.Y >> 12, wd, tz, bz, CLIPMASK0, actor->hit.hit);
|
||||
actor->set_int_pos(pos);
|
||||
if (pSector == nullptr)
|
||||
{
|
||||
pSector = actor->sector();
|
||||
|
|
|
@ -1676,8 +1676,10 @@ 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.X >> 12,
|
||||
auto pos = actor->spr.pos;
|
||||
ClipMove(pos, &pSector, actor->vel.X >> 12,
|
||||
actor->vel.Y >> 12, clipDist, ceilDist, floorDist, CLIPMASK0, moveHit);
|
||||
actor->set_int_pos(pos);
|
||||
actor->hit.hit = moveHit;
|
||||
|
||||
actor->spr.cstat = oldcstat;
|
||||
|
|
Loading…
Reference in a new issue