- GetActor pos replacement

This commit is contained in:
Christoph Oelckers 2022-08-22 18:34:01 +02:00
parent 1c154a984d
commit e76dfa5d3c
8 changed files with 18 additions and 18 deletions

View file

@ -2523,7 +2523,7 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
auto spawned = spawn(actor, actor->spr.yvel);
if (spawned)
{
SetActor(spawned, actor->int_pos());
SetActor(spawned, actor->spr.pos);
getglobalz(spawned);
spawned->spr.hitag = spawned->spr.lotag = 0;
}
@ -2925,7 +2925,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
ps[p].backupxy();
ps[p].setCursector(actor->sector());
SetActor(ps[p].GetActor(), actor->int_pos());
SetActor(ps[p].GetActor(), actor->spr.pos);
quickkill(&ps[p]);
}
}
@ -3025,7 +3025,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
ps[p].getxyfromactor(actor);
ps[p].setCursector(actor->sector());
SetActor(ps[p].GetActor(), actor->int_pos());
SetActor(ps[p].GetActor(), actor->spr.pos);
quickkill(&ps[p]);
}
}
@ -3085,7 +3085,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
ps[p].setCursector(actor->sector());
SetActor(ps[p].GetActor(), actor->int_pos());
SetActor(ps[p].GetActor(), actor->spr.pos);
quickkill(&ps[p]);
}
}
@ -3178,7 +3178,7 @@ void handle_se02(DDukeActor* actor)
if (a2->spr.picnum != SECTOREFFECTOR)
{
a2->add_int_pos({ m, x, 0 });
SetActor(a2, a2->int_pos());
SetActor(a2, a2->spr.pos);
}
}
ms(actor);
@ -3907,7 +3907,7 @@ void handle_se17(DDukeActor* actor)
act3->backupz();
ChangeActorSect(act3, act2->sector());
SetActor(act3, act3->int_pos());
SetActor(act3, act3->spr.pos);
act3->floorz = act2->sector()->floorz;
act3->ceilingz = act2->sector()->ceilingz;
@ -4281,7 +4281,7 @@ void handle_se26(DDukeActor* actor)
if (a2->spr.statnum != 3 && a2->spr.statnum != 10)
{
a2->add_int_pos({ l, x, actor->spr.zvel });
SetActor(a2, a2->int_pos());
SetActor(a2, a2->spr.pos);
}
}
@ -4395,7 +4395,7 @@ void handle_se24(DDukeActor *actor, bool scroll, int shift)
{
a2->add_int_pos({ x >> shift , y >> shift, 0 });
SetActor(a2, a2->int_pos());
SetActor(a2, a2->spr.pos);
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
if (a2->spr.statnum == STAT_ZOMBIEACTOR)
@ -4542,7 +4542,7 @@ void handle_se35(DDukeActor *actor, int SMALLSMOKE, int EXPLOSION2)
{
spawned->spr.xvel = 96 + (krand() & 127);
ssp(spawned, CLIPMASK0);
SetActor(spawned, spawned->int_pos());
SetActor(spawned, spawned->spr.pos);
if (rnd(16))
spawn(actor, EXPLOSION2);
}

View file

@ -481,7 +481,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
actor->set_int_ang((krand()&2047));
else if ((actor->temp_data[0]&3) == 1 && actor->spr.picnum != COMMANDER)
actor->set_int_ang((krand()&2047));
SetActor(actor,actor->int_pos());
SetActor(actor,actor->spr.pos);
if (dasectp == nullptr) dasectp = &sector[0];
return result.setSector(dasectp);
}
@ -896,7 +896,7 @@ static void movetripbomb(DDukeActor *actor)
auto spawned = spawn(actor, LASERLINE);
if (spawned)
{
SetActor(spawned, spawned->int_pos());
SetActor(spawned, spawned->spr.pos);
spawned->spr.hitag = actor->spr.hitag;
spawned->temp_data[1] = spawned->int_pos().Z;

View file

@ -1062,7 +1062,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
spawned->set_int_pos(hit.int_hitpos());
spawned->spr.cstat |= randomXFlip();
ssp(spawned, CLIPMASK0);
SetActor(spawned, spawned->int_pos());
SetActor(spawned, spawned->spr.pos);
if (actor->spr.picnum == OOZFILTER || actor->spr.picnum == NEWBEAST)
spawned->spr.pal = 6;
}

View file

@ -3054,7 +3054,7 @@ HORIZONLY:
}
// RBG***
SetActor(pact, vec3_t( p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + gs.int_playerheight ));
SetActor(pact, p->pos.plusZ(gs.playerheight));
if (psectlotag < 3)
{

View file

@ -329,7 +329,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
act->spr.xvel = 128;
ChangeActorStat(act, STAT_MISC);
ssp(act, CLIPMASK0);
SetActor(act, act->int_pos());
SetActor(act, act->spr.pos);
}
//---------------------------------------------------------------------------

View file

@ -146,7 +146,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case WATERSPLASH2:
if (actj)
{
SetActor(act, actj->int_pos());
SetActor(act, actj->spr.pos);
act->spr.xrepeat = act->spr.yrepeat = 8 + (krand() & 7);
}
else act->spr.xrepeat = act->spr.yrepeat = 16 + (krand() & 15);

View file

@ -201,7 +201,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case MUD:
if (actj)
{
SetActor(act, actj->int_pos());
SetActor(act, actj->spr.pos);
act->spr.xrepeat = act->spr.yrepeat = 8 + (krand() & 7);
}
else act->spr.xrepeat = act->spr.yrepeat = 16 + (krand() & 15);

View file

@ -11185,7 +11185,7 @@ int DoRing(DSWActor* actor)
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->int_ang()), 14), MulScale(actor->user.Dist, bsin(actor->int_ang()), 14),
pp ? (actor->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9 : 0 });
SetActor(actor, actor->int_pos());
SetActor(actor, actor->spr.pos);
ASSERT(actor->insector());
@ -11311,7 +11311,7 @@ int DoSerpRing(DSWActor* actor)
// put it out there
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->user.slide_ang), 14), MulScale(actor->user.Dist, bsin(actor->user.slide_ang), 14), 0 });
SetActor(actor, actor->int_pos());
SetActor(actor, actor->spr.pos);
ASSERT(actor->insector());