Animate distant LOD actors at the original reduced animation FPS

Port CGrannyLODController::UpdateLODLevel and
CGrannyModelInstance::Update(dwAniFPS): actors whose model has a
_lod_01.gr2 sibling and stand more than 500 units from the camera
target get 30-120 animation FPS by camera distance (LODDISTANCE_ACTOR
5000, LODDISTANCE_BUILDING 25000 for models of 500+ units), and their
pose time only advances every 120/fps frames, so the SDK's cached pose
is reused in between. Restarted or switched motions re-sample at once.
The _lod_ meshes themselves are still not swapped in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-12 17:36:41 +09:00
co-authored by Claude Opus 5.5
parent 696f4f62e6
commit b2c7c6ce7d
6 changed files with 97 additions and 2 deletions
+1
View File
@@ -2112,6 +2112,7 @@ const auto profileActiveStart = std::chrono::steady_clock::now();
auto char_draws = preview_data ? player_actor.BuildDrawCommands() : std::vector<ava2::Render3DDraw>{};
auto dog_draws = preview_data ? mob_dog.BuildDrawCommands() : std::vector<ava2::Render3DDraw>{};
auto metin_draws = preview_data ? mob_metin.BuildDrawCommands() : std::vector<ava2::Render3DDraw>{};
ava2::NetworkActorManager::Instance().UpdateLODLevel(eyeX, eyeY, eyeZ, player_world_x, player_world_z);
auto net_draws = ava2::NetworkActorManager::Instance().BuildDrawCommands(static_cast<float>(frames) * 0.033f, renderer3d->GetViewMatrix(), renderer3d->GetProjMatrix());
if (until_game && rendered_game_frames == 20) {
for (const auto& entry : ava2::NetworkActorManager::Instance().GetActorDict()) {