acdream/src
Erik 75ad74e0b3 sky(phase-3d): fix time drift — WorldTime.TickSize is always 1.0
User reported the in-game sky time in acdream consistently trails
retail's, even after Phases 3a-3c.1 aligned the DayGroup selection.
Diagnosed it as a rate mismatch between our client-side extrapolation
and the ACE server's tick advancement.

ACE advances PortalYearTicks at 1.0 ticks per real-second:
  Timers.cs:  PortalYearTicks += worldTickTimer.Elapsed.TotalSeconds

Our WorldTime was using SkyDesc.TickSize (0.8 in the live Dereth dat)
as the extrapolation rate:
  NowTicks = lastSync + elapsed * TickSize   // with TickSize=0.8

Between the server's ~20s TimeSync gap, we fell 4 ticks behind. Every
sync yanked us back, but in the window between syncs the sky interp
was rendering at a stale (earlier) dayFraction — visible as "acdream
is behind retail" when the user had retail running alongside.

Root cause: we misread r12 §1.2's definition of SkyDesc.TickSize.
Agent C's decompile (`docs/research/2026-04-23-sky-decompile-hunt-C.md`
§5 and the 2026-04-23 sky-retail-verbatim synthesis §5) showed
SkyDesc.TickSize is consulted at `FUN_005062e0:6241` as:

  _DAT_00842798 = SkyDesc.TickSize + _DAT_008379a8   // next deadline

i.e. the per-frame sky-subsystem update PERIOD. It's a throttle, not a
clock-rate multiplier. SkyDesc.LightTickSize=15 plays the same role for
lighting interpolation (re-run every 15 real-seconds).

Fix: remove the SkyDesc.TickSize → WorldTime.TickSize assignment. Keep
WorldTime.TickSize at its default 1.0, matching the server's rate.
SkyDesc.TickSize stays on the LoadedSkyDesc for a future Phase 4 port
of the actual retail throttle logic.

Build + 717 tests green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 09:25:03 +02:00
..
AcDream.App sky(phase-3d): fix time drift — WorldTime.TickSize is always 1.0 2026-04-24 09:25:03 +02:00
AcDream.Cli feat(vfx): Phase E.3 particle system + hook wiring + registry 2026-04-18 16:48:17 +02:00
AcDream.Core sky(phase-3c.1): feed AbsoluteYear (Year+ZeroYear) to retail LCG picker 2026-04-24 08:51:42 +02:00
AcDream.Core.Net feat(anim): full retail remote-entity motion port — walk/run/strafe/turn/stop 2026-04-19 21:26:23 +02:00
AcDream.Plugin.Abstractions feat(core): add IGameState, IEvents, WorldEvents with replay-on-subscribe 2026-04-10 20:29:29 +02:00
AcDream.Plugins.Smoke feat(app): wire IGameState+IEvents into Program and SmokePlugin 2026-04-10 20:31:50 +02:00