- removed all access to the consoleplayer variable from the play code
There is one exception in ACS for a net arbitrator check. Aside from this the bot_observer CVAR was also removed. This was never implemented properly and could stomp upon custom player settings.
This commit is contained in:
parent
2903025268
commit
d358e401ee
16 changed files with 101 additions and 110 deletions
|
|
@ -2448,7 +2448,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
|||
}
|
||||
// if this is the current camera we need to store the point where the portal was crossed and the exit
|
||||
// so that the renderer can properly calculate an interpolated position along the movement path.
|
||||
if (thing == players[consoleplayer].camera)
|
||||
if (thing->Level->isCamera(thing))
|
||||
{
|
||||
divline_t dl1 = { besthit.Oldrefpos.X,besthit.Oldrefpos.Y, besthit.Refpos.X - besthit.Oldrefpos.X, besthit.Refpos.Y - besthit.Oldrefpos.Y };
|
||||
DVector3a hit = { {dl1.x + dl1.dx * bestfrac, dl1.y + dl1.dy * bestfrac, 0.},0. };
|
||||
|
|
@ -2463,7 +2463,8 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
|||
{
|
||||
P_TranslatePortalXY(ld, hit.pos.X, hit.pos.Y);
|
||||
P_TranslatePortalZ(ld, hit.pos.Z);
|
||||
players[consoleplayer].viewz += hit.pos.Z; // needs to be done here because otherwise the renderer will not catch the change.
|
||||
auto p = thing->Level->GetConsolePlayer();
|
||||
if (p) p->viewz += hit.pos.Z; // needs to be done here because otherwise the renderer will not catch the change.
|
||||
P_TranslatePortalAngle(ld, hit.angle);
|
||||
}
|
||||
R_AddInterpolationPoint(hit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue