- changed most places where a player index is calculated by subtracting the player array's base access.

This commit is contained in:
Christoph Oelckers 2019-02-01 17:31:11 +01:00
parent d358e401ee
commit 202f3d7d80
10 changed files with 27 additions and 25 deletions

View file

@ -23,6 +23,7 @@
#include "vm.h"
#include "d_player.h"
#include "hw_postprocessshader.h"
#include "g_levellocals.h"
TArray<PostProcessShader> PostProcessShaders;
@ -32,7 +33,7 @@ static bool IsConsolePlayer(player_t *player)
AActor *activator = player ? player->mo : nullptr;
if (activator == nullptr || activator->player == nullptr)
return false;
return int(activator->player - players) == consoleplayer;
return activator->player == activator->Level->GetConsolePlayer();
}
static void ShaderSetEnabled(player_t *player, const FString &shaderName, bool value)