Skip to content

Commit

Permalink
- renamed player_struct::opos
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Aug 9, 2022
1 parent f996cac commit ad72339
Show file tree
Hide file tree
Showing 20 changed files with 132 additions and 130 deletions.
46 changes: 23 additions & 23 deletions source/games/duke/src/actors.cpp
Expand Up @@ -202,7 +202,7 @@ void checkavailweapon(struct player_struct* player)
void clearcamera(player_struct* ps)
{
ps->newOwner = nullptr;
ps->__int_pos = ps->opos;
ps->__int_pos = ps->__int_opos;
ps->angle.restore();
updatesector(ps->__int_pos.X, ps->__int_pos.Y, &ps->cursector);

Expand Down Expand Up @@ -372,7 +372,7 @@ void movedummyplayers(void)
}
}

act->add_int_pos({ (ps[p].__int_pos.X - ps[p].opos.X), (ps[p].__int_pos.Y - ps[p].opos.Y), 0 });
act->add_int_pos({ (ps[p].__int_pos.X - ps[p].__int_opos.X), (ps[p].__int_pos.Y - ps[p].__int_opos.Y), 0 });
SetActor(act, act->int_pos());
}
}
Expand All @@ -397,7 +397,7 @@ void moveplayers(void)
{
if (p->newOwner != nullptr) //Looking thru the camera
{
act->set_int_pos({ p->opos.X, p->opos.Y, p->opos.Z + gs.playerheight });
act->set_int_pos({ p->__int_opos.X, p->__int_opos.Y, p->__int_opos.Z + gs.playerheight });
act->backupz();
act->spr.ang = p->angle.oang.asbuild();
SetActor(act, act->int_pos());
Expand Down Expand Up @@ -790,7 +790,7 @@ void movecrane(DDukeActor *actor, int crane)
else if (actor->IsActiveCrane())
{
auto ang = ps[p].angle.ang.asbuild();
ps[p].opos = ps[p].__int_pos;
ps[p].__int_opos = ps[p].__int_pos;
ps[p].__int_pos.X = actor->int_pos().X - bcos(ang, -6);
ps[p].__int_pos.Y = actor->int_pos().Y - bsin(ang, -6);
ps[p].__int_pos.Z = actor->int_pos().Z + (2 << 8);
Expand Down Expand Up @@ -2872,8 +2872,8 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)

if (numplayers > 1)
{
ps[p].opos.X = ps[p].__int_pos.X;
ps[p].opos.Y = ps[p].__int_pos.Y;
ps[p].__int_opos.X = ps[p].__int_pos.X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y;
}
if (psp->spr.extra <= 0)
{
Expand Down Expand Up @@ -2920,8 +2920,8 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
updatesector(ps[p].__int_pos.X, ps[p].__int_pos.Y, &k);
if ((k == nullptr && ud.clipping == 0) || (k == actor->sector() && ps[p].cursector != actor->sector()))
{
ps[p].opos.X = ps[p].__int_pos.X = actor->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y = actor->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X = actor->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y = actor->int_pos().Y;
ps[p].setCursector(actor->sector());

SetActor(ps[p].GetActor(), actor->int_pos());
Expand Down Expand Up @@ -3040,8 +3040,8 @@ void handle_se30(DDukeActor *actor, int JIBS6)

if (numplayers > 1)
{
ps[p].opos.X = ps[p].__int_pos.X;
ps[p].opos.Y = ps[p].__int_pos.Y;
ps[p].__int_opos.X = ps[p].__int_pos.X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y;
}

ps[p].bobpos.X += l;
Expand Down Expand Up @@ -3085,8 +3085,8 @@ void handle_se30(DDukeActor *actor, int JIBS6)
ps[p].__int_pos.X = actor->int_pos().X;
ps[p].__int_pos.Y = actor->int_pos().Y;

ps[p].opos.X = ps[p].__int_pos.X;
ps[p].opos.Y = ps[p].__int_pos.Y;
ps[p].__int_opos.X = ps[p].__int_pos.X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y;

ps[p].setCursector(actor->sector());

Expand Down Expand Up @@ -3835,11 +3835,11 @@ void handle_se17(DDukeActor* actor)
if (act1->spr.statnum == STAT_PLAYER && act1->GetOwner())
{
int p = act1->spr.yvel;
if (numplayers < 2) ps[p].opos.Z = ps[p].__int_pos.Z;
if (numplayers < 2) ps[p].__int_opos.Z = ps[p].__int_pos.Z;
ps[p].__int_pos.Z += q * zworldtoint;
ps[p].truefz += q;
ps[p].truecz += q;
if (numplayers > 1) ps[p].opos.Z = ps[p].__int_pos.Z;
if (numplayers > 1) ps[p].__int_opos.Z = ps[p].__int_pos.Z;
}
if (act1->spr.statnum != STAT_EFFECTOR)
{
Expand Down Expand Up @@ -3894,9 +3894,9 @@ void handle_se17(DDukeActor* actor)
act3->floorz = act2->sector()->floorz;
act3->ceilingz = act2->sector()->ceilingz;

ps[p].bobpos.X = ps[p].opos.X = ps[p].__int_pos.X;
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].__int_pos.Y;
ps[p].opos.Z = ps[p].__int_pos.Z;
ps[p].bobpos.X = ps[p].__int_opos.X = ps[p].__int_pos.X;
ps[p].bobpos.Y = ps[p].__int_opos.Y = ps[p].__int_pos.Y;
ps[p].__int_opos.Z = ps[p].__int_pos.Z;

ps[p].truefz = act3->floorz;
ps[p].truecz = act3->ceilingz;
Expand Down Expand Up @@ -4184,8 +4184,8 @@ void handle_se20(DDukeActor* actor)
ps[p].__int_pos.X += x;
ps[p].__int_pos.Y += l;

ps[p].opos.X = ps[p].__int_pos.X;
ps[p].opos.Y = ps[p].__int_pos.Y;
ps[p].__int_opos.X = ps[p].__int_pos.X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y;

SetActor(ps[p].GetActor(), { ps[p].__int_pos.X, ps[p].__int_pos.Y, ps[p].__int_pos.Z + gs.playerheight });
}
Expand Down Expand Up @@ -5239,8 +5239,8 @@ void movefta(void)
{
if (badguy(act))
{
px = ps[p].opos.X + 64 - (krand() & 127);
py = ps[p].opos.Y + 64 - (krand() & 127);
px = ps[p].__int_opos.X + 64 - (krand() & 127);
py = ps[p].__int_opos.Y + 64 - (krand() & 127);
updatesector(px, py, &psect);
if (psect == nullptr)
{
Expand All @@ -5261,14 +5261,14 @@ void movefta(void)
{
int r1 = krand();
int r2 = krand();
canseeme = cansee(sx, sy, act->int_pos().Z - (r2 % (52 << 8)), act->sector(), px, py, ps[p].opos.Z - (r1 % (32 << 8)), ps[p].cursector);
canseeme = cansee(sx, sy, act->int_pos().Z - (r2 % (52 << 8)), act->sector(), px, py, ps[p].__int_opos.Z - (r1 % (32 << 8)), ps[p].cursector);
}
}
else
{
int r1 = krand();
int r2 = krand();
canseeme = cansee(act->int_pos().X, act->int_pos().Y, act->int_pos().Z - ((r2 & 31) << 8), act->sector(), ps[p].opos.X, ps[p].opos.Y, ps[p].opos.Z - ((r1 & 31) << 8), ps[p].cursector);
canseeme = cansee(act->int_pos().X, act->int_pos().Y, act->int_pos().Z - ((r2 & 31) << 8), act->sector(), ps[p].__int_opos.X, ps[p].__int_opos.Y, ps[p].__int_opos.Z - ((r1 & 31) << 8), ps[p].cursector);
}


Expand Down
26 changes: 13 additions & 13 deletions source/games/duke/src/actors_d.cpp
Expand Up @@ -1806,9 +1806,9 @@ void movetransports_d(void)
ps[p].transporter_hold = 13;
}

ps[p].bobpos.X = ps[p].opos.X = ps[p].__int_pos.X = Owner->int_pos().X;
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].__int_pos.Y = Owner->int_pos().Y;
ps[p].opos.Z = ps[p].__int_pos.Z = Owner->int_pos().Z - gs.playerheight;
ps[p].bobpos.X = ps[p].__int_opos.X = ps[p].__int_pos.X = Owner->int_pos().X;
ps[p].bobpos.Y = ps[p].__int_opos.Y = ps[p].__int_pos.Y = Owner->int_pos().Y;
ps[p].__int_opos.Z = ps[p].__int_pos.Z = Owner->int_pos().Z - gs.playerheight;

ChangeActorSect(act2, Owner->sector());
ps[p].setCursector(act2->sector());
Expand All @@ -1828,13 +1828,13 @@ void movetransports_d(void)
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP))) ||
(ps[p].jetpack_on && PlayerInput(p, SB_CROUCH)))
{
ps[p].opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;

if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
ps[p].__int_pos.Z = Owner->int_pos().Z - 6144;
else ps[p].__int_pos.Z = Owner->int_pos().Z + 6144;
ps[p].opos.Z = ps[p].__int_pos.Z;
ps[p].__int_opos.Z = ps[p].__int_pos.Z;

auto pa = ps[p].GetActor();
pa->opos = DVector3(ps[p].__int_pos.X * inttoworld, ps[p].__int_pos.Y * inttoworld, ps[p].__int_pos.Z * zinttoworld);
Expand All @@ -1857,7 +1857,7 @@ void movetransports_d(void)
}
if (ps[p].GetActor()->spr.extra > 0)
S_PlayActorSound(DUKE_UNDERWATER, act2);
ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_ceilingz() + (7 << 8);

