Explorar o código

fix issue #216

The previous line had its <= and >= switched, so any .GetMaterial call on an object with multiple materials returned nil.
Simon Chervenak %!s(int64=5) %!d(string=hai) anos
pai
achega
d2c2888f82
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      graphic/graphic.go

+ 1 - 1
graphic/graphic.go

@@ -207,7 +207,7 @@ func (gr *Graphic) GetMaterial(vpos int) material.IMaterial {
 		if gmat.count == 0 {
 			return gmat.imat
 		}
-		if gmat.start >= vpos && gmat.start+gmat.count <= vpos {
+		if gmat.start <= vpos && gmat.start+gmat.count >= vpos {
 			return gmat.imat
 		}
 	}