mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- 3 simple set_int_pos replacements
This commit is contained in:
parent
ac3302733f
commit
559c24fa92
2 changed files with 4 additions and 12 deletions
|
@ -2298,10 +2298,7 @@ static void greenslime(DDukeActor *actor)
|
|||
{
|
||||
s5->spr.xvel = 0;
|
||||
|
||||
int l = s5->int_ang();
|
||||
|
||||
actor->set_int_pos({ s5->int_pos().X + bcos(l, -11), s5->int_pos().Y + bsin(l, -11), s5->int_pos().Z });
|
||||
|
||||
actor->spr.pos = s5->spr.pos + s5->spr.angle.ToVector() * 0.5;
|
||||
actor->spr.picnum = GREENSLIME + 2 + (global_random & 1);
|
||||
|
||||
if (actor->spr.yrepeat < 64) actor->spr.yrepeat += 2;
|
||||
|
|
|
@ -535,9 +535,7 @@ Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist
|
|||
}
|
||||
|
||||
Collision coll;
|
||||
auto pos = pActor->int_pos();
|
||||
clipmove(pos, &pSector, dx, dy, nClipDist, nSpriteHeight, flordist, clipmask, coll);
|
||||
pActor->set_int_pos(pos);
|
||||
clipmove(pActor->spr.pos, &pSector, dx, dy, nClipDist, nSpriteHeight, flordist, clipmask, coll);
|
||||
if (coll.type != kHitNone) // originally this or'ed the two values which can create unpredictable bad values in some edge cases.
|
||||
{
|
||||
coll.exbits = nRet.exbits;
|
||||
|
@ -1028,10 +1026,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
if (pActor->spr.statnum >= 99 && nZVal == pActor->int_pos().Z && !(pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
pSectorB = pSector;
|
||||
auto lpos = pActor->int_pos();
|
||||
clipmove(lpos, &pSectorB, xvect, yvect, 4 * pActor->spr.clipdist, 5120, -5120, CLIPMASK0, scratch);
|
||||
pActor->set_int_pos(lpos);
|
||||
|
||||
clipmove(pActor->spr.pos, &pSectorB, xvect, yvect, 4 * pActor->spr.clipdist, 5120, -5120, CLIPMASK0, scratch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue