mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
A 1.12.1 kit plays its sound (+0x34) once per play: the first effect it makes carries the play's flag word, and PlayUnitSpellVisualKit (0x0060EDF0) ORs 0x400, "no kit sound", into its own word after that, so only that effect's one-time arm pass sounds (0x00620C10 to 0x006210B9); a kit that made no effect plays it at the end of 0x0060EDF0 (0x0060F434 to 0x0060F4BC). For a lasting kit (kinds 2 to 4) whose definition has bit 0x200 (GetSoundDefFlag200 0x00458830) the sound loops on the unit (AddEffectSound 0x0061FEC0 -> PlaySoundLoop3D) until CEffect::Stop stops it with a 0.15 s fade (push 0x3E19999A before Sound::Stop2 at 0x006204B6). A definition with bit 0x20 asks every play path for the duplicate check (0x00458F40, called from InternalPlaySoundAt at 0x0045CF5B and from PlaySoundLoop3D), so it plays once however many units show it at once. AddAuraVisual now plays its state kit's sound at the actor when the aura shows, or loops it there for a 0x200 sound, following the actor, quiet while the scene or actor is paused and while the scene is hidden, and fading out with the aura. The loop test and the fade move to the scene's Sounds module (Sounds::KitLoops, Sounds::kStopFadeSec), which the casts' channel and missile sounds share.