ps[p].vel.X = 4096 - (krand() & 8192);
Expand All @@ -1875,7 +1875,7 @@ void movetransports_d(void)
}
S_PlayActorSound(DUKE_GASP, act2);

ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_floorz() - (7 << 8);

ps[p].jumping_toggle = 1;
Expand All @@ -1884,8 +1884,8 @@ void movetransports_d(void)

if (k == 1)
{
ps[p].opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;

if (!Owner || Owner->GetOwner() != Owner)
ps[p].transporter_hold = -2;
Expand Down Expand Up @@ -2183,7 +2183,7 @@ static void greenslime(DDukeActor *actor)
if (ps[p].newOwner != nullptr)
{
ps[p].newOwner = nullptr;
ps[p].__int_pos = ps[p].opos;
ps[p].__int_pos = ps[p].__int_opos;
ps[p].angle.restore();

updatesector(ps[p].__int_pos.X, ps[p].__int_pos.Y, &ps[p].cursector);
Expand Down Expand Up @@ -3506,7 +3506,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (a & face_player)
{
if (ps[playernum].newOwner != nullptr)
goalang = getangle(ps[playernum].opos.X - actor->int_pos().X, ps[playernum].opos.Y - actor->int_pos().Y);
goalang = getangle(ps[playernum].__int_opos.X - actor->int_pos().X, ps[playernum].__int_opos.Y - actor->int_pos().Y);
else goalang = getangle(ps[playernum].__int_pos.X - actor->int_pos().X, ps[playernum].__int_pos.Y - actor->int_pos().Y);
angdif = getincangle(actor->spr.ang, goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
Expand All @@ -3519,7 +3519,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (a & face_player_slow)
{
if (ps[playernum].newOwner != nullptr)
goalang = getangle(ps[playernum].opos.X - actor->int_pos().X, ps[playernum].opos.Y - actor->int_pos().Y);
goalang = getangle(ps[playernum].__int_opos.X - actor->int_pos().X, ps[playernum].__int_opos.Y - actor->int_pos().Y);
else goalang = getangle(ps[playernum].__int_pos.X - actor->int_pos().X, ps[playernum].__int_pos.Y - actor->int_pos().Y);
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
if (angdif > -32 && angdif < 0)
Expand Down
40 changes: 20 additions & 20 deletions source/games/duke/src/actors_r.cpp
Expand Up @@ -1456,9 +1456,9 @@ void movetransports_r(void)
ps[p].transporter_hold = 13;
}

ps[p].bobpos.X = ps[p].opos.X = ps[p].__int_pos.X = Owner->int_pos().X;
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].__int_pos.Y = Owner->int_pos().Y;
ps[p].opos.Z = ps[p].__int_pos.Z = Owner->int_pos().Z - (gs.playerheight - (4 << 8));
ps[p].bobpos.X = ps[p].__int_opos.X = ps[p].__int_pos.X = Owner->int_pos().X;
ps[p].bobpos.Y = ps[p].__int_opos.Y = ps[p].__int_pos.Y = Owner->int_pos().Y;
ps[p].__int_opos.Z = ps[p].__int_pos.Z = Owner->int_pos().Z - (gs.playerheight - (4 << 8));

ChangeActorSect(act2, Owner->sector());
ps[p].setCursector(act2->sector());
Expand All @@ -1475,13 +1475,13 @@ void movetransports_r(void)
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && PlayerInput(p, SB_JUMP)) ||
(ps[p].jetpack_on && PlayerInput(p, SB_CROUCH)))
{
ps[p].opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;

if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
ps[p].__int_pos.Z = Owner->int_pos().Z - 6144;
else ps[p].__int_pos.Z = Owner->int_pos().Z + 6144;
ps[p].opos.Z = ps[p].__int_pos.Z;
ps[p].__int_opos.Z = ps[p].__int_pos.Z;

ChangeActorSect(act2, Owner->sector());
ps[p].setCursector(Owner->sector());
Expand All @@ -1496,15 +1496,15 @@ void movetransports_r(void)
if (onfloorz && sectlotag == 160 && ps[p].__int_pos.Z > (sectp->int_floorz() - (48 << 8)))
{
k = 2;
ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_ceilingz() + (7 << 8);
}

if (onfloorz && sectlotag == 161 && ps[p].__int_pos.Z < (sectp->int_ceilingz() + (6 << 8)))
{
k = 2;
if (ps[p].GetActor()->spr.extra <= 0) break;
ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_floorz() - (49 << 8);
}
}
Expand All @@ -1519,7 +1519,7 @@ void movetransports_r(void)
FX_StopAllSounds();
}
S_PlayActorSound(DUKE_UNDERWATER, ps[p].GetActor());
ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_ceilingz() + (7 << 8);
if (ps[p].OnMotorcycle)
ps[p].moto_underwater = 1;
Expand All @@ -1535,14 +1535,14 @@ void movetransports_r(void)
}
S_PlayActorSound(DUKE_GASP, ps[p].GetActor());

