Просмотр исходного кода

fix issue #216

The previous line had its <= and >= switched, so any .GetMaterial call on an object with multiple materials returned nil.
Simon Chervenak 5 лет назад
Родитель
Сommit
d2c2888f82
1 измененных файлов с 1 добавлено и 1 удалено
  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
 		}
 	}