the ScreenFilter env will be nil sometimes, catch that
This commit is contained in:
@@ -23,7 +23,7 @@ local stepsType = style:GetStepsType()
|
|||||||
if numPlayers == 1 then
|
if numPlayers == 1 then
|
||||||
local player = GAMESTATE:GetMasterPlayerNumber()
|
local player = GAMESTATE:GetMasterPlayerNumber()
|
||||||
local pNum = (player == PLAYER_1) and 1 or 2
|
local pNum = (player == PLAYER_1) and 1 or 2
|
||||||
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum));
|
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum)) or 0;
|
||||||
|
|
||||||
local pos;
|
local pos;
|
||||||
-- [ScreenGameplay] PlayerP#Player*Side(s)X
|
-- [ScreenGameplay] PlayerP#Player*Side(s)X
|
||||||
@@ -54,7 +54,7 @@ else
|
|||||||
-- otherwise we need two separate ones. to the pairsmobile!
|
-- otherwise we need two separate ones. to the pairsmobile!
|
||||||
for i, player in ipairs(PlayerNumber) do
|
for i, player in ipairs(PlayerNumber) do
|
||||||
local pNum = (player == PLAYER_1) and 1 or 2
|
local pNum = (player == PLAYER_1) and 1 or 2
|
||||||
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum));
|
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum)) or 0;
|
||||||
local metricName = string.format("PlayerP%i%sX",pNum,styleType)
|
local metricName = string.format("PlayerP%i%sX",pNum,styleType)
|
||||||
local pos = THEME:GetMetric("ScreenGameplay",metricName)
|
local pos = THEME:GetMetric("ScreenGameplay",metricName)
|
||||||
t[#t+1] = Def.Quad{
|
t[#t+1] = Def.Quad{
|
||||||
@@ -65,4 +65,4 @@ else
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
Reference in New Issue
Block a user