Increase terrain load radius during taxi for aggressive caching

During taxi flights, increased terrain load radius from 2 to 4 tiles
(5x5 to 9x9 grid) to pre-cache more tiles ahead of flight path. Returns
to normal 5x5 after landing. 2GB cache stores loaded tiles for fast
retrieval. WMO/M2 models already cached in RAM once loaded.
This commit is contained in:
Kelsi 2026-02-08 20:51:17 -08:00
parent 1f0e948d34
commit cbbf819c0d

View file

@ -421,12 +421,15 @@ void Application::update(float deltaTime) {
if (renderer && renderer->getTerrainManager()) {
renderer->getTerrainManager()->setStreamingEnabled(true);
// With 2GB tile cache, keep streaming active during taxi at moderate rate.
// Increase load radius to pre-cache tiles ahead of flight path.
if (onTaxi) {
renderer->getTerrainManager()->setUpdateInterval(0.3f);
renderer->getTerrainManager()->setLoadRadius(4); // 9x9 grid for taxi
} else {
// Ramp streaming back in after taxi to avoid end-of-flight hitches.
if (lastTaxiFlight_) {
taxiStreamCooldown_ = 2.5f;
renderer->getTerrainManager()->setLoadRadius(2); // Back to 5x5
}
if (taxiStreamCooldown_ > 0.0f) {
taxiStreamCooldown_ -= deltaTime;