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
+6
-2
@@ -2054,14 +2054,18 @@ const auto profileActiveStart = std::chrono::steady_clock::now();
|
||||
static bool wasMoving = false;
|
||||
static uint32_t lastMoveSent = 0;
|
||||
float moveYaw = 0.0f;
|
||||
const bool keyboardMoving = actor.CanAct() && ava2::GetPlayerMovementYaw(orbit_camera.GetYaw(), moveYaw);
|
||||
// Attack input first (NEW_Attack ends walking); no movement while an attack plays.
|
||||
if (ava2::ProcessPlayerAttack(orbit_camera.GetYaw(), dt, wasMoving)) wasMoving = false;
|
||||
const bool attacking = ava2::IsPlayerAttacking();
|
||||
if (attacking) actor.ClearMoveTarget();
|
||||
const bool keyboardMoving = actor.CanAct() && !attacking && ava2::GetPlayerMovementYaw(orbit_camera.GetYaw(), moveYaw);
|
||||
actor.SetSpeed(340.0f * float(main->m_dwMovSpd) / 100.0f);
|
||||
if (keyboardMoving) {
|
||||
actor.ClearMoveTarget();
|
||||
actor.MoveInDirection(moveYaw, dt, active_terrain, active_map_objects);
|
||||
} else {
|
||||
if (wasKeyboardMoving) actor.StopMoving();
|
||||
if (actor.CanAct() && ava2::IsPlayerMouseMoving() && renderer3d && active_terrain) {
|
||||
if (actor.CanAct() && !attacking && ava2::IsPlayerMouseMoving() && renderer3d && active_terrain) {
|
||||
long mouseX=0, mouseY=0;
|
||||
UI::CWindowManager::Instance().GetMousePosition(mouseX,mouseY);
|
||||
float pickX=0,pickY=0,pickZ=0;
|
||||
|
||||
Reference in New Issue
Block a user