Fixed: Check blockFaceUnderCursor isn't None when drawing selection reticle.
This commit is contained in:
parent
f0113a1864
commit
8bdc3266ae
@ -870,8 +870,6 @@ class SelectionTool(EditorTool):
|
||||
GL.glDisable(GL.GL_BLEND)
|
||||
GL.glDisable(GL.GL_DEPTH_TEST)
|
||||
|
||||
pos, direction = self.editor.blockFaceUnderCursor
|
||||
x, y, z = pos
|
||||
selectionColor = map(lambda a: a * a * a * a, self.selectionColor)
|
||||
|
||||
# draw a colored box representing the possible selection
|
||||
@ -882,6 +880,8 @@ class SelectionTool(EditorTool):
|
||||
if ((self.selectionInProgress or self.clickSelectionInProgress) and otherCorner != None):
|
||||
GL.glPolygonOffset(DepthOffset.PotentialSelection, DepthOffset.PotentialSelection)
|
||||
|
||||
pos, direction = self.editor.blockFaceUnderCursor
|
||||
if pos is not None:
|
||||
box = self.selectionBoxForCorners(otherCorner, pos)
|
||||
if self.chunkMode:
|
||||
box = box.chunkBox(self.editor.level)
|
||||
|
Reference in New Issue
Block a user