fix(parity): implement ground click ripple, target select glow, and 3D projectile obstacle collision with regression probes

This commit is contained in:
shen
2026-09-19 17:01:50 -07:00
parent 66d217b313
commit 5d43682498
6 changed files with 357 additions and 6 deletions
+23
View File
@@ -131,6 +131,7 @@ var _fading := {} # vid:int -> true while a culled node twee
var _always_show_name := NameShow.ALWAYS_SHOW_NAME_DEFAULT
var _alt_held := false
var _target_vid := 0
var _target_effect: Node3D = null
var _hover_vid := 0 # player_controller._update_hover_cursor 射线拾到的角色 vid0 = 无)
# §8.8 / §5.4 伤害飘字(damage_effect.gd)。CPythonSystem::IsShowDamage 门(uigameoption
# 「伤害数字」radio+ CInstanceBase::m_DamageQueue(每帧 pop 一条)+ ProcessDamage 分类。
@@ -280,12 +281,30 @@ func set_always_show_name(on: bool) -> void:
func set_show_damage(on: bool) -> void:
_show_damage = on
func _detach_target_effect() -> void:
if is_instance_valid(_target_effect):
_target_effect.queue_free()
_target_effect = null
func _attach_target_effect(node: Node3D) -> void:
_detach_target_effect()
if not is_instance_valid(node) or fx == null or not fx.has_method("spawn"):
return
# 40250 EFFECT_TARGET (click_glow_select.mse): 挂在目标脚下的循环旋转发光光圈
_target_effect = fx.spawn("d:/ymir work/effect/etc/click/click_glow_select.mse", node, false)
if _target_effect:
_target_effect.position = Vector3.ZERO
# targetBoard.GetTargetVID():目标始终强显名字(game.py OnRender ShowCharacterTextTail(targetVID))。
# 40250 __AttachTargetEffect / __DetachTargetEffect (EFFECT_TARGET: click_glow_select.mse)
func set_target_vid(vid: int) -> void:
if _target_vid == vid:
return
var prev := _target_vid
_target_vid = vid
_detach_target_effect()
if vid != 0 and _by_vid.has(vid):
_attach_target_effect(_by_vid[vid])
for v in [prev, vid]:
if v != 0 and _by_vid.has(v):
_set_name_visibility(_by_vid[v])
@@ -445,6 +464,8 @@ func _on_spawn(d: Dictionary, allow_defer: bool = false) -> void:
shape = "TALK"
node.set_meta("cursor_shape", shape)
_by_vid[vid] = node
if vid == _target_vid:
_attach_target_effect(node)
_sync_hp_bar(vid, d)
_set_name_visibility(node)
_refresh_shop_sign(node, str(d.get("shop_sign", "")))
@@ -603,6 +624,8 @@ func _detach_text_tail(n: Node3D) -> void:
# §2.1 cull / 40250 DeleteBlendOut: keep the data row, blend the node out. It stays discoverable via
# _fading (so it is not rebuilt mid-blend) until the tween frees it.
func _fade_and_free(vid: int) -> void:
if vid == _target_vid:
_detach_target_effect()
var n: Node3D = _by_vid.get(vid, null)
_by_vid.erase(vid)
if not is_instance_valid(n):