mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- Duke: Replace player_struct
oposz
with opos.Z
calls.
This commit is contained in:
parent
111aa16e64
commit
3adf81e4f9
19 changed files with 56 additions and 56 deletions
|
@ -204,7 +204,7 @@ void clearcamera(player_struct* ps)
|
|||
ps->newOwner = nullptr;
|
||||
ps->pos.X = ps->opos.X;
|
||||
ps->pos.Y = ps->opos.Y;
|
||||
ps->pos.Z = ps->oposz;
|
||||
ps->pos.Z = ps->opos.Z;
|
||||
ps->angle.restore();
|
||||
updatesector(ps->pos.X, ps->pos.Y, &ps->cursector);
|
||||
|
||||
|
@ -403,7 +403,7 @@ void moveplayers(void)
|
|||
{
|
||||
act->spr.pos.X = p->opos.X;
|
||||
act->spr.pos.Y = p->opos.Y;
|
||||
act->spr.pos.Z = p->oposz + gs.playerheight;
|
||||
act->spr.pos.Z = p->opos.Z + gs.playerheight;
|
||||
act->spr.backupz();
|
||||
act->spr.ang = p->angle.oang.asbuild();
|
||||
SetActor(act, act->spr.pos);
|
||||
|
@ -799,7 +799,7 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
auto ang = ps[p].angle.ang.asbuild();
|
||||
ps[p].opos.X = ps[p].pos.X;
|
||||
ps[p].opos.Y = ps[p].pos.Y;
|
||||
ps[p].oposz = ps[p].pos.Z;
|
||||
ps[p].opos.Z = ps[p].pos.Z;
|
||||
ps[p].pos.X = actor->spr.pos.X - bcos(ang, -6);
|
||||
ps[p].pos.Y = actor->spr.pos.Y - bsin(ang, -6);
|
||||
ps[p].pos.Z = actor->spr.pos.Z + (2 << 8);
|
||||
|
@ -3874,11 +3874,11 @@ void handle_se17(DDukeActor* actor)
|
|||
if (act1->spr.statnum == STAT_PLAYER && act1->GetOwner())
|
||||
{
|
||||
int p = act1->spr.yvel;
|
||||
if (numplayers < 2) ps[p].oposz = ps[p].pos.Z;
|
||||
if (numplayers < 2) ps[p].opos.Z = ps[p].pos.Z;
|
||||
ps[p].pos.Z += q;
|
||||
ps[p].truefz += q;
|
||||
ps[p].truecz += q;
|
||||
if (numplayers > 1) ps[p].oposz = ps[p].pos.Z;
|
||||
if (numplayers > 1) ps[p].opos.Z = ps[p].pos.Z;
|
||||
}
|
||||
if (act1->spr.statnum != STAT_EFFECTOR)
|
||||
{
|
||||
|
@ -3935,7 +3935,7 @@ void handle_se17(DDukeActor* actor)
|
|||
|
||||
ps[p].bobposx = ps[p].opos.X = ps[p].pos.X;
|
||||
ps[p].bobposy = ps[p].opos.Y = ps[p].pos.Y;
|
||||
ps[p].oposz = ps[p].pos.Z;
|
||||
ps[p].opos.Z = ps[p].pos.Z;
|
||||
|
||||
ps[p].truefz = act3->floorz;
|
||||
ps[p].truecz = act3->ceilingz;
|
||||
|
|
|
@ -641,13 +641,13 @@ void movefta_d(void)
|
|||
|
||||
int r1 = krand();
|
||||
int r2 = krand();
|
||||
j = cansee(sx, sy, act->spr.pos.Z - (r2 % (52 << 8)), act->spr.sector(), px, py, ps[p].oposz - (r1 % (32 << 8)), ps[p].cursector);
|
||||
j = cansee(sx, sy, act->spr.pos.Z - (r2 % (52 << 8)), act->spr.sector(), px, py, ps[p].opos.Z - (r1 % (32 << 8)), ps[p].cursector);
|
||||
}
|
||||
else
|
||||
{
|
||||
int r1 = krand();
|
||||
int r2 = krand();
|
||||
j = cansee(act->spr.pos.X, act->spr.pos.Y, act->spr.pos.Z - ((r2 & 31) << 8), act->spr.sector(), ps[p].opos.X, ps[p].opos.Y, ps[p].oposz - ((r1 & 31) << 8), ps[p].cursector);
|
||||
j = cansee(act->spr.pos.X, act->spr.pos.Y, act->spr.pos.Z - ((r2 & 31) << 8), act->spr.sector(), ps[p].opos.X, ps[p].opos.Y, ps[p].opos.Z - ((r1 & 31) << 8), ps[p].cursector);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1942,7 +1942,7 @@ void movetransports_d(void)
|
|||
|
||||
ps[p].bobposx = ps[p].opos.X = ps[p].pos.X = Owner->spr.pos.X;
|
||||
ps[p].bobposy = ps[p].opos.Y = ps[p].pos.Y = Owner->spr.pos.Y;
|
||||
ps[p].oposz = ps[p].pos.Z = Owner->spr.pos.Z - gs.playerheight;
|
||||
ps[p].opos.Z = ps[p].pos.Z = Owner->spr.pos.Z - gs.playerheight;
|
||||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
ps[p].setCursector(act2->spr.sector());
|
||||
|
@ -1968,7 +1968,7 @@ void movetransports_d(void)
|
|||
if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
|
||||
ps[p].pos.Z = Owner->spr.pos.Z - 6144;
|
||||
else ps[p].pos.Z = Owner->spr.pos.Z + 6144;
|
||||
ps[p].oposz = ps[p].pos.Z;
|
||||
ps[p].opos.Z = ps[p].pos.Z;
|
||||
|
||||
auto pa = ps[p].GetActor();
|
||||
pa->spr.opos = ps[p].pos;
|
||||
|
@ -1991,7 +1991,7 @@ void movetransports_d(void)
|
|||
}
|
||||
if (ps[p].GetActor()->spr.extra > 0)
|
||||
S_PlayActorSound(DUKE_UNDERWATER, act2);
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
|
||||
ps[p].posxv = 4096 - (krand() & 8192);
|
||||
|
@ -2009,7 +2009,7 @@ void movetransports_d(void)
|
|||
}
|
||||
S_PlayActorSound(DUKE_GASP, act2);
|
||||
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->floorz - (7 << 8);
|
||||
|
||||
ps[p].jumping_toggle = 1;
|
||||
|
@ -2340,7 +2340,7 @@ static void greenslime(DDukeActor *actor)
|
|||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.X = ps[p].opos.X;
|
||||
ps[p].pos.Y = ps[p].opos.Y;
|
||||
ps[p].pos.Z = ps[p].oposz;
|
||||
ps[p].pos.Z = ps[p].opos.Z;
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].pos.X, ps[p].pos.Y, &ps[p].cursector);
|
||||
|
|
|
@ -545,14 +545,14 @@ void movefta_r(void)
|
|||
{
|
||||
int r1 = krand();
|
||||
int r2 = krand();
|
||||
j = cansee(sx, sy, act->spr.pos.Z - (r2 % (52 << 8)), act->spr.sector(), px, py, ps[p].oposz - (r1 % (32 << 8)), ps[p].cursector);
|
||||
j = cansee(sx, sy, act->spr.pos.Z - (r2 % (52 << 8)), act->spr.sector(), px, py, ps[p].opos.Z - (r1 % (32 << 8)), ps[p].cursector);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int r1 = krand();
|
||||
int r2 = krand();
|
||||
j = cansee(act->spr.pos.X, act->spr.pos.Y, act->spr.pos.Z - ((r2 & 31) << 8), act->spr.sector(), ps[p].opos.X, ps[p].opos.Y, ps[p].oposz - ((r1 & 31) << 8), ps[p].cursector);
|
||||
j = cansee(act->spr.pos.X, act->spr.pos.Y, act->spr.pos.Z - ((r2 & 31) << 8), act->spr.sector(), ps[p].opos.X, ps[p].opos.Y, ps[p].opos.Z - ((r1 & 31) << 8), ps[p].cursector);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1606,7 +1606,7 @@ void movetransports_r(void)
|
|||
|
||||
ps[p].bobposx = ps[p].opos.X = ps[p].pos.X = Owner->spr.pos.X;
|
||||
ps[p].bobposy = ps[p].opos.Y = ps[p].pos.Y = Owner->spr.pos.Y;
|
||||
ps[p].oposz = ps[p].pos.Z = Owner->spr.pos.Z - (gs.playerheight - (4 << 8));
|
||||
ps[p].opos.Z = ps[p].pos.Z = Owner->spr.pos.Z - (gs.playerheight - (4 << 8));
|
||||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
ps[p].setCursector(act2->spr.sector());
|
||||
|
@ -1629,7 +1629,7 @@ void movetransports_r(void)
|
|||
if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
|
||||
ps[p].pos.Z = Owner->spr.pos.Z - 6144;
|
||||
else ps[p].pos.Z = Owner->spr.pos.Z + 6144;
|
||||
ps[p].oposz = ps[p].pos.Z;
|
||||
ps[p].opos.Z = ps[p].pos.Z;
|
||||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
ps[p].setCursector(Owner->sector());
|
||||
|
@ -1644,7 +1644,7 @@ void movetransports_r(void)
|
|||
if (onfloorz && sectlotag == 160 && ps[p].pos.Z > (sectp->floorz - (48 << 8)))
|
||||
{
|
||||
k = 2;
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
}
|
||||
|
||||
|
@ -1652,7 +1652,7 @@ void movetransports_r(void)
|
|||
{
|
||||
k = 2;
|
||||
if (ps[p].GetActor()->spr.extra <= 0) break;
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->floorz - (49 << 8);
|
||||
}
|
||||
}
|
||||
|
@ -1667,7 +1667,7 @@ void movetransports_r(void)
|
|||
FX_StopAllSounds();
|
||||
}
|
||||
S_PlayActorSound(DUKE_UNDERWATER, ps[p].GetActor());
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
if (ps[p].OnMotorcycle)
|
||||
ps[p].moto_underwater = 1;
|
||||
|
@ -1683,7 +1683,7 @@ void movetransports_r(void)
|
|||
}
|
||||
S_PlayActorSound(DUKE_GASP, ps[p].GetActor());
|
||||
|
||||
ps[p].oposz = ps[p].pos.Z =
|
||||
ps[p].opos.Z = ps[p].pos.Z =
|
||||
Owner->sector()->floorz - (7 << 8);
|
||||
}
|
||||
|
||||
|
@ -2451,7 +2451,7 @@ void rr_specialstats()
|
|||
ps[p].angle.ang = buildang(act2->spr.ang);
|
||||
ps[p].bobposx = ps[p].opos.X = ps[p].pos.X = act2->spr.pos.X;
|
||||
ps[p].bobposy = ps[p].opos.Y = ps[p].pos.Y = act2->spr.pos.Y;
|
||||
ps[p].oposz = ps[p].pos.Z = act2->spr.pos.Z - (36 << 8);
|
||||
ps[p].opos.Z = ps[p].pos.Z = act2->spr.pos.Z - (36 << 8);
|
||||
auto pact = ps[p].GetActor();
|
||||
ChangeActorSect(pact, act2->sector());
|
||||
ps[p].setCursector(pact->sector());
|
||||
|
|
|
@ -167,7 +167,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
{
|
||||
t->pos.X -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.X - ps[h->spr.yvel].opos.X, 16);
|
||||
t->pos.Y -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.Y - ps[h->spr.yvel].opos.Y, 16);
|
||||
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].oposz, ps[h->spr.yvel].pos.Z, smoothratio);
|
||||
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].pos.Z, smoothratio);
|
||||
t->pos.Z += PHEIGHT_DUKE;
|
||||
}
|
||||
else if (h->spr.picnum != CRANEPOLE)
|
||||
|
|
|
@ -148,7 +148,7 @@ void animatesprites_r(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
{
|
||||
t->pos.X -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.X - ps[h->spr.yvel].opos.X, 16);
|
||||
t->pos.Y -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.Y - ps[h->spr.yvel].opos.Y, 16);
|
||||
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].oposz, ps[h->spr.yvel].pos.Z, smoothratio);
|
||||
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].pos.Z, smoothratio);
|
||||
t->pos.Z += PHEIGHT_RR;
|
||||
h->spr.xrepeat = 24;
|
||||
h->spr.yrepeat = 17;
|
||||
|
|
|
@ -117,7 +117,7 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
|||
|
||||
p->opos.X = p->pos.X = x;
|
||||
p->opos.Y = p->pos.Y = y;
|
||||
p->oposz = p->pos.Z = z;
|
||||
p->opos.Z = p->pos.Z = z;
|
||||
|
||||
if (ang != INT_MIN)
|
||||
{
|
||||
|
|
|
@ -388,8 +388,8 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_OPOSZ:
|
||||
if (bSet) ps[iPlayer].oposz = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].oposz, sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].opos.Z = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].opos.Z, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_PYOFF:
|
||||
|
@ -2068,7 +2068,7 @@ int ParseState::parse(void)
|
|||
ps[g_p].newOwner = nullptr;
|
||||
ps[g_p].pos.X = ps[g_p].opos.X;
|
||||
ps[g_p].pos.Y = ps[g_p].opos.Y;
|
||||
ps[g_p].pos.Z = ps[g_p].oposz;
|
||||
ps[g_p].pos.Z = ps[g_p].opos.Z;
|
||||
ps[g_p].angle.restore();
|
||||
updatesector(ps[g_p].pos.X,ps[g_p].pos.Y,&ps[g_p].cursector);
|
||||
|
||||
|
@ -2247,7 +2247,7 @@ int ParseState::parse(void)
|
|||
pickrandomspot(g_p);
|
||||
g_ac->spr.pos.X = ps[g_p].bobposx = ps[g_p].opos.X = ps[g_p].pos.X;
|
||||
g_ac->spr.pos.Y = ps[g_p].bobposy = ps[g_p].opos.Y = ps[g_p].pos.Y;
|
||||
g_ac->spr.pos.Z = ps[g_p].oposz = ps[g_p].pos.Z;
|
||||
g_ac->spr.pos.Z = ps[g_p].opos.Z = ps[g_p].pos.Z;
|
||||
g_ac->spr.backuppos();
|
||||
updatesector(ps[g_p].pos.X, ps[g_p].pos.Y, &ps[g_p].cursector);
|
||||
SetActor(ps[g_p].GetActor(), { ps[g_p].pos.X, ps[g_p].pos.Y, ps[g_p].pos.Z + gs.playerheight });
|
||||
|
|
|
@ -754,7 +754,7 @@ void player_struct::backuppos(bool noclipping)
|
|||
pos.Y = opos.Y;
|
||||
}
|
||||
|
||||
oposz = pos.Z;
|
||||
opos.Z = pos.Z;
|
||||
bobposx = pos.X;
|
||||
bobposy = pos.Y;
|
||||
opyoff = pyoff;
|
||||
|
@ -1067,7 +1067,7 @@ DEFINE_FIELD_X(DukePlayer, player_struct, bobposx)
|
|||
DEFINE_FIELD_X(DukePlayer, player_struct, bobposy)
|
||||
//DEFINE_FIELD_X(DukePlayer, player_struct, oposx)
|
||||
//DEFINE_FIELD_X(DukePlayer, player_struct, oposy)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, oposz)
|
||||
//DEFINE_FIELD_X(DukePlayer, player_struct, oposz)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, pyoff)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, opyoff)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, posxv)
|
||||
|
|
|
@ -107,7 +107,7 @@ static void shootfireball(DDukeActor *actor, int p, int sx, int sy, int sz, int
|
|||
sa += 16 - (krand() & 31);
|
||||
int scratch;
|
||||
int j = findplayer(actor, &scratch);
|
||||
zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
zvel = (((ps[j].opos.Z - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, int sx, int sy, int
|
|||
|
||||
int l = ldist(ps[j].GetActor(), actor);
|
||||
if (l != 0)
|
||||
zvel = ((ps[j].oposz - sz) * vel) / l;
|
||||
zvel = ((ps[j].opos.Z - sz) * vel) / l;
|
||||
|
||||
if (badguy(actor) && (actor->spr.hitag & face_player_smart) != 0)
|
||||
sa = (short)(actor->spr.ang + (krand() & 31) - 16);
|
||||
|
@ -607,7 +607,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
|||
int j = findplayer(actor, &x);
|
||||
// sa = getangle(ps[j].oposx-sx,ps[j].oposy-sy);
|
||||
sa += 16 - (krand() & 31);
|
||||
zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
zvel = (((ps[j].opos.Z - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
}
|
||||
|
||||
int oldzvel = zvel;
|
||||
|
@ -724,7 +724,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
|
|||
}
|
||||
|
||||
l = ldist(ps[j].GetActor(), actor);
|
||||
zvel = ((ps[j].oposz - sz) * vel) / l;
|
||||
zvel = ((ps[j].opos.Z - sz) * vel) / l;
|
||||
|
||||
if (badguy(actor) && (actor->spr.hitag & face_player_smart))
|
||||
sa = actor->spr.ang + (krand() & 31) - 16;
|
||||
|
@ -1157,7 +1157,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
{
|
||||
j = findplayer(actor, &x);
|
||||
l = ldist(ps[j].GetActor(), actor);
|
||||
zvel = ((ps[j].oposz - sz) * 512) / l;
|
||||
zvel = ((ps[j].opos.Z - sz) * 512) / l;
|
||||
}
|
||||
else zvel = 0;
|
||||
|
||||
|
@ -2039,7 +2039,7 @@ int operateTripbomb(int snum)
|
|||
if ((hit.hitWall->twoSided() && hit.hitWall->nextSector()->lotag <= 2) || (!hit.hitWall->twoSided() && hit.hitSector->lotag <= 2))
|
||||
if (((hit.hitpos.X - p->pos.X) * (hit.hitpos.X - p->pos.X) + (hit.hitpos.Y - p->pos.Y) * (hit.hitpos.Y - p->pos.Y)) < (290 * 290))
|
||||
{
|
||||
p->pos.Z = p->oposz;
|
||||
p->pos.Z = p->opos.Z;
|
||||
p->poszv = 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -2579,7 +2579,7 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
case TRIPBOMB_WEAPON: // Claymore in NAM
|
||||
if (p->kickback_pic < 4)
|
||||
{
|
||||
p->pos.Z = p->oposz;
|
||||
p->pos.Z = p->opos.Z;
|
||||
p->poszv = 0;
|
||||
if (p->kickback_pic == 3)
|
||||
fi.shoot(pact, HANDHOLDINGLASER);
|
||||
|
|
|
@ -529,7 +529,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
|||
else if (actor->spr.picnum != UFOBEAM)
|
||||
sa += 16 - (krand() & 31);
|
||||
|
||||
zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
zvel = (((ps[j].opos.Z - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
}
|
||||
|
||||
int oldzvel = zvel;
|
||||
|
@ -654,7 +654,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
|||
}
|
||||
|
||||
l = ldist(ps[j].GetActor(), actor);
|
||||
zvel = ((ps[j].oposz - sz) * vel) / l;
|
||||
zvel = ((ps[j].opos.Z - sz) * vel) / l;
|
||||
|
||||
if (badguy(actor) && (actor->spr.hitag & face_player_smart))
|
||||
sa = actor->spr.ang + (krand() & 31) - 16;
|
||||
|
@ -793,7 +793,7 @@ static void shootwhip(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
|||
sa -= (krand() & 16);
|
||||
else
|
||||
sa += 16 - (krand() & 31);
|
||||
zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
zvel = (((ps[j].opos.Z - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor);
|
||||
}
|
||||
|
||||
int oldzvel = zvel;
|
||||
|
|
|
@ -439,7 +439,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
|
|||
if (aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_STANDSTILL
|
||||
&& p->kickback_pic < (aplWeaponFireDelay(p->curr_weapon, snum) + 1))
|
||||
{
|
||||
p->pos.Z = p->oposz;
|
||||
p->pos.Z = p->opos.Z;
|
||||
p->poszv = 0;
|
||||
}
|
||||
if (p->kickback_pic == aplWeaponSound2Time(p->curr_weapon, snum))
|
||||
|
|
|
@ -62,7 +62,7 @@ void pickrandomspot(int snum)
|
|||
|
||||
p->bobposx = p->opos.X = p->pos.X = po[i].ox;
|
||||
p->bobposy = p->opos.Y = p->pos.Y = po[i].oy;
|
||||
p->oposz = p->pos.Z = po[i].oz;
|
||||
p->opos.Z = p->pos.Z = po[i].oz;
|
||||
p->angle.oang = p->angle.ang = buildang(po[i].oa);
|
||||
p->setCursector(po[i].os);
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ void resetpspritevars(int g)
|
|||
|
||||
ps[j].bobposx = ps[j].opos.X = ps[j].pos.X = act->spr.pos.X;
|
||||
ps[j].bobposy = ps[j].opos.Y = ps[j].pos.Y = act->spr.pos.Y;
|
||||
ps[j].oposz = ps[j].pos.Z = act->spr.pos.Z;
|
||||
ps[j].opos.Z = ps[j].pos.Z = act->spr.pos.Z;
|
||||
act->spr.backuppos();
|
||||
ps[j].angle.oang = ps[j].angle.ang = buildang(act->spr.ang);
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
{
|
||||
cposx = interpolatedvalue(p->opos.X, p->pos.X, smoothratio);
|
||||
cposy = interpolatedvalue(p->opos.Y, p->pos.Y, smoothratio);
|
||||
cposz = interpolatedvalue(p->oposz, p->pos.Z, smoothratio);;
|
||||
cposz = interpolatedvalue(p->opos.Z, p->pos.Z, smoothratio);;
|
||||
if (SyncInput())
|
||||
{
|
||||
// Original code for when the values are passed through the sync struct
|
||||
|
|
|
@ -279,7 +279,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
w.invdisptime = 0;
|
||||
w.opos.X = w.pos.X;
|
||||
w.opos.Y = w.pos.Y;
|
||||
w.oposz = w.pos.Z;
|
||||
w.opos.Z = w.pos.Z;
|
||||
w.opyoff = w.pyoff;
|
||||
w.oweapon_sway = w.weapon_sway;
|
||||
w.oweapon_pos = w.weapon_pos;
|
||||
|
|
|
@ -220,7 +220,7 @@ int findplayer(const DDukeActor* actor, int* d)
|
|||
|
||||
if (ud.multimode < 2)
|
||||
{
|
||||
if (d) *d = abs(ps[myconnectindex].opos.X - s->X) + abs(ps[myconnectindex].opos.Y - s->Y) + ((abs(ps[myconnectindex].oposz - s->Z + (28 << 8))) >> 4);
|
||||
if (d) *d = abs(ps[myconnectindex].opos.X - s->X) + abs(ps[myconnectindex].opos.Y - s->Y) + ((abs(ps[myconnectindex].opos.Z - s->Z + (28 << 8))) >> 4);
|
||||
return myconnectindex;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ int findplayer(const DDukeActor* actor, int* d)
|
|||
|
||||
for (j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
{
|
||||
x = abs(ps[j].opos.X - s->X) + abs(ps[j].opos.Y - s->Y) + ((abs(ps[j].oposz - s->Z + (28 << 8))) >> 4);
|
||||
x = abs(ps[j].opos.X - s->X) + abs(ps[j].opos.Y - s->Y) + ((abs(ps[j].opos.Z - s->Z + (28 << 8))) >> 4);
|
||||
if (x < closest && ps[j].GetActor()->spr.extra > 0)
|
||||
{
|
||||
closest_player = j;
|
||||
|
@ -258,7 +258,7 @@ int findotherplayer(int p, int* d)
|
|||
for (j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
if (p != j && ps[j].GetActor()->spr.extra > 0)
|
||||
{
|
||||
x = abs(ps[j].opos.X - ps[p].pos.X) + abs(ps[j].opos.Y - ps[p].pos.Y) + (abs(ps[j].oposz - ps[p].pos.Z) >> 4);
|
||||
x = abs(ps[j].opos.X - ps[p].pos.X) + abs(ps[j].opos.Y - ps[p].pos.Y) + (abs(ps[j].opos.Z - ps[p].pos.Z) >> 4);
|
||||
|
||||
if (x < closest)
|
||||
{
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.X = ps[p].opos.X;
|
||||
ps[p].pos.Y = ps[p].opos.Y;
|
||||
ps[p].pos.Z = ps[p].oposz;
|
||||
ps[p].pos.Z = ps[p].opos.Z;
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].pos.X, ps[p].pos.Y, &ps[p].cursector);
|
||||
|
@ -1504,7 +1504,7 @@ void clearcameras(int i, player_struct* p)
|
|||
{
|
||||
p->pos.X = p->opos.X;
|
||||
p->pos.Y = p->opos.Y;
|
||||
p->pos.Z = p->oposz;
|
||||
p->pos.Z = p->opos.Z;
|
||||
p->newOwner = nullptr;
|
||||
|
||||
updatesector(p->pos.X, p->pos.Y, &p->cursector);
|
||||
|
@ -1616,7 +1616,7 @@ void checksectors_d(int snum)
|
|||
return;
|
||||
}
|
||||
if (p->newOwner != nullptr)
|
||||
neartag({ p->opos.X, p->opos.Y, p->oposz }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280L, 1);
|
||||
neartag({ p->opos.X, p->opos.Y, p->opos.Z }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280L, 1);
|
||||
else
|
||||
{
|
||||
neartag(p->pos, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
|
|
|
@ -2414,7 +2414,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.X = ps[p].opos.X;
|
||||
ps[p].pos.Y = ps[p].opos.Y;
|
||||
ps[p].pos.Z = ps[p].oposz;
|
||||
ps[p].pos.Z = ps[p].opos.Z;
|
||||
|
||||
updatesector(ps[p].pos.X, ps[p].pos.Y, &ps[p].cursector);
|
||||
|
||||
|
@ -2569,7 +2569,7 @@ void checksectors_r(int snum)
|
|||
}
|
||||
|
||||
if (p->newOwner != nullptr)
|
||||
neartag({ p->opos.X, p->opos.Y, p->oposz }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280L, 1);
|
||||
neartag({ p->opos.X, p->opos.Y, p->opos.Z }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280L, 1);
|
||||
else
|
||||
{
|
||||
neartag(p->pos, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
|
|
|
@ -216,7 +216,7 @@ struct player_struct
|
|||
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
|
||||
int exitx, exity, loogiex[64], loogiey[64], numloogs, loogcnt;
|
||||
int invdisptime;
|
||||
int bobposx, bobposy, oposz, pyoff, opyoff;
|
||||
int bobposx, bobposy, pyoff, opyoff;
|
||||
int posxv, posyv, poszv, last_pissed_time, truefz, truecz;
|
||||
int player_par, visibility;
|
||||
int bobcounter;
|
||||
|
|
|
@ -152,7 +152,7 @@ struct DukePlayer
|
|||
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
|
||||
native int exitx, exity, loogiex[64], loogiey[64], numloogs, loogcnt;
|
||||
native int invdisptime;
|
||||
native int bobposx, bobposy, oposz, pyoff, opyoff;
|
||||
native int bobposx, bobposy, pyoff, opyoff;
|
||||
native int posxv, posyv, poszv, last_pissed_time, truefz, truecz;
|
||||
native int player_par, visibility;
|
||||
native int bobcounter;
|
||||
|
|
Loading…
Reference in a new issue