From 424b9c5f34500f6e060b603a02bc0d013d600677 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 31 Dec 2021 00:15:01 +1100 Subject: [PATCH] - SW: Replace `REMOTE_CONTROL` `pos*` variables with a vector. --- source/games/sw/src/game.h | 2 +- source/games/sw/src/player.cpp | 12 ++++++------ source/games/sw/src/save.cpp | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 9f21a6133..e2986bcf8 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -595,7 +595,7 @@ typedef struct sectortype* cursectp, * lastcursectp; int pang; vec2_t vect, ovect, slide_vect; - int posx,posy,posz; + vec3_t pos; 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 3c20bd71a..bb302bd36 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -5049,9 +5049,9 @@ void PlayerToRemote(PLAYERp pp) pp->remote.cursectp = pp->cursector; pp->remote.lastcursectp = pp->lastcursector; - pp->remote.posx = pp->pos.X; - pp->remote.posy = pp->pos.Y; - pp->remote.posz = pp->pos.Z; + pp->remote.pos.X = pp->pos.X; + pp->remote.pos.Y = pp->pos.Y; + pp->remote.pos.Z = pp->pos.Z; pp->remote.vect.X = pp->vect.X; pp->remote.vect.Y = pp->vect.Y; @@ -5066,9 +5066,9 @@ void RemoteToPlayer(PLAYERp pp) pp->setcursector(pp->remote.cursectp); pp->lastcursector = pp->remote.lastcursectp; - pp->pos.X = pp->remote.posx; - pp->pos.Y = pp->remote.posy; - pp->pos.Z = pp->remote.posz; + pp->pos.X = pp->remote.pos.X; + pp->pos.Y = pp->remote.pos.Y; + pp->pos.Z = pp->remote.pos.Z; pp->vect.X = pp->remote.vect.X; pp->vect.Y = pp->remote.vect.Y; diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index dcdd5fe77..5fa829dfc 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -396,9 +396,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, REMOTE_CONTROL& w, ("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) + ("x", w.pos.X) + ("y", w.pos.Y) + ("z", w.pos.Z) ("sop_control", w.sop_control) .EndObject(); }