Wire attack and combo execution (mobile step 3b)
Port the ActorInstanceBattle combo state machine, CRaceMotionData attack data, player motion/combo tables, NEW_Attack + OnAttack/OnHit packets and remote FUNC_ATTACK/FUNC_COMBO playback so keyboard and touch attacks swing and hit on the real-server path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5597842d90
commit
260d421bde
@@ -1178,3 +1178,47 @@ key state is still not consumed on the real-server path (`player_ComboAttack`
|
||||
stub), so touch attack does not swing yet; the prototype's attack/quickslot
|
||||
`.sub` art is missing from the packs (attack drawn as a coloured block, skill
|
||||
slots invisible).
|
||||
|
||||
### 2026-10-12 Mobile step 3b — attack and combo wiring
|
||||
|
||||
The attack key (keyboard or touch) now swings on the real-server path, ported
|
||||
from GameLib ActorInstanceBattle / ActorInstanceCollisionDetection,
|
||||
CPythonPlayerInput `NEW_Attack`, CPythonPlayerEventHandler `OnAttack` /
|
||||
`OnHit` and CInstanceBase `RefreshState` / `RunNormalAttack` / `RunComboAttack`.
|
||||
|
||||
- `RaceData`: `RaceMotionData` (`ParseRaceMotionData`, cached
|
||||
`GetRaceMotionData`) reads ComboInputData and AttackingData in both the old
|
||||
single-hit layout (`AttackingType`) and the `MotionType` + `HitDataCount`
|
||||
layout; `.msm` DEFENDING radius. `LoadPlayerRaces` registers every player
|
||||
motion and combo table (`LoadPlayerMotions`, a port of
|
||||
PythonPlayerSettingsModule intro/general/weapon/combo/horse/fishing).
|
||||
- `chr.MOTION_MODE_BOW_SPECIAL` is 17 and there is no `MOTION_MODE_CLAW`
|
||||
(AVA2 builds without `ENABLE_WOLFMAN_CHARACTER`, Locale_inc.h:131).
|
||||
- `ActorInstance`: combo state machine (`InputComboAttackCommand`, pre-input
|
||||
and direct input windows, `ComboProcess`, `__RunNextCombo`, mounted wrap),
|
||||
normal attack, attack speed (`m_dwAtkSpd / 100`) applied to attack motions,
|
||||
per-hit-data victim maps with invisible time and the 16 / HitLimitCount
|
||||
limits, `TestAttackHit` (hit-position segments against the victim).
|
||||
- `ProcessPlayerAttack` (called from the main loop): `NEW_Attack` checks
|
||||
(bow needs a target and an arrow), stop packet when the attack interrupts a
|
||||
walk, `CG_MOVE` FUNC_COMBO per started motion, hit test against live
|
||||
monsters/stones, `SetTarget` + `CG_ATTACK` on a hit. Walking and click-move
|
||||
are suspended while attacking. `player.ComboAttack` uses the same path.
|
||||
- Remote actors: `RefreshState` picks the motion mode from weapon / mount /
|
||||
polymorph / wedding dress / pickaxe / rod; `CG_MOVE` FUNC_ATTACK / FUNC_COMBO
|
||||
from the server play the attack motion facing the packet rotation.
|
||||
|
||||
Verified: `ava2.attack_combo` (both .msa layouts, warrior combo tables, real
|
||||
combo timings: pre-input fires at DirectInputTime, direct input chains, input
|
||||
after InputLimitTime is dropped, attack speed, remote motions not reported,
|
||||
hit detection at yaw 0 / 90 incl. once-per-combo, range and far side);
|
||||
`ava2.touch_game`; 52/52 desktop tests.
|
||||
Outstanding gaps: not verified against the real server; attack speed is a
|
||||
motion-clock ratio (no blend / speed-ratio curves); accumulation root motion is
|
||||
not applied during attacks; victims are an upright cylinder of the race
|
||||
DEFENDING radius (50 default) instead of the bone spheres; bow attacks have no
|
||||
arrow flight / clickable-distance reserve; horse attack details, emotions and
|
||||
skills are not wired; PvP `IsAttackableInstance` rules and the `__CanAttack`
|
||||
checks (emotion, private shop, observer, new mount) are missing; remote
|
||||
FUNC_ATTACK / FUNC_COMBO snap to the packet position instead of walking there
|
||||
when 50+ away.
|
||||
|
||||
Reference in New Issue
Block a user