From 9651fc998683bb2277b3f739f6797abc83fbcb2c Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 18:19:56 +0000 Subject: Missed a few scoping issues, apparently --- Magic2/ModelFileMAG.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Magic2/ModelFileMAG.cpp') diff --git a/Magic2/ModelFileMAG.cpp b/Magic2/ModelFileMAG.cpp index ff9ed7e..4157434 100644 --- a/Magic2/ModelFileMAG.cpp +++ b/Magic2/ModelFileMAG.cpp @@ -551,13 +551,13 @@ ModelFileMAG::LoadMag5(FILE* fp, Model* m, double scale) } fread(texture_index_buffer, sizeof(float), poly_nverts, fp); // tu's - for (vi = 0; vi < poly_nverts; vi++) { + for (int vi = 0; vi < poly_nverts; vi++) { int v = poly.verts[vi]; vset->tu[v] = texture_index_buffer[vi]; } fread(texture_index_buffer, sizeof(float), poly_nverts, fp); // tv's - for (vi = 0; vi < poly_nverts; vi++) { + for (int vi = 0; vi < poly_nverts; vi++) { int v = poly.verts[vi]; vset->tv[v] = texture_index_buffer[vi]; } @@ -567,7 +567,7 @@ ModelFileMAG::LoadMag5(FILE* fp, Model* m, double scale) } // pass 2 (adjust vertex normals for flat polys): - for (n = 0; n < npolys; n++) { + for (int n = 0; n < npolys; n++) { Poly& poly = polys[n]; poly.plane = Plane(vset->loc[poly.verts[0]], @@ -591,7 +591,7 @@ ModelFileMAG::LoadMag5(FILE* fp, Model* m, double scale) // then assign them to cohesive segments: Segment* segment = 0; - for (n = 0; n < npolys; n++) { + for (int n = 0; n < npolys; n++) { if (segment && segment->material == polys[n].material) { segment->npolys++; } -- cgit v1.1