ps[p].opos.Z = ps[p].__int_pos.Z =
ps[p].__int_opos.Z = ps[p].__int_pos.Z =
Owner->sector()->int_floorz() - (7 << 8);
}

if (k == 1)
{
ps[p].opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;

if (Owner->GetOwner() != Owner)
ps[p].transporter_hold = -2;
Expand All @@ -1555,8 +1555,8 @@ void movetransports_r(void)
}
else if (isRRRA() && k == 2)
{
ps[p].opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;
ps[p].__int_opos.X = ps[p].__int_pos.X += Owner->int_pos().X - act->int_pos().X;
ps[p].__int_opos.Y = ps[p].__int_pos.Y += Owner->int_pos().Y - act->int_pos().Y;

if (Owner->GetOwner() != Owner)
ps[p].transporter_hold = -2;
Expand Down Expand Up @@ -2289,9 +2289,9 @@ void rr_specialstats()
if (act2->spr.picnum == RRTILE297)
{
ps[p].angle.ang = buildang(act2->spr.ang);
ps[p].bobpos.X = ps[p].opos.X = ps[p].__int_pos.X = act2->int_pos().X;
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].__int_pos.Y = act2->int_pos().Y;
ps[p].opos.Z = ps[p].__int_pos.Z = act2->int_pos().Z - (36 << 8);
ps[p].bobpos.X = ps[p].__int_opos.X = ps[p].__int_pos.X = act2->int_pos().X;
ps[p].bobpos.Y = ps[p].__int_opos.Y = ps[p].__int_pos.Y = act2->int_pos().Y;
ps[p].__int_opos.Z = ps[p].__int_pos.Z = act2->int_pos().Z - (36 << 8);
auto pact = ps[p].GetActor();
ChangeActorSect(pact, act2->sector());
ps[p].setCursector(pact->sector());
Expand Down Expand Up @@ -3488,7 +3488,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (a & face_player)
{
if (ps[pnum].newOwner != nullptr)
goalang = getangle(ps[pnum].opos.X - actor->int_pos().X, ps[pnum].opos.Y - actor->int_pos().Y);
goalang = getangle(ps[pnum].__int_opos.X - actor->int_pos().X, ps[pnum].__int_opos.Y - actor->int_pos().Y);
else goalang = getangle(ps[pnum].__int_pos.X - actor->int_pos().X, ps[pnum].__int_pos.Y - actor->int_pos().Y);
angdif = getincangle(actor->spr.ang, goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
Expand All @@ -3501,7 +3501,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (a & face_player_slow)
{
if (ps[pnum].newOwner != nullptr)
goalang = getangle(ps[pnum].opos.X - actor->int_pos().X, ps[pnum].opos.Y - actor->int_pos().Y);
goalang = getangle(ps[pnum].__int_opos.X - actor->int_pos().X, ps[pnum].__int_opos.Y - actor->int_pos().Y);
else goalang = getangle(ps[pnum].__int_pos.X - actor->int_pos().X, ps[pnum].__int_pos.Y - actor->int_pos().Y);
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
if (angdif > -32 && angdif < 0)
Expand All @@ -3517,7 +3517,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (a & antifaceplayerslow)
{
if (ps[pnum].newOwner != nullptr)
goalang = (getangle(ps[pnum].opos.X - actor->int_pos().X, ps[pnum].opos.Y - actor->int_pos().Y) + 1024) & 2047;
goalang = (getangle(ps[pnum].__int_opos.X - actor->int_pos().X, ps[pnum].__int_opos.Y - actor->int_pos().Y) + 1024) & 2047;
else goalang = (getangle(ps[pnum].__int_pos.X - actor->int_pos().X, ps[pnum].__int_pos.Y - actor->int_pos().Y) + 1024) & 2047;
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
if (angdif > -32 && angdif < 0)
Expand Down
6 changes: 3 additions & 3 deletions source/games/duke/src/animatesprites_d.cpp
Expand Up @@ -165,9 +165,9 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (t->statnum == 99) continue;
if (h->spr.statnum != STAT_ACTOR && h->spr.picnum == APLAYER && ps[h->spr.yvel].newOwner == nullptr && h->GetOwner())
{
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].opos.X, 16));
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].opos.Y, 16));
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
t->add_int_z(PHEIGHT_DUKE);
}
else if (!actorflag(h, SFLAG_NOINTERPOLATE))
Expand Down
6 changes: 3 additions & 3 deletions source/games/duke/src/animatesprites_r.cpp
Expand Up @@ -145,9 +145,9 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (t->statnum == 99) continue;
if (h->spr.statnum != STAT_ACTOR && h->spr.picnum == APLAYER && ps[h->spr.yvel].newOwner == nullptr && h->GetOwner())
{
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].opos.X, 16));
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].opos.Y, 16));
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
t->add_int_z(PHEIGHT_RR);
h->spr.xrepeat = 24;
h->spr.yrepeat = 17;
Expand Down
6 changes: 3 additions & 3 deletions source/games/duke/src/ccmds.cpp
Expand Up @@ -115,9 +115,9 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
{
player_struct* p = &ps[myconnectindex];

p->opos.X = p->__int_pos.X = x;
p->opos.Y = p->__int_pos.Y = y;
p->opos.Z = p->__int_pos.Z = z;
p->__int_opos.X = p->__int_pos.X = x;
p->__int_opos.Y = p->__int_pos.Y = y;
p->__int_opos.Z = p->__int_pos.Z = z;

if (ang != INT_MIN)
{
Expand Down

0 comments on commit ad72339

Please sign in to comment.