diff Outdoor.cpp @ 80:48f69ae3bc8d

previous fix, forgot
author zipi
date Sat, 02 Feb 2013 16:56:01 +0000
parents 6ad816231528
children 1faa29fd4c2d
line wrap: on
line diff
--- a/Outdoor.cpp	Sat Feb 02 16:52:36 2013 +0000
+++ b/Outdoor.cpp	Sat Feb 02 16:56:01 2013 +0000
@@ -1772,7 +1772,7 @@
   for (uint i = 0; i < uNumBModels; ++i)
   {
     //v48 = 0;
-    BSPModel *model = (BSPModel *)pBModels+i;
+    auto model = &pBModels[i];
 
     model->pVertices.pVertices = nullptr;
     model->pFaces = nullptr;
@@ -1856,7 +1856,7 @@
     //v149 = 0;
     //Str2 = (char *)ptr;
 
-      ODMFace *face = (ODMFace *)model->pFaces+j;
+      auto *face = &model->pFaces[j];
       //pFilename = (char *)v149 + (unsigned int)v60[v48].pFaces;
       if (~face->uAttributes & 0x40)
       {
@@ -2042,7 +2042,7 @@
   //v77 = actualNumFacesInLevel = 0;
   uint actualNumFacesInLevel = 0;
   for (uint i = 0; i < uNumBModels; ++i)
-    actualNumFacesInLevel += ((BSPModel *)pBModels+i)->uNumFaces;
+    actualNumFacesInLevel += pBModels[i].uNumFaces;
 
   //v79 = ddm.uNumFacesInBModels;
   if (ddm.uNumFacesInBModels)