diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index b74f1bf9e..9f21a6133 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -594,7 +594,7 @@ typedef struct { sectortype* cursectp, * lastcursectp; int pang; - int xvect,yvect,oxvect,oyvect,slide_xvect,slide_yvect; + vec2_t vect, ovect, slide_vect; int posx,posy,posz; SECTOR_OBJECTp sop_control; } REMOTE_CONTROL, *REMOTE_CONTROLp; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index e0e0d4ce4..3c20bd71a 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -5053,12 +5053,12 @@ void PlayerToRemote(PLAYERp pp) pp->remote.posy = pp->pos.Y; pp->remote.posz = pp->pos.Z; - pp->remote.xvect = pp->vect.X; - pp->remote.yvect = pp->vect.Y; - pp->remote.oxvect = pp->ovect.X; - pp->remote.oyvect = pp->ovect.Y; - pp->remote.slide_xvect = pp->slide_vect.X; - pp->remote.slide_yvect = pp->slide_vect.Y; + pp->remote.vect.X = pp->vect.X; + pp->remote.vect.Y = pp->vect.Y; + pp->remote.ovect.Y = pp->ovect.X; + pp->remote.ovect.Y = pp->ovect.Y; + pp->remote.slide_vect.X = pp->slide_vect.X; + pp->remote.slide_vect.Y = pp->slide_vect.Y; } void RemoteToPlayer(PLAYERp pp) @@ -5070,12 +5070,12 @@ void RemoteToPlayer(PLAYERp pp) pp->pos.Y = pp->remote.posy; pp->pos.Z = pp->remote.posz; - pp->vect.X = pp->remote.xvect; - pp->vect.Y = pp->remote.yvect; - pp->ovect.X = pp->remote.oxvect; - pp->ovect.Y = pp->remote.oyvect; - pp->slide_vect.X = pp->remote.slide_xvect; - pp->slide_vect.Y = pp->remote.slide_yvect; + pp->vect.X = pp->remote.vect.X; + pp->vect.Y = pp->remote.vect.Y; + pp->ovect.X = pp->remote.ovect.Y; + pp->ovect.Y = pp->remote.ovect.Y; + pp->slide_vect.X = pp->remote.slide_vect.X; + pp->slide_vect.Y = pp->remote.slide_vect.Y; } void PlayerRemoteReset(PLAYERp pp, sectortype* sect) @@ -5095,12 +5095,12 @@ void PlayerRemoteReset(PLAYERp pp, sectortype* sect) void PlayerRemoteInit(PLAYERp pp) { - pp->remote.xvect = 0; - pp->remote.yvect = 0; - pp->remote.oxvect = 0; - pp->remote.oyvect = 0; - pp->remote.slide_xvect = 0; - pp->remote.slide_yvect = 0; + pp->remote.vect.X = 0; + pp->remote.vect.Y = 0; + pp->remote.ovect.Y = 0; + pp->remote.ovect.Y = 0; + pp->remote.slide_vect.X = 0; + pp->remote.slide_vect.Y = 0; } void DoPlayerStopOperate(PLAYERp pp) diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index a98d72d62..dcdd5fe77 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -392,10 +392,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, REMOTE_CONTROL& w, arc("cursectnum", w.cursectp) ("lastcursectnum", w.lastcursectp) ("pang", w.pang) - ("xvect", w.xvect) - ("yvect", w.yvect) - ("slide_xvect", w.slide_xvect) - ("slide_yvect", w.slide_yvect) + ("xvect", w.vect.X) + ("yvect", w.vect.Y) + ("slide_xvect", w.slide_vect.X) + ("slide_yvect", w.slide_vect.Y) ("x", w.posx) ("y", w.posy) ("z", w.posz) @@ -404,8 +404,8 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, REMOTE_CONTROL& w, } if (arc.isReading()) { - w.oxvect = w.xvect; - w.oyvect = w.yvect; + w.ovect.Y = w.vect.X; + w.ovect.Y = w.vect.Y; } return arc; }