diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 995b589f9..6bc33ef6d 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -1329,7 +1329,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy, uint32_t cliptype = CLIPMASK_ACTOR; int sang; - int x, y, z, loz, hiz; + int loz, hiz; DSWActor* highActor; DSWActor* lowActor; sectortype* lo_sectp,* hi_sectp, *ssp; @@ -1338,9 +1338,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy, // moves out a bit but keeps the sprites original postion/sector. // save off position info - x = actor->int_pos().X; - y = actor->int_pos().Y; - z = actor->int_pos().Z; + auto pos = actor->spr.pos; sang = actor->int_ang(); loz = actor->user.loz; hiz = actor->user.hiz; @@ -1366,7 +1364,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy, *stopz = actor->int_pos().Z; // reset position information - actor->set_int_pos({ x, y, z }); + actor->spr.pos = pos; actor->set_int_ang(sang); actor->user.loz = loz; actor->user.hiz = hiz; diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 7b6f5bd07..1017dc6ac 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -509,7 +509,7 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector) auto actorNew = insertActor(newsector, STAT_FAF_COPY); - actorNew->set_int_pos(tsp->int_pos()); + actorNew->spr.pos = tsp->pos; actorNew->spr.cstat = tsp->cstat; actorNew->spr.picnum = tsp->picnum; actorNew->spr.pal = tsp->pal; diff --git a/source/games/sw/src/vis.cpp b/source/games/sw/src/vis.cpp index 49b440599..43e849d3f 100644 --- a/source/games/sw/src/vis.cpp +++ b/source/games/sw/src/vis.cpp @@ -148,7 +148,7 @@ void SpawnVis(DSWActor* parentActor, sectortype* sect, int x, int y, int z, int ASSERT(parentActor->hasU()); parentActor->user.Flags2 |= (SPR2_CHILDREN); - actorNew->set_int_pos(parentActor->int_pos()); + actorNew->spr.pos = parentActor->spr.pos; parentActor->user.Flags2 |= (SPR2_VIS_SHADING); } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index b8b063471..7c0eb12d4 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -4469,7 +4469,7 @@ int DoFireballFlames(DSWActor* actor) DSWActor* attach = actor->user.attachActor; if (attach != nullptr) { - actor->set_int_pos({ attach->int_pos().X, attach->int_pos().Y, int_ActorZOfMiddle(attach) }); + actor->spr.pos = DVector3(attach->spr.pos.XY(), ActorZOfMiddle(attach)); if ((attach->spr.extra & SPRX_BURNABLE)) { @@ -11137,7 +11137,7 @@ int DoRing(DSWActor* actor) else z = int_ActorZOfMiddle(own) + Z(30); - actor->set_int_pos({ own->int_pos().X, own->int_pos().Y, z }); + actor->spr.pos = DVector3(own->spr.pos.XY(), z * zinttoworld); // go out until its time to come back in if (actor->user.Counter2 == false) @@ -11271,7 +11271,7 @@ int DoSerpRing(DSWActor* actor) z = own->int_pos().Z - actor->user.pos.Z; // move the center with the player - actor->set_int_pos({ own->int_pos().X, own->int_pos().Y, z }); + actor->spr.pos = DVector3(own->spr.pos.XY(), z * zinttoworld); // go out until its time to come back in @@ -15112,9 +15112,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall) auto sect = actor->sector(); Collision coll; - auto pos = actor->int_pos(); - clipmove(pos, §, xvect, yvect, 4, 4 << 8, 4 << 8, CLIPMASK_MISSILE, coll); - actor->set_int_pos(pos); + clipmove(actor->spr.pos, §, xvect, yvect, 4, 4 << 8, 4 << 8, CLIPMASK_MISSILE, coll); if (actor->sector() != sect) ChangeActorSect(actor, sect); @@ -17433,9 +17431,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, i auto sect = spawnedActor->sector(); Collision coll; - auto pos = spawnedActor->int_pos(); - clipmove(pos, §, nx, ny, 0, 0, 0, CLIPMASK_MISSILE, coll, 1); - spawnedActor->set_int_pos(pos); + clipmove(spawnedActor->spr.pos, §, nx, ny, 0, 0, 0, CLIPMASK_MISSILE, coll, 1); if (spawnedActor->sector() != sect) ChangeActorSect(spawnedActor, sect); @@ -17746,9 +17742,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang) auto sect = spawnedActor->sector(); Collision coll; - auto pos = spawnedActor->int_pos(); - clipmove(pos, §, nx, ny, 0, 0, 0, CLIPMASK_MISSILE, coll, 1); - spawnedActor->set_int_pos(pos); + clipmove(spawnedActor->spr.pos, §, nx, ny, 0, 0, 0, CLIPMASK_MISSILE, coll, 1); if (spawnedActor->sector() != sect) ChangeActorSect(spawnedActor, sect);