mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- SW: Replace REMOTE_CONTROL
*vect
variables with vectors.
This commit is contained in:
parent
5d10b32301
commit
287351e678
3 changed files with 25 additions and 25 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue