Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

perf(gameclient): load the aura ring textures with the map

Olcay Seygan53c57a09ce95
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
index 69fd31f21..dd0372a9c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
@@ -1697,6 +1697,19 @@ void GameClient::preloadAssets( TimeOfDay timeOfDay )
getPreloadMemoryStatus(before);
for (i=0; *textureNames[i]; ++i)
TheDisplay->preloadTextureAssets(textureNames[i]);
+
+ // A ring's texture is otherwise read the frame the first ring of its kind lights, as much as
+ // 125 ms off a cold disk in the middle of a battle. They are small and every match wants them.
+ for (Int kind = 0; kind < RANK_AURA_COUNT; ++kind)
+ {
+ const RadiusDecalTemplate &ring = TheGlobalData->m_rankAuraRing[kind];
+ if (!ring.valid())
+ continue;
+
+ AsciiString textureFile = ring.getTexture();
+ textureFile.concat(".tga");
+ TheDisplay->preloadTextureAssets(textureFile);
+ }
getPreloadMemoryStatus(after);
DEBUG_LOG(("Preloading memory dwAvailPageFile %d --> %d : %d\n",