Merge pull request #960 from argonui/nav-overlay
Nil handling for Navigation Overlay
This commit is contained in:
commit
e3e35f2c80
@ -320,7 +320,7 @@ function loadCamera(player, index, matColor)
|
||||
local lookHere
|
||||
|
||||
-- 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
|
||||
local zone = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlayAreaZone")
|
||||
local bounds = getDynamicViewBounds(zone.getObjects())
|
||||
@ -331,7 +331,7 @@ function loadCamera(player, index, matColor)
|
||||
distance = 0.8 * math.max(bounds.diffX, bounds.diffZ) + 7
|
||||
}
|
||||
-- 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)
|
||||
matColor = matColor or matColorList[index - 2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user