Fix incorrect face used for shading in rotated variants (e.g. stairs)
This commit is contained in:
parent
ca58a60fc6
commit
9f1163f69e
@ -379,19 +379,19 @@ cdef class BlockModels(object):
|
|||||||
faceInfo.x2, faceInfo.y2, faceInfo.z2,
|
faceInfo.x2, faceInfo.y2, faceInfo.z2,
|
||||||
quadface, u1, v1, u2, v2, faceInfo.textureRotation)
|
quadface, u1, v1, u2, v2, faceInfo.textureRotation)
|
||||||
|
|
||||||
|
if faceInfo.variantYrot:
|
||||||
|
quadface = rotateFace(quadface, 1, faceInfo.variantYrot)
|
||||||
if faceInfo.variantZrot:
|
if faceInfo.variantZrot:
|
||||||
quadface = rotateFace(quadface, 2, faceInfo.variantZrot)
|
quadface = rotateFace(quadface, 2, faceInfo.variantZrot)
|
||||||
if faceInfo.variantXrot:
|
if faceInfo.variantXrot:
|
||||||
quadface = rotateFace(quadface, 0, faceInfo.variantXrot)
|
quadface = rotateFace(quadface, 0, faceInfo.variantXrot)
|
||||||
if faceInfo.variantYrot:
|
|
||||||
quadface = rotateFace(quadface, 1, faceInfo.variantYrot)
|
|
||||||
if cullface != -1:
|
if cullface != -1:
|
||||||
|
if faceInfo.variantYrot:
|
||||||
|
cullface = rotateFace(cullface, 1, faceInfo.variantYrot)
|
||||||
if faceInfo.variantZrot:
|
if faceInfo.variantZrot:
|
||||||
cullface = rotateFace(cullface, 2, faceInfo.variantZrot)
|
cullface = rotateFace(cullface, 2, faceInfo.variantZrot)
|
||||||
if faceInfo.variantXrot:
|
if faceInfo.variantXrot:
|
||||||
cullface = rotateFace(cullface, 0, faceInfo.variantXrot)
|
cullface = rotateFace(cullface, 0, faceInfo.variantXrot)
|
||||||
if faceInfo.variantYrot:
|
|
||||||
cullface = rotateFace(cullface, 1, faceInfo.variantYrot)
|
|
||||||
|
|
||||||
applyRotations(faceInfo.ox, faceInfo.oy, faceInfo.oz, faceInfo.elementMatrix, faceInfo.variantMatrix, xyzuvstc)
|
applyRotations(faceInfo.ox, faceInfo.oy, faceInfo.oz, faceInfo.elementMatrix, faceInfo.variantMatrix, xyzuvstc)
|
||||||
|
|
||||||
@ -525,9 +525,9 @@ faceRotations = (
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
FaceXIncreasing,
|
FaceXIncreasing,
|
||||||
FaceZDecreasing,
|
|
||||||
FaceXDecreasing,
|
|
||||||
FaceZIncreasing,
|
FaceZIncreasing,
|
||||||
|
FaceXDecreasing,
|
||||||
|
FaceZDecreasing,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
FaceXIncreasing,
|
FaceXIncreasing,
|
||||||
@ -539,12 +539,12 @@ faceRotations = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
facesByCardinal = dict(
|
facesByCardinal = dict(
|
||||||
north=FaceNorth,
|
|
||||||
south=FaceSouth,
|
|
||||||
east=FaceEast,
|
east=FaceEast,
|
||||||
west=FaceWest,
|
west=FaceWest,
|
||||||
up=FaceUp,
|
up=FaceUp,
|
||||||
down=FaceDown,
|
down=FaceDown,
|
||||||
|
south=FaceSouth,
|
||||||
|
north=FaceNorth,
|
||||||
)
|
)
|
||||||
|
|
||||||
cdef short[6] faceShades
|
cdef short[6] faceShades
|
||||||
|
Reference in New Issue
Block a user