diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 578b2a878..3e3662353 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -2817,7 +2817,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6) updatesector(ps[p].pos, §); if ((sect == nullptr && ud.clipping == 0) || (sect == actor->sector() && ps[p].cursector != actor->sector())) { - ps[p].getxyfromactor(actor); + ps[p].pos.XY() = actor->spr.pos.XY(); ps[p].setCursector(actor->sector()); SetActor(ps[p].GetActor(), actor->spr.pos); @@ -2892,7 +2892,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6) updatesector(ps[p].pos, &k); if ((k == nullptr && ud.clipping == 0) || (k == actor->sector() && ps[p].cursector != actor->sector())) { - ps[p].getxyfromactor(actor); + ps[p].pos.XY() = actor->spr.pos.XY(); ps[p].backupxy(); ps[p].setCursector(actor->sector()); @@ -2995,7 +2995,7 @@ void handle_se30(DDukeActor *actor, int JIBS6) updatesector(ps[p].pos, &k); if ((k == nullptr && ud.clipping == 0) || (k == actor->sector() && ps[p].cursector != actor->sector())) { - ps[p].getxyfromactor(actor); + ps[p].pos.XY() = actor->spr.pos.XY(); ps[p].setCursector(actor->sector()); SetActor(ps[p].GetActor(), actor->spr.pos); @@ -3051,7 +3051,7 @@ void handle_se30(DDukeActor *actor, int JIBS6) updatesector(ps[p].pos, &k); if ((k == nullptr && ud.clipping == 0) || (k == actor->sector() && ps[p].cursector != actor->sector())) { - ps[p].getxyfromactor(actor); + ps[p].pos.XY() = actor->spr.pos.XY(); ps[p].backupxy(); ps[p].setCursector(actor->sector()); diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index 917e395c3..d3f331cff 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -388,12 +388,6 @@ struct player_struct if (addz) pos.Z += addz; } - void getxyfromactor(DCoreActor* actor) - { - pos.X = actor->spr.pos.X; - pos.Y = actor->spr.pos.Y; - } - vec3_t player_int_pos() const { return { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint) };