mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
1f0e948d34
commit
cbbf819c0d
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue