- Duke: Remove player_struct::posAdd().

This commit is contained in:
Mitchell Richters 2022-11-21 13:30:26 +11:00 committed by Christoph Oelckers
parent 27be72c7ec
commit a1e68f88a5
3 changed files with 4 additions and 12 deletions

View file

@ -2200,7 +2200,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
auto psp = ps[p].GetActor();
if (psp->sector() == actor->sector())
{
ps[p].posAdd(vect);
ps[p].GetActor()->spr.pos.XY() += vect;
if (numplayers > 1)
{
@ -2327,7 +2327,7 @@ void handle_se02(DDukeActor* actor)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
if (ps[p].cursector == actor->sector() && ps[p].on_ground)
{
ps[p].posAdd(vect);
ps[p].GetActor()->spr.pos.XY() += vect;
ps[p].bobpos += vect;
}
@ -3337,7 +3337,7 @@ void handle_se20(DDukeActor* actor)
for (int p = connecthead; p >= 0; p = connectpoint2[p])
if (ps[p].cursector == actor->sector() && ps[p].on_ground)
{
ps[p].posAdd(vec);
ps[p].GetActor()->spr.pos.XY() += vec;
ps[p].GetActor()->backupvec2();
SetActor(ps[p].GetActor(), ps[p].GetActor()->spr.pos);

View file

@ -340,14 +340,6 @@ struct player_struct
{
GetActor()->spr.pos = val.plusZ(-GetActor()->viewzoffset);
}
void posAdd(const DVector3& val)
{
GetActor()->spr.pos += val;
}
void posAdd(const DVector2& val)
{
GetActor()->spr.pos.XY() += val;
}
double& posoldX()
{

View file

@ -717,7 +717,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, setpos, dukeplayer_setpos)
void dukeplayer_addpos(player_struct* self, double x, double y, double z)
{
self->posAdd({ x, y, z });
self->GetActor()->spr.pos += { x, y, z };
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addpos, dukeplayer_addpos)