- 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:
Christoph Oelckers 2019-02-01 17:02:10 +01:00
commit d358e401ee
16 changed files with 101 additions and 110 deletions

View file

@ -606,7 +606,7 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags, FName MeansOf
VMCall(func, &param, 1, nullptr, 0);
}
if (this == players[consoleplayer].camera && automapactive)
if (Level->isCamera(this) && automapactive)
{
// don't die in auto map, switch view prior to dying
AM_Stop ();
@ -1352,7 +1352,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
player->damagecount = 100; // teleport stomp does 10k points...
}
temp = damage < 100 ? damage : 100;
if (player == &players[consoleplayer])
if (player == target->Level->GetConsolePlayer() )
{
I_Tactile (40,10,40+temp*2);
}