diff IndoorCameraD3D.cpp @ 2320:847aba0b7f82

draw terrain distance
author Ritor1
date Fri, 21 Mar 2014 01:12:52 +0600
parents d8b4a36f54a4
children ddb803517a48
line wrap: on
line diff
--- a/IndoorCameraD3D.cpp	Thu Mar 20 18:44:27 2014 +0600
+++ b/IndoorCameraD3D.cpp	Fri Mar 21 01:12:52 2014 +0600
@@ -1394,29 +1394,17 @@
 //----- (00436A40) --------------------------------------------------------
 double IndoorCameraD3D::GetPolygonMaxZ(RenderVertexSoft *pVertex, unsigned int uStripType)
 {
-  unsigned int v3; // edx@1
   double result; // st7@1
-  float *v5; // ecx@2
 
-  v3 = uStripType;
   result = 1.1754944e-38;
-  if ( (signed int)uStripType > 0 )
+  for ( uint i = 0; i < uStripType; i++ )
   {
-    v5 = &pVertex->vWorldPosition.z;
-    do
-    {
-      if ( *v5 > result )
-        result = *v5;
-      v5 += 12;
-      --v3;
-    }
-    while ( v3 );
+    if ( pVertex[i].vWorldPosition.z > result )
+      result = pVertex[i].vWorldPosition.z;
   }
   return result;
 }
 
-
-
 // -- new
 // merged from IndoorCamera::Initialize2
 //         and ODMRenderParams::RotationToInts