mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- __int_opos is gone.
This commit is contained in:
parent
d6523c30f2
commit
8482e66caa
4 changed files with 27 additions and 19 deletions
|
@ -378,18 +378,18 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_OPOSX:
|
||||
if (bSet) ps[iPlayer].__int_opos.X = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].player_int_opos().X, sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].opos.X = lValue * maptoworld;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].opos.X * (1/maptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_OPOSY:
|
||||
if (bSet) ps[iPlayer].__int_opos.Y = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].player_int_opos().Y, sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].opos.Y = lValue * maptoworld;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].opos.Y * (1 / maptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_OPOSZ:
|
||||
if (bSet) ps[iPlayer].__int_opos.Z = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].player_int_opos().Z, sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].opos.Z = lValue * zmaptoworld;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].opos.Z * (1 / zmaptoworld), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_PYOFF:
|
||||
|
|
|
@ -2848,7 +2848,7 @@ void processinput_d(int snum)
|
|||
|
||||
checklook(snum,actions);
|
||||
int ii = 40;
|
||||
auto oldpos = p->__int_opos;
|
||||
auto oldpos = p->opos;
|
||||
|
||||
if (p->on_crane != nullptr)
|
||||
goto HORIZONLY;
|
||||
|
@ -3094,7 +3094,8 @@ HORIZONLY:
|
|||
{
|
||||
if (!retry++)
|
||||
{
|
||||
p->__int_pos = p->__int_opos = oldpos;
|
||||
p->opos = oldpos;
|
||||
p->restorexyz();
|
||||
continue;
|
||||
}
|
||||
quickkill(p);
|
||||
|
|
|
@ -3573,7 +3573,7 @@ void processinput_r(int snum)
|
|||
checklook(snum, actions);
|
||||
p->apply_seasick(1);
|
||||
|
||||
auto oldpos = p->__int_opos;
|
||||
auto oldpos = p->opos;
|
||||
|
||||
if (p->on_crane != nullptr)
|
||||
goto HORIZONLY;
|
||||
|
@ -3947,7 +3947,8 @@ HORIZONLY:
|
|||
{
|
||||
if (!retry++)
|
||||
{
|
||||
p->__int_pos = p->__int_opos = oldpos;
|
||||
p->opos = oldpos;
|
||||
p->restorexyz();
|
||||
continue;
|
||||
}
|
||||
quickkill(p);
|
||||
|
|
|
@ -206,7 +206,9 @@ struct player_struct
|
|||
// This is basically the version from JFDuke but this first block contains a few changes to make it work with other parts of Raze.
|
||||
|
||||
// The sound code wants to read a vector out of this so we need to define one for the main coordinate.
|
||||
vec3_t __int_pos, __int_opos, vel;
|
||||
vec3_t __int_pos, vel;
|
||||
|
||||
DVector3 opos;
|
||||
|
||||
// player's horizon and angle structs.
|
||||
PlayerHorizon horizon;
|
||||
|
@ -360,29 +362,33 @@ struct player_struct
|
|||
|
||||
void backupxyz()
|
||||
{
|
||||
__int_opos = __int_pos;
|
||||
opos.X = __int_pos.X * inttoworld;
|
||||
opos.Y = __int_pos.Y * inttoworld;
|
||||
opos.Z = __int_pos.Z * zinttoworld;
|
||||
}
|
||||
|
||||
void restorexyz()
|
||||
{
|
||||
__int_pos = __int_opos;
|
||||
__int_pos.X = opos.X * worldtoint;
|
||||
__int_pos.Y = opos.Y * worldtoint;
|
||||
__int_pos.Z = opos.Z * zworldtoint;
|
||||
}
|
||||
|
||||
void backupxy()
|
||||
{
|
||||
__int_opos.X = __int_pos.X;
|
||||
__int_opos.Y = __int_pos.Y;
|
||||
opos.X = __int_pos.X * inttoworld;
|
||||
opos.Y = __int_pos.Y * inttoworld;
|
||||
}
|
||||
|
||||
void restorexy()
|
||||
{
|
||||
__int_pos.X = __int_opos.X;
|
||||
__int_pos.Y = __int_opos.Y;
|
||||
__int_pos.X = opos.X * worldtoint;
|
||||
__int_pos.Y = opos.Y * worldtoint;
|
||||
}
|
||||
|
||||
void backupz()
|
||||
{
|
||||
__int_opos.Z = __int_pos.Z;
|
||||
opos.Z = __int_pos.Z * zinttoworld;
|
||||
}
|
||||
|
||||
void setbobpos()
|
||||
|
@ -409,7 +415,7 @@ struct player_struct
|
|||
|
||||
vec3_t player_int_opos() const
|
||||
{
|
||||
return __int_opos;
|
||||
return { int(opos.X * worldtoint), int(opos.Y * worldtoint),int(opos.Z * zworldtoint) };
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue