acdream/tests/AcDream.Content.Tests
Erik 0c552eecac fix(world): honour SetOmega — the birds and butterflies fly again
Ambient flyers played their wing animation and stayed put.

A Static object whose Setup declares a DefaultAnimation joins retail's
CPhysics::static_animating_objects workset (CPhysicsObj::InitDefaults
@0x00513A7B) and is driven by animate_static_object @0x00513DF0. That function
has exactly one motion step:

    CPartArray::Update(part_array, dt, nullptr);            // animate
    Frame::grotate(&this->m_position.frame, &this->m_omegaVector);

Note the nullptr: unlike UpdatePositionInternal @0x00512C30, which combines the
animation's accumulated frame into the object's position, the static branch
DISCARDS it. These objects cannot move by animation translation at all. The
omega vector is the whole mechanism, and one thing writes it —
SetOmegaHook::Execute @0x00526F30 -> CPhysicsObj::set_omega @0x0050F6D0.

We decoded that hook and then dropped it on the floor: IAnimationHookSink's own
docs list SetOmegaHook among the unwired ones, and PhysicsBody.Omega was
assigned nowhere outside projectiles. The scheduler's GRotate call was already
correct — it was multiplying by a permanent zero.

The hook is now applied to the owning body at process_hooks time. Retail runs
process_hooks AFTER the grotate in the same pass, so a newly-set omega first
takes effect on the following frame; our Tick/ProcessHooks split already had
that order.

Scoped from the data rather than guessed. tools/AnimHookScan (new) walks the
dat: of 2,066 animations exactly 8 contain SetOmega, and all 8 are the
DefaultAnimation of one of the 8 setups that use it. No creature animation uses
it, so this belongs precisely where body.Omega is read and nowhere else.

The same scan is why the fix is believable as FLIGHT rather than a pirouette.
Every authored omega is pure yaw, and the setups' parts sit 5.6m, 4.2m, 12m and
36.8m from the origin they spin about. Rotating a frame whose mesh hangs 12m
off-axis carries it around a 12m circle — that offset IS the flight radius. An
installed-DAT test pins both properties, because the fix is only correct while
they hold and neither is visible from the code.

Also checked and deliberately NOT conflated: CSequence::set_omega @0x005248A0
writes CSequence::omega, a different field from CPhysicsObj::m_omegaVector,
fed by the motion table for creature turning. Only the latter drives grotate.

Solution builds clean; 14,473 tests pass on the standard hermetic lane filter
plus the new installed-DAT test, 0 failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 05:42:59 +02:00
..
CharGen test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Spells test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Vfx test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
AcDream.Content.Tests.csproj build: make release restore reproducible 2026-08-18 10:29:00 +02:00
BoundedDatObjectCacheTests.cs perf(diag): per-frame history export + checkpoint LOH/cache counters + soak capped mode (2026-07-24 audit review) 2026-07-24 12:00:30 +02:00
ContentConformanceDats.cs test(pipeline): MP1b - live-vs-pak equivalence suite (dat-gated) 2026-07-05 21:33:32 +02:00
Crc32Tests.cs fix(pipeline): MP1b review - pak format/reader hardening 2026-07-05 22:08:59 +02:00
DatResolutionPrecedenceTests.cs perf(content): remove exception-driven setup probes 2026-07-24 15:12:21 +02:00
DecodedTextureCacheTests.cs perf(diag): per-frame history export + checkpoint LOH/cache counters + soak capped mode (2026-07-24 audit review) 2026-07-24 12:00:30 +02:00
FlatCollisionAssetSerializerTests.cs feat(content): bake and read flat collision assets 2026-07-25 15:22:08 +02:00
InstalledMagicCatalogFociTests.cs fix(magic): the foci map never loaded — casts demanded full components a focus should waive 2026-08-20 21:28:22 +02:00
InstalledPreparedCollisionCatalogTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
InstalledSetupBspPrimitiveDispatchTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
InstalledSetupCollisionReachabilityTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
InstalledStaticAnimatingOmegaTests.cs fix(world): honour SetOmega — the birds and butterflies fly again 2026-08-21 05:42:59 +02:00
Issue334NeftetFormationCellMembershipTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
LandblockPhysicsContentBuilderStaticSphereTests.cs fix(physics): S2 — static publication emits authored Spheres as Spheres (AP-155 narrowed) 2026-08-07 08:07:02 +02:00
ObjectMeshDataEquality.cs perf(render): consume prepared mesh package at runtime 2026-07-24 15:07:25 +02:00
ObjectMeshDataSerializerTests.cs perf(render): consume prepared mesh package at runtime 2026-07-24 15:07:25 +02:00
packages.neutral.lock.json build: make release restore reproducible 2026-08-18 10:29:00 +02:00
PakAliasTests.cs feat(content): add physical blob aliases to pak writer 2026-07-24 13:33:53 +02:00
PakEquivalenceTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
PakFormatTests.cs feat(pipeline): MP1b - pak key + header/TOC primitives 2026-07-05 21:14:10 +02:00
PakKeyTests.cs feat(content): bake and read flat collision assets 2026-07-25 15:22:08 +02:00
PakRoundTripTests.cs feat(bake): publish validated pak artifacts atomically 2026-07-24 13:40:58 +02:00
PreparedAssetSourceTests.cs perf(content): add typed prepared asset source 2026-07-24 14:52:12 +02:00
SharedPreparedCollisionCacheTests.cs feat(headless): share immutable gameplay content 2026-07-27 09:00:48 +02:00
SolidColorTextureCacheTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
StaticSpherePopulationMeasurementTests.cs test: replace campaign labels with behavior names 2026-08-18 12:25:00 +02:00