summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorreduz <juan@okamstudio.com>2016-12-24 16:23:30 -0300
committerreduz <juan@okamstudio.com>2016-12-24 16:23:30 -0300
commit0d4abf2aa3a336a8a04c83f0576c6b42783ba6e9 (patch)
treeddbbc1aa82a80ccfe7e35a34f34a06cfa1dbb22e /scene/resources
parent3adb42e217d29033e0637ae334790aa1d742d194 (diff)
fixed a horrible bug on Windows AMD, scenes saved until now in this branch
are no longer valid :(
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/mesh.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index ec33bb53d9..c454301e02 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -775,8 +775,10 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
DVector<int> indices = a[ARRAY_INDEX];
DVector<int>::Read ir = indices.read();
- for(int i=0;i<ic;i++)
- facesw[widx++]=vr[ ir[i] ];
+ for(int i=0;i<ic;i++) {
+ int index = ir[i];
+ facesw[widx++]=vr[ index ];
+ }
} else {