mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Prefer assignment of .vec2 union inside vec3_t instead of explicitly assigning .x and .y members
git-svn-id: https://svn.eduke32.com/eduke32@8242 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
69a3f9e884
commit
21025ea18f
2 changed files with 10 additions and 26 deletions
|
@ -6291,10 +6291,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
pPlayer->pos.y += x;
|
pPlayer->pos.y += x;
|
||||||
|
|
||||||
if (g_netServer || numplayers > 1)
|
if (g_netServer || numplayers > 1)
|
||||||
{
|
pPlayer->opos.vec2 = pPlayer->pos.vec2;
|
||||||
pPlayer->opos.x = pPlayer->pos.x;
|
|
||||||
pPlayer->opos.y = pPlayer->pos.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->bobpos.x += l;
|
pPlayer->bobpos.x += l;
|
||||||
pPlayer->bobpos.y += x;
|
pPlayer->bobpos.y += x;
|
||||||
|
@ -7549,16 +7546,10 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
pPlayer->bobpos.y += x;
|
pPlayer->bobpos.y += x;
|
||||||
|
|
||||||
if (g_netServer || numplayers > 1)
|
if (g_netServer || numplayers > 1)
|
||||||
{
|
pPlayer->opos.vec2 = pPlayer->pos.vec2;
|
||||||
pPlayer->opos.x = pPlayer->pos.x;
|
|
||||||
pPlayer->opos.y = pPlayer->pos.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sprite[pPlayer->i].extra <= 0)
|
if (sprite[pPlayer->i].extra <= 0)
|
||||||
{
|
sprite[pPlayer->i].pos.vec2 = pPlayer->pos.vec2;
|
||||||
sprite[pPlayer->i].x = pPlayer->pos.x;
|
|
||||||
sprite[pPlayer->i].y = pPlayer->pos.y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4911,18 +4911,11 @@ void P_ProcessInput(int playerNum)
|
||||||
pPlayer->bobcounter += sprite[pPlayer->i].xvel>>1;
|
pPlayer->bobcounter += sprite[pPlayer->i].xvel>>1;
|
||||||
|
|
||||||
if (ud.noclip == 0 && ((uint16_t)pPlayer->cursectnum >= MAXSECTORS || sector[pPlayer->cursectnum].floorpicnum == MIRROR))
|
if (ud.noclip == 0 && ((uint16_t)pPlayer->cursectnum >= MAXSECTORS || sector[pPlayer->cursectnum].floorpicnum == MIRROR))
|
||||||
{
|
pPlayer->pos.vec2 = pPlayer->opos.vec2;
|
||||||
pPlayer->pos.x = pPlayer->opos.x;
|
|
||||||
pPlayer->pos.y = pPlayer->opos.y;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
pPlayer->opos.vec2 = pPlayer->pos.vec2;
|
||||||
pPlayer->opos.x = pPlayer->pos.x;
|
|
||||||
pPlayer->opos.y = pPlayer->pos.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->bobpos.x = pPlayer->pos.x;
|
pPlayer->bobpos = pPlayer->pos.vec2;
|
||||||
pPlayer->bobpos.y = pPlayer->pos.y;
|
|
||||||
pPlayer->opos.z = pPlayer->pos.z;
|
pPlayer->opos.z = pPlayer->pos.z;
|
||||||
pPlayer->opyoff = pPlayer->pyoff;
|
pPlayer->opyoff = pPlayer->pyoff;
|
||||||
pPlayer->oq16ang = pPlayer->q16ang;
|
pPlayer->oq16ang = pPlayer->q16ang;
|
||||||
|
@ -5430,7 +5423,7 @@ HORIZONLY:;
|
||||||
|
|
||||||
pPlayer->on_warping_sector = 0;
|
pPlayer->on_warping_sector = 0;
|
||||||
|
|
||||||
bool mashedPotato = 0;
|
bool mashedPotato = false;
|
||||||
|
|
||||||
if (pPlayer->cursectnum >= 0 && ud.noclip == 0)
|
if (pPlayer->cursectnum >= 0 && ud.noclip == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue