Port .msa motion events, .mss sounds and skill motions

ParseRaceMotionData now reads LoopData, MotionEventData and the per-motion
.mss sound script. ActorInstance runs the events each 1/60 s frame:
effects, sounds, splash attacks, fly shots, show/hide and warp. Player
skill and guild-skill motions are registered. ClickSkillSlot and remote
FUNC_SKILL states play the skill motions, and fly targets are synced with
the server (audit P1 #4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-13 14:11:00 +09:00
co-authored by Claude Opus 5.5
parent 31c74cec28
commit f6dfcfc337
18 changed files with 1001 additions and 51 deletions
+1
View File
@@ -1731,6 +1731,7 @@ P0, the real-server flow stops:
P1, visible gameplay:
4. `ParseRaceMotionData` ignores `motioneventdata` in .msa files (effect, effect-to-target, fly, screen waving/flashing, special attack, character show/hide). Per-motion .mss sound scripts are not loaded either. On the real server, skills and attacks show no effects and play no swing, footstep, hit or death sounds.
- **Fixed:** `ParseRaceMotionData` reads LoopData and MotionEventData (effect / effect-to-target registered with EffectManager, fly with FlyingManager, special attacking with its collision spheres, sound, show/hide, warp; AttackType defaults to SPLASH = 0) and the `sound/<path>.mss` script. `ActorInstanceMotionEvent.cpp` runs the events per 1/60 s frame (loop motions finish their frames before wrapping): effects attach to bones or follow them, .mss sounds go through `PlayCharacterSound3D` (5000 range and 0.3 s repeat check for non-PCs), motion loops follow `CurrentMotionLoopProcess`, splash hits feed `ProcessPlayerAttack` → SendAttackPacket(skill), fly shots → FlyingManager + SendShootPacket, warp → FUNC_WAIT state. Player skill and guild-skill motions are registered (`__LoadSkill` / `__LoadNinethSkill` / `__LoadGuildSkill`); `ClickSkillSlot` plays NAME_SKILL + grade motion with the formula loop count, sets the fly target and sends the FUNC_SKILL state; remote FUNC_SKILL states play the skill motion; GC FLY_TARGETING (71) / ADD_FLY_TARGETING (69) set the shooter fly target by VID or position, CG fly-targeting sends global coordinates. Limitations: screen waving is a no-op, the fishing effect-to-target is skipped, flying instances aim at the target position at launch, fan/circle multi-target AddFlyTarget and moving skills are not ported, the fly-target centre approximates the bounding sphere, splash spheres are tested as cylinders. Covered in `attack_combo_test` (TestMotionEvents).
5. `RecvDamageInfoPacket` and fly-target hits always spawn `warrior/effect/gihyeol_spark.mse` and play `sound/ui/punch.wav`. These are invented. Windows uses the race-registered hit effects (chrmgr EFFECT_HIT…) and the damage-number effects.
6. Terrain (MapOutdoorLoad/RenderHTP, TextureSet):
- textureset UScale/VScale/UOffset/VOffset/Begin/End are ignored (fixed world/500 UVs);