fix(combat): 战斗逐项对齐 40250,修复移动 / 技能释放与武器挂点

- 连击类型由 combo_changed 驱动(SetComboSkillFlag,技能 122 等级)
- 命中判定改为 .msa 刀尖 Z 圆柱 vs .msm 防御球(hit_collision.gd 逐行移植)
- _register_hit 改为 map::insert 语义,修正命中上限
- 攻速同时缩放 GetAttackingElapsedTime 与攻击动作速率;按武器动作模式目录绑定攻击段
- 去掉本地连击超时,motion_bound 清命中表 / 连击段号
- __ProcessDataAttackSuccess:InsertDelay 硬直、physics_push.gd 击退 + GetBlendingPosition 同步、
  命中特效、__HitGood / __HitGreate / __HitStone 受击动作链与抖动(ui/hit_reaction.gd)
- ClassicSession::send_use_skill 不再夹带 CG_FLY_TARGETING
- mac 前进 / 后退方向与技能释放修复;武器按职业骨骼挂到手上
- 新增 hit_collision / physics_push / hit_view / net_world_push / weapon_attach 测试;
  gpu_pose_bounds / race_motion_assembly 适配 damage 随机变体
- 文档:CLIENT-GAP.md、CLIENT-GAP-FIX.md §3.5 / §3.7 与 C.5 增量 130

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ft3kXpNdLbKEfg5uDLfqVF
This commit is contained in:
shenlei
2026-09-12 13:15:28 +09:00
co-authored by Claude Opus 5
parent 96c29d2bb7
commit 1933a5ceda
30 changed files with 2353 additions and 209 deletions
+42
View File
@@ -5,6 +5,7 @@
extends SceneTree
const PlayerCtl = preload("res://player_controller.gd")
const GameCam = preload("res://game_camera.gd")
var _fail := 0
func _ck(c: bool, m: String) -> void:
@@ -142,3 +143,44 @@ func _run() -> void:
"mounted: turn clamped to 300 deg/s in one 50ms step (%.3f rad)" % pc.player.rotation.y)
_ck(pc.player.position.z < -0.05, "mounted: still translates toward Dst while turning")
pc.rotation_speed_deg = pc.ROT_SPEED_DEFAULT_DEG
# 8) 相机相对移动:W / 摇杆上 = 远离相机(沿视线),D / 摇杆右 = 屏幕右。
# GameCamera 摆在 head + (sin yaw, ·, cos yaw)*dist 并看向 head,前方取真实相机几何。
var cam: Camera3D = GameCam.new()
get_root().add_child(cam)
cam.target = pc.player
cam.yaw = deg_to_rad(30.0)
pc.camera = cam
pc.player.rotation.y = 0.0
var off: Vector3 = cam._desired_pos(true) - (pc.player.global_position + cam.head_offset)
var away := -Vector3(off.x, 0, off.z).normalized()
var screen_right := away.cross(Vector3.UP)
for c in [["mobile axis up", Vector2(0, -1), away], ["mobile axis right", Vector2(1, 0), screen_right]]:
pc.player.position = Vector3.ZERO
pc._is_going = false
pc.set_mobile_axis(c[1])
pc._process(0.1)
pc.clear_mobile_input()
var moved := Vector3(pc.player.position.x, 0, pc.player.position.z)
_ck(moved.length() > 0.05 and moved.normalized().dot(c[2]) > 0.95,
"%s moves camera-relative (want %s, moved %s)" % [c[0], c[2], moved])
for c in [[KEY_W, "W", away], [KEY_S, "S", -away], [KEY_D, "D", screen_right]]:
pc.player.position = Vector3.ZERO
pc._is_going = false
var down := InputEventKey.new()
down.keycode = c[0]
down.physical_keycode = c[0]
down.pressed = true
Input.parse_input_event(down)
Input.flush_buffered_events()
_ck(Input.is_key_pressed(c[0]), "synthetic %s press reaches Input" % c[1])
pc._process(0.1)
var up := down.duplicate()
up.pressed = false
Input.parse_input_event(up)
Input.flush_buffered_events()
var moved := Vector3(pc.player.position.x, 0, pc.player.position.z)
_ck(moved.length() > 0.05 and moved.normalized().dot(c[2]) > 0.95,
"key %s moves camera-relative (want %s, moved %s)" % [c[1], c[2], moved])
pc.camera = null
cam.free()