- eliminated DCoreActor::copyXY

This commit is contained in:
Christoph Oelckers 2022-08-29 19:27:52 +02:00
parent bff9856bf3
commit 07826c7791
9 changed files with 8 additions and 14 deletions

View file

@ -96,12 +96,6 @@ public:
spr.pos = { add.X* inttoworld, add.Y* inttoworld, add.Z* zinttoworld };
}
void copyXY(DCoreActor* other)
{
spr.pos.X = other->spr.pos.X;
spr.pos.Y = other->spr.pos.Y;
}
void set_int_xy(int x, int y)
{
spr.pos.X = x * inttoworld;

View file

@ -3182,7 +3182,7 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
if (actor->sector() != sourceactor->sector())
ChangeActorSect(actor, sourceactor->sector());
actor->copyXY(sourceactor);
actor->spr.pos.XY() =sourceactor->spr.pos.XY();
int zTop, zBot;
GetActorExtents(sourceactor, &zTop, &zBot);
actor->set_int_z(zBot);

View file

@ -36,7 +36,7 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
PLAYER* pPlayer = &gPlayer[myconnectindex];
VIEW* pView = &gPrevView[myconnectindex];
pPlayer->actor->copyXY(gView->actor);
pPlayer->actor->spr.pos.XY() = gView->actor->spr.pos.XY();
pView->x = gView->actor->int_pos().X;
pView->y = gView->actor->int_pos().Y;
pPlayer->zView = pView->viewz = gView->zView = z;

View file

@ -2648,7 +2648,7 @@ void handle_se00(DDukeActor* actor)
if (actor->temp_data[3] == 0)
actor->temp_data[3] = ldist(actor, Owner);
actor->spr.xvel = actor->temp_data[3];
actor->copyXY(Owner);
actor->spr.pos.XY() = Owner->spr.pos.XY();
actor->add_int_ang((l * q));
actor->temp_data[2] += (l * q);
}

View file

@ -933,7 +933,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
{
if (actor->int_ang() == 512)
{
actor->copyXY(act2);
actor->spr.pos.XY() = act2->spr.pos.XY();
}
found = true;
actor->SetOwner(act2);

View file

@ -1353,7 +1353,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
{
auto pSpark = insertActor(pActor->sector(), 0);
pSpark->copyXY(pActor);
pSpark->spr.pos.XY() = pActor->spr.pos.XY();
pSpark->spr.cstat = 0;
pSpark->spr.shade = -127;
pSpark->spr.pal = 1;

View file

@ -1247,7 +1247,7 @@ sectdone:
DExhumedActor* pFloorActor = PlayerList[nPlayer].pPlayerFloorSprite;
if (nTotalPlayers > 1 && pFloorActor)
{
pFloorActor->copyXY(pPlayerActor);
pFloorActor->spr.pos.XY() = pPlayerActor->spr.pos.XY();
if (pFloorActor->sector() != pPlayerActor->sector())
{

View file

@ -1022,7 +1022,7 @@ int DoBunnyQuickJump(DSWActor* actor)
}
}
actor->copyXY(hitActor);
actor->spr.pos.XY() = hitActor->spr.pos.XY();
actor->spr.angle = hitActor->spr.angle;
actor->spr.angle += DAngle180;
HelpMissileLateral(actor, 2000);

View file

@ -444,7 +444,7 @@ int DoBloodSpray(DSWActor* actor)
actor->spr.xvel = actor->spr.yvel = actor->user.change.X = actor->user.change.Y = 0;
actor->spr.xrepeat = actor->spr.yrepeat = 70 - RandomRange(25);
actor->copyXY(bldActor);
actor->spr.pos.XY() = bldActor->spr.pos.XY();
// !FRANK! bit of a hack
// yvel is the hit_wall