Nil handling for Navigation Overlay
This commit is contained in:
parent
9b0a4f5090
commit
8be7a03446
@ -320,7 +320,7 @@ function loadCamera(player, index, matColor)
|
|||||||
local lookHere
|
local lookHere
|
||||||
|
|
||||||
-- dynamic view of the play area
|
-- dynamic view of the play area
|
||||||
if index == 2 then
|
if index and index == 2 then
|
||||||
-- search the scripting zone on the play area for objects
|
-- search the scripting zone on the play area for objects
|
||||||
local zone = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlayAreaZone")
|
local zone = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlayAreaZone")
|
||||||
local bounds = getDynamicViewBounds(zone.getObjects())
|
local bounds = getDynamicViewBounds(zone.getObjects())
|
||||||
@ -331,7 +331,7 @@ function loadCamera(player, index, matColor)
|
|||||||
distance = 0.8 * math.max(bounds.diffX, bounds.diffZ) + 7
|
distance = 0.8 * math.max(bounds.diffX, bounds.diffZ) + 7
|
||||||
}
|
}
|
||||||
-- dynamic view of the clicked play mat
|
-- dynamic view of the clicked play mat
|
||||||
elseif (index >= 3 and index <= 6) or matColor then
|
elseif (index and index >= 3 and index <= 6) or matColor then
|
||||||
-- maybe get matColor (mat index 1 - 4)
|
-- maybe get matColor (mat index 1 - 4)
|
||||||
matColor = matColor or matColorList[index - 2]
|
matColor = matColor or matColorList[index - 2]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user