mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- SW: Replace PLAYERstruct
oposy
with opos.Y
calls.
This commit is contained in:
parent
ae50767c70
commit
a2f2cc489a
8 changed files with 18 additions and 18 deletions
|
@ -825,7 +825,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie
|
|||
PLAYERp pp = tu->PlayerP;
|
||||
int sr = 65536 - int(smoothratio);
|
||||
tsp->pos.X -= MulScale(pp->pos.X - pp->opos.X, sr, 16);
|
||||
tsp->pos.Y -= MulScale(pp->pos.Y - pp->oposy, sr, 16);
|
||||
tsp->pos.Y -= MulScale(pp->pos.Y - pp->opos.Y, sr, 16);
|
||||
tsp->pos.Z -= MulScale(pp->pos.Z - pp->oposz, sr, 16);
|
||||
tsp->ang -= MulScale(pp->angle.ang.asbuild() - pp->angle.oang.asbuild(), sr, 16);
|
||||
}
|
||||
|
@ -1459,7 +1459,7 @@ void drawscreen(PLAYERp pp, double smoothratio)
|
|||
camerapp = pp;
|
||||
|
||||
tx = interpolatedvalue(camerapp->opos.X, camerapp->pos.X, sr);
|
||||
ty = interpolatedvalue(camerapp->oposy, camerapp->pos.Y, sr);
|
||||
ty = interpolatedvalue(camerapp->opos.Y, camerapp->pos.Y, sr);
|
||||
tz = interpolatedvalue(camerapp->oposz, camerapp->pos.Z, sr);
|
||||
|
||||
// Interpolate the player's angle while on a sector object, just like VoidSW.
|
||||
|
|
|
@ -677,7 +677,7 @@ struct PLAYERstruct
|
|||
}
|
||||
|
||||
// interpolation
|
||||
int oposy, oposz;
|
||||
int oposz;
|
||||
|
||||
// holds last valid move position
|
||||
int lv_x,lv_y,lv_z;
|
||||
|
|
|
@ -641,7 +641,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio)
|
|||
|
||||
// If player is dead still then update at MoveSkip4
|
||||
// rate.
|
||||
if (pp->pos.X == pp->opos.X && pp->pos.Y == pp->oposy && pp->pos.Z == pp->oposz)
|
||||
if (pp->pos.X == pp->opos.X && pp->pos.Y == pp->opos.Y && pp->pos.Z == pp->oposz)
|
||||
DoCam = true;
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ BEGIN_SW_NS
|
|||
void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
||||
{
|
||||
Player->opos.X = Player->pos.X = x;
|
||||
Player->oposy = Player->pos.Y = y;
|
||||
Player->opos.Y = Player->pos.Y = y;
|
||||
Player->oposz = Player->pos.Z = z;
|
||||
|
||||
if (ang != INT_MIN)
|
||||
|
|
|
@ -1281,7 +1281,7 @@ void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* sp, int ang)
|
|||
{
|
||||
pp->angle.ang = pp->angle.oang = buildang(ang);
|
||||
pp->pos.X = pp->opos.X = pp->oldposx = sp->X;
|
||||
pp->pos.Y = pp->oposy = pp->oldposy = sp->Y;
|
||||
pp->pos.Y = pp->opos.Y = pp->oldposy = sp->Y;
|
||||
|
||||
//getzsofslopeptr(sp->sector(), pp->posx, pp->posy, &cz, &fz);
|
||||
//pp->posz = pp->oposz = fz - PLAYER_HEIGHT;
|
||||
|
@ -1295,7 +1295,7 @@ void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* sp, int ang)
|
|||
void DoPlayerTeleportToOffset(PLAYERp pp)
|
||||
{
|
||||
pp->opos.X = pp->oldposx = pp->pos.X;
|
||||
pp->oposy = pp->oldposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->oldposy = pp->pos.Y;
|
||||
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
SET(pp->Flags2, PF2_TELEPORTED);
|
||||
|
@ -2082,7 +2082,7 @@ void DoPlayerMove(PLAYERp pp)
|
|||
if (interpolate_ride)
|
||||
{
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
}
|
||||
pp->pos.X += pp->xvect >> 14;
|
||||
pp->pos.Y += pp->yvect >> 14;
|
||||
|
@ -2109,7 +2109,7 @@ void DoPlayerMove(PLAYERp pp)
|
|||
if (interpolate_ride)
|
||||
{
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
}
|
||||
|
||||
auto save_cstat = sp->cstat;
|
||||
|
@ -3604,7 +3604,7 @@ void PlayerWarpUpdatePos(PLAYERp pp)
|
|||
return;
|
||||
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
pp->oposz = pp->pos.Z;
|
||||
DoPlayerZrange(pp);
|
||||
UpdatePlayerSprite(pp);
|
||||
|
@ -4120,7 +4120,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
|||
pp->pos.Z = under_sp->sector()->ceilingz + Z(6);
|
||||
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
pp->oposz = pp->pos.Z;
|
||||
|
||||
DoPlayerZrange(pp);
|
||||
|
@ -4198,7 +4198,7 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
|||
pp->pos.Z -= Z(pp->WadeDepth);
|
||||
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
pp->oposz = pp->pos.Z;
|
||||
|
||||
return;
|
||||
|
@ -6486,7 +6486,7 @@ void MoveSkipSavePos(void)
|
|||
pp = Player + pnum;
|
||||
|
||||
pp->opos.X = pp->pos.X;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->pos.Y;
|
||||
pp->oposz = pp->pos.Z;
|
||||
pp->obob_z = pp->bob_z;
|
||||
pp->angle.backup();
|
||||
|
@ -6826,7 +6826,7 @@ void InitAllPlayers(void)
|
|||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||
{
|
||||
pp->pos.X = pp->opos.X = pfirst->pos.X;
|
||||
pp->pos.Y = pp->oposy = pfirst->pos.Y;
|
||||
pp->pos.Y = pp->opos.Y = pfirst->pos.Y;
|
||||
pp->pos.Z = pp->oposz = pfirst->pos.Z;
|
||||
pp->angle.ang = pp->angle.oang = pfirst->angle.ang;
|
||||
pp->horizon.horiz = pp->horizon.ohoriz = pfirst->horizon.horiz;
|
||||
|
@ -6983,7 +6983,7 @@ void PlayerSpawnPosition(PLAYERp pp)
|
|||
|
||||
|
||||
pp->pos.X = pp->opos.X = sp->pos.X;
|
||||
pp->pos.Y = pp->oposy = sp->pos.Y;
|
||||
pp->pos.Y = pp->opos.Y = sp->pos.Y;
|
||||
pp->pos.Z = pp->oposz = sp->pos.Z;
|
||||
pp->angle.ang = pp->angle.oang = buildang(sp->ang);
|
||||
pp->setcursector(sp->sector());
|
||||
|
|
|
@ -581,7 +581,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, P
|
|||
if (arc.isReading())
|
||||
{
|
||||
w.opos.X = w.pos.X;
|
||||
w.oposy = w.pos.X;
|
||||
w.opos.Y = w.pos.X;
|
||||
w.oposz = w.pos.X;
|
||||
w.oz_speed = w.z_speed;
|
||||
w.oxvect = w.xvect;
|
||||
|
|
|
@ -1532,7 +1532,7 @@ void PreMapCombineFloors(void)
|
|||
pp->pos.X += dx;
|
||||
pp->pos.Y += dy;
|
||||
pp->opos.X = pp->oldposx = pp->pos.X;
|
||||
pp->oposy = pp->oldposy = pp->pos.Y;
|
||||
pp->opos.Y = pp->oldposy = pp->pos.Y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ struct SWPlayer native
|
|||
*/
|
||||
|
||||
// interpolation
|
||||
//int oposy, oposz;
|
||||
//int oposz;
|
||||
|
||||
// holds last valid move position
|
||||
//int16 lv_sectnum;
|
||||
|
|
Loading…
Reference in a new issue