Stabilize taxi/state sync and creature spawn handling

This commit is contained in:
Kelsi 2026-02-11 21:14:35 -08:00
parent 38cef8d9c6
commit 40b50454ce
18 changed files with 818 additions and 127 deletions

View file

@ -172,6 +172,15 @@ private:
std::optional<float> cachedCamWmoFloor;
bool hasCachedCamFloor = false;
// Terrain-aware camera pivot lift cache (throttled for performance).
glm::vec3 lastPivotLiftQueryPos_ = glm::vec3(0.0f);
float lastPivotLiftDistance_ = 0.0f;
int pivotLiftQueryCounter_ = 0;
float cachedPivotLift_ = 0.0f;
static constexpr int PIVOT_LIFT_QUERY_INTERVAL = 3;
static constexpr float PIVOT_LIFT_POS_THRESHOLD = 0.5f;
static constexpr float PIVOT_LIFT_DIST_THRESHOLD = 0.5f;
// Cached floor height queries (update every 5 frames or 2 unit movement)
glm::vec3 lastFloorQueryPos = glm::vec3(0.0f);
std::optional<float> cachedFloorHeight;