mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Fix taxi mount orientation and eliminate tile loading hitches
Fixes two critical taxi flight issues: 1. Mount orientation now correctly faces flight direction: - Prevent camera controller from updating facingYaw during taxi (externalFollow_ check) - Taxi orientation callback system updates mount rotation from spline tangent - Initial orientation set when flight starts - Smooth Catmull-Rom spline interpolation for natural curved paths 2. Eliminate frame hitches from tile loading during flight: - New taxiFlightStartCallback uploads ALL precached tiles to GPU before flight begins - Previously tiles loaded async during 3s mount delay but uploaded 1/frame during flight - Now processAllReadyTiles() blocks briefly after mount delay to batch upload everything - Combined with 2.0s terrain update interval and aggressive culling for smooth flight Additional optimizations: - Aggressive taxi culling: skip models <15 units, all foliage/trees, underwater objects - Max render distance reduced to 150 units during taxi - Movement heartbeat packets disabled during taxi (server controls position) - Reduced taxi speed from 32 to 18 units/sec to prevent streaming overload
This commit is contained in:
parent
536b3cea48
commit
2e0a7e0039
7 changed files with 119 additions and 21 deletions
|
|
@ -1644,7 +1644,8 @@ void M2Renderer::render(const Camera& camera, const glm::mat4& view, const glm::
|
|||
lastDrawCallCount = 0;
|
||||
|
||||
// Adaptive render distance: keep longer tree/foliage visibility to reduce pop-in.
|
||||
const float maxRenderDistance = (instances.size() > 600) ? 320.0f : 2800.0f;
|
||||
// During taxi, use very short render distance to prevent loading hitches
|
||||
const float maxRenderDistance = onTaxi_ ? 150.0f : (instances.size() > 600) ? 320.0f : 2800.0f;
|
||||
const float maxRenderDistanceSq = maxRenderDistance * maxRenderDistance;
|
||||
const float fadeStartFraction = 0.75f;
|
||||
const glm::vec3 camPos = camera.getPosition();
|
||||
|
|
@ -1713,10 +1714,20 @@ void M2Renderer::render(const Camera& camera, const glm::mat4& view, const glm::
|
|||
|
||||
const M2ModelGPU& model = *currentModel;
|
||||
|
||||
// Skip small models when on taxi (performance optimization)
|
||||
// Small props/foliage aren't visible from flight altitude anyway
|
||||
if (onTaxi_ && model.boundRadius < 3.0f) {
|
||||
continue;
|
||||
// Aggressive culling during taxi for smooth flight
|
||||
if (onTaxi_) {
|
||||
// Skip all small/medium models (props, foliage, decorations)
|
||||
if (model.boundRadius < 15.0f) {
|
||||
continue;
|
||||
}
|
||||
// Skip all foliage and trees (even large ones cause hitching during load)
|
||||
if (model.collisionNoBlock || model.collisionTreeTrunk) {
|
||||
continue;
|
||||
}
|
||||
// Skip underwater objects (water is opaque from altitude)
|
||||
if (instance.position.z < -5.0f) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Distance-based fade alpha for smooth pop-in (squared-distance, no sqrt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue