- Replace spritetypebase oy with opos.Y calls.

This commit is contained in:
Mitchell Richters 2021-12-11 17:03:44 +11:00 committed by Christoph Oelckers
parent e0fb92bb01
commit a79b4b5ffc
6 changed files with 8 additions and 8 deletions

View file

@ -383,7 +383,7 @@ struct spritetypebase
// todo: get rid of the single variables!
vec3_t pos;
union {
struct { int32_t BLAHBLAHX, oy, oz; };
struct { int32_t BLAHBLAHX, BLAHBLAHY, oz; };
vec3_t opos;
};
@ -428,7 +428,7 @@ struct spritetypebase
int32_t interpolatedy(double const smoothratio, int const scale = 16)
{
return interpolatedvalue(oy, pos.Y, smoothratio, scale);
return interpolatedvalue(BLAHBLAHY, pos.Y, smoothratio, scale);
}
int32_t interpolatedz(double const smoothratio, int const scale = 16)

View file

@ -52,7 +52,7 @@ void collectTSpritesForPortal(int x, int y, int i, int interpolation)
pTSprite->ownerActor = actor;
pTSprite->flags = pSprite->hitag | 0x200;
pTSprite->pos.X = dx + interpolatedvalue(pSprite->opos.X, pSprite->pos.X, interpolation);
pTSprite->pos.Y = dy + interpolatedvalue(pSprite->oy, pSprite->pos.Y, interpolation);
pTSprite->pos.Y = dy + interpolatedvalue(pSprite->opos.Y, pSprite->pos.Y, interpolation);
pTSprite->pos.Z = dz + interpolatedvalue(pSprite->oz, pSprite->pos.Z, interpolation);
pTSprite->ang = pSprite->interpolatedang(interpolation);

View file

@ -3727,7 +3727,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (t[1] == 0 || a == 0)
{
if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.oy != actor->spr.pos.Y))
if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.opos.Y != actor->spr.pos.Y))
{
actor->spr.backupvec2();
SetActor(actor, actor->spr.pos);

View file

@ -3763,7 +3763,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (t[1] == 0 || a == 0)
{
if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.oy != actor->spr.pos.Y))
if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.opos.Y != actor->spr.pos.Y))
{
actor->spr.backupvec2();
SetActor(actor, actor->spr.pos);

View file

@ -1333,8 +1333,8 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
else SetGameVarID(lVar2, act->spr.opos.X, sActor, sPlayer);
break;
case ACTOR_HTBPOSY:
if (bSet) act->spr.oy = lValue;
else SetGameVarID(lVar2, act->spr.oy, sActor, sPlayer);
if (bSet) act->spr.opos.Y = lValue;
else SetGameVarID(lVar2, act->spr.opos.Y, sActor, sPlayer);
break;
case ACTOR_HTBPOSZ:
if (bSet) act->spr.oz = lValue;

View file

@ -39,7 +39,7 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
spritetype *pSprite = &nPlayer->Actor()->s();
pSprite->opos.X = pSprite->pos.X = x;
pSprite->oy = pSprite->pos.Y = y;
pSprite->opos.Y = pSprite->pos.Y = y;
pSprite->oz = pSprite->pos.Z = z;
if (ang != INT_MIN)