Move particles between ticks
CI / build (push) Successful in 53s

The particle library moves particles by their velocity times a tick's time at
each tick; between ticks, the adapter (ModelInstance::render's call to
ParticleSystem::render, redirected after checking it) draws them moved on by
their velocity times the time since, then moves each back by its own velocity:
ParticleSystem::render sorts them by distance, reordering them in memory, so
restoring saved positions in order scrambled them. Like ParticleSystem::render,
it only reads particles when there's a group (the library throws without one,
which crashed the client).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-28 22:21:58 -07:00
1 parent 869eb19a1f
commit 9d0faecf4d
3 files changed
+103 -3

No files matched your search

+2
View File
@@ -9,6 +9,8 @@
// - ModelInstance::render's call to updateCalSkeleton, which poses the model before it's drawn: between ticks, the
// model is posed at the time between them (its animations' times moved on by the fraction of a frame since the
// tick; Cal3D poses between keyframes), then its animations are put back as they were.
// - ModelInstance::render's call to ParticleSystem::render: between ticks, particles drawn moved on by their velocity
// times the time since the tick (as the particle library moves them at each tick), then put back.
// - CameraController::getCameraTransform (its exported vtable): between ticks, the camera where its easing toward its
// target has brought it since the tick.