From 69f0a99f9a70ea6aaaac047a90a443a355d42389 Mon Sep 17 00:00:00 2001 From: notpete Date: Mon, 7 Jun 2004 20:12:22 +0000 Subject: [PATCH] Fixed some assumptions PATCH_SIZE is 16. This was SVN commit r420. --- source/terrain/terrainMain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/terrain/terrainMain.cpp b/source/terrain/terrainMain.cpp index b557b98db7..f18b283e2f 100755 --- a/source/terrain/terrainMain.cpp +++ b/source/terrain/terrainMain.cpp @@ -176,7 +176,7 @@ void InitScene () while (p16p < p16+(w*h)) *p16p++ = (*p++) << 8; - g_Terrain.Resize(20); + g_Terrain.Resize(w/PATCH_SIZE); g_Terrain.SetHeightMap(p16); delete[] p16; @@ -201,9 +201,9 @@ void InitScene () CPatch* patch=g_Terrain.GetPatch(pi,pj); - for (int j=0;j<16;j++) { - for (int i=0;i<16;i++) { - patch->m_MiniPatches[j][i].Tex1=texture ? texture->m_Handle :0; + for (int j=0;jm_MiniPatches[j][i].Tex1=texture ? texture->GetHandle() :0; } } }