mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- handle a few leftovers in Blood.
This commit is contained in:
parent
204d6018f4
commit
75ab0cf018
3 changed files with 13 additions and 15 deletions
|
@ -3142,9 +3142,9 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
||||||
if (toAng)
|
if (toAng)
|
||||||
{
|
{
|
||||||
if (toAng180)
|
if (toAng180)
|
||||||
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, kAng180, pSprite->spr.pos.X, pSprite->spr.pos.Y);
|
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, kAng180, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||||
else
|
else
|
||||||
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, (nAng - vAng) & 2047, pSprite->spr.pos.X, pSprite->spr.pos.Y);
|
RotatePoint(&pSprite->vel.X, &pSprite->vel.Y, (nAng - vAng) & 2047, pSprite->int_pos().X, pSprite->int_pos().Y);
|
||||||
|
|
||||||
|
|
||||||
vAng = getVelocityAngle(pSprite);
|
vAng = getVelocityAngle(pSprite);
|
||||||
|
@ -3299,7 +3299,7 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
|
||||||
if (sourceactor->xspr.data3 & kModernTypeFlag2)
|
if (sourceactor->xspr.data3 & kModernTypeFlag2)
|
||||||
{
|
{
|
||||||
int vAng = getVelocityAngle(actor);
|
int vAng = getVelocityAngle(actor);
|
||||||
RotatePoint(&actor->vel.X, &actor->vel.Y, (sourceactor->spr.ang - vAng) & 2047, actor->spr.pos.X, actor->spr.pos.Y);
|
RotatePoint(&actor->vel.X, &actor->vel.Y, (sourceactor->spr.ang - vAng) & 2047, actor->int_pos().X, actor->int_pos().Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourceactor->xspr.data3 & kModernTypeFlag4)
|
if (sourceactor->xspr.data3 & kModernTypeFlag4)
|
||||||
|
@ -3367,9 +3367,9 @@ void useEffectGen(DBloodActor* sourceactor, DBloodActor* actor)
|
||||||
if (actor->insector())
|
if (actor->insector())
|
||||||
{
|
{
|
||||||
if (sourceactor->xspr.data4 == 3)
|
if (sourceactor->xspr.data4 == 3)
|
||||||
pos = getflorzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
pos = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||||
else
|
else
|
||||||
pos = getceilzofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y);
|
pos = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,8 +197,8 @@ TArray<DBloodActor*> getSpritesNearWalls(sectortype* pSrcSect, int nDist)
|
||||||
if (skip.Find(ac))
|
if (skip.Find(ac))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sx = ac->spr.pos.X; qx = sx - wx;
|
sx = ac->int_pos().X; qx = sx - wx;
|
||||||
sy = ac->spr.pos.Y; qy = sy - wy;
|
sy = ac->int_pos().Y; qy = sy - wy;
|
||||||
num = DMulScale(qx, lx, qy, ly, 4);
|
num = DMulScale(qx, lx, qy, ly, 4);
|
||||||
den = DMulScale(lx, lx, ly, ly, 4);
|
den = DMulScale(lx, lx, ly, ly, 4);
|
||||||
|
|
||||||
|
|
|
@ -989,8 +989,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
||||||
RotatePoint(&x, &y, ang, a4, a5);
|
RotatePoint(&x, &y, ang, a4, a5);
|
||||||
viewBackupSpriteLoc(ac);
|
viewBackupSpriteLoc(ac);
|
||||||
ac->spr.ang = (ac->spr.ang + v14) & 2047;
|
ac->spr.ang = (ac->spr.ang + v14) & 2047;
|
||||||
ac->spr.pos.X = x + vc - a4;
|
ac->set_int_xy(x + vc - a4, y + v8 - a5);
|
||||||
ac->spr.pos.Y = y + v8 - a5;
|
|
||||||
}
|
}
|
||||||
else if (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
else if (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
|
||||||
{
|
{
|
||||||
|
@ -998,8 +997,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
||||||
RotatePoint(&x, &y, -ang, a4, sprDy);
|
RotatePoint(&x, &y, -ang, a4, sprDy);
|
||||||
viewBackupSpriteLoc(ac);
|
viewBackupSpriteLoc(ac);
|
||||||
ac->spr.ang = (ac->spr.ang - v14) & 2047;
|
ac->spr.ang = (ac->spr.ang - v14) & 2047;
|
||||||
ac->spr.pos.X = x - (vc - a4);
|
ac->set_int_xy(x + vc - a4, y + v8 - a5);
|
||||||
ac->spr.pos.Y = y - (v8 - a5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1066,7 +1064,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
|
||||||
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD))
|
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD))
|
||||||
{
|
{
|
||||||
viewBackupSpriteLoc(ac);
|
viewBackupSpriteLoc(ac);
|
||||||
ac->spr.pos.Z += pSector->floorz - oldZ;
|
ac->add_int_z(pSector->floorz - oldZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1102,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
|
||||||
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE))
|
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE))
|
||||||
{
|
{
|
||||||
viewBackupSpriteLoc(ac);
|
viewBackupSpriteLoc(ac);
|
||||||
ac->spr.pos.Z += pSector->ceilingz - oldZ;
|
ac->add_int_z(pSector->ceilingz - oldZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2272,7 +2270,7 @@ static void UpdateBasePoints(sectortype* pSector)
|
||||||
if (ptr1)
|
if (ptr1)
|
||||||
{
|
{
|
||||||
for (auto& ac : *ptr1)
|
for (auto& ac : *ptr1)
|
||||||
ac->basePoint = ac->spr.pos;
|
ac->basePoint = ac->int_pos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2284,7 +2282,7 @@ static void UpdateBasePoints(sectortype* pSector)
|
||||||
BloodSectIterator it(pSector);
|
BloodSectIterator it(pSector);
|
||||||
while (auto actor = it.Next())
|
while (auto actor = it.Next())
|
||||||
{
|
{
|
||||||
actor->basePoint = actor->spr.pos;
|
actor->basePoint = actor->int_pos();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue