Pārlūkot izejas kodu

Fixed a minor issue with gameplay-encoder where the heightmap generator was displaying incorrect percentage completion when generating more than a single heightmap.

Steve Grenier 13 gadi atpakaļ
vecāks
revīzija
de32f63afb
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      gameplay-encoder/src/Heightmap.cpp

+ 5 - 0
gameplay-encoder/src/Heightmap.cpp

@@ -40,6 +40,11 @@ void Heightmap::generate(const std::vector<std::string>& nodeIds, const char* fi
 {
 {
     LOG(1, "Generating heightmap: %s...\n", filename);
     LOG(1, "Generating heightmap: %s...\n", filename);
 
 
+    // Initialize state variables
+    __processedHeightmapScanLines = 0;
+    __totalHeightmapScanlines = 0;
+    __failedRayCasts = 0;
+
     GPBFile* gpbFile = GPBFile::getInstance();
     GPBFile* gpbFile = GPBFile::getInstance();
 
 
     // Lookup nodes in GPB file and compute a single bounding volume that encapsulates all meshes
     // Lookup nodes in GPB file and compute a single bounding volume that encapsulates all meshes