From 7d6c2ff6f206b763f046e4fe1666c8a835e8f6a2 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 9 Mar 2024 21:48:20 +0100 Subject: [PATCH] Limit theme scan to the number of generated rooms This greatly speeds up level generation as there is no need to search for the fitness of 127 (or 256 as in the original) rooms if only 23 where created. --- Source/levels/themes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/levels/themes.cpp b/Source/levels/themes.cpp index 699ed2ea6..ef886f4c7 100644 --- a/Source/levels/themes.cpp +++ b/Source/levels/themes.cpp @@ -854,7 +854,7 @@ void InitThemes() themes[numthemes].ttype = j; numthemes++; } - if (i == std::numeric_limits::max()) + if (i > TransVal) break; } return;