完善客户端功能并加入40250一致性审计
This commit is contained in:
@@ -88,13 +88,19 @@ func _init() -> void:
|
||||
var player_node := Node3D.new()
|
||||
player_node.position = Vector3(4, 0, 0)
|
||||
mount.add_child(player_node)
|
||||
nw._by_vid[1] = player_node
|
||||
nw.set_local_node(player_node)
|
||||
nw.set_local_vid(1)
|
||||
|
||||
# 触发 40250 官方 _on_fly(0, 100, 1)
|
||||
nw._on_fly(FlyObject.FLY_EXP, 100, 1)
|
||||
if mgr.active_count() != 3:
|
||||
printerr("FAIL: _on_fly(FLY_EXP) 应发射 3 颗经验聚能光球,实际: ", mgr.active_count())
|
||||
fails += 1
|
||||
for orb in mgr._instances:
|
||||
if not orb._is_object or orb._target_obj != player_node:
|
||||
printerr("FAIL: 经验球没有锁定本地主角节点,无法产生吸收效果")
|
||||
fails += 1
|
||||
break
|
||||
|
||||
# 清空飞行物
|
||||
for i in range(50):
|
||||
@@ -113,7 +119,7 @@ func _init() -> void:
|
||||
if mgr.active_count() == 0:
|
||||
break
|
||||
|
||||
# 5. 验证 net_play 经验变动时触发经验获取流程
|
||||
# 5. 验证 net_play 经验变动不重复合成服务端已经下发的经验球
|
||||
var np := NetPlay.new()
|
||||
mount.add_child(np)
|
||||
var pc := PlayerCtl.new()
|
||||
@@ -126,11 +132,11 @@ func _init() -> void:
|
||||
printerr("FAIL: 初始点数同步不应触发获取经验!")
|
||||
fails += 1
|
||||
|
||||
# 杀死怪物获得 500 经验
|
||||
# 杀死怪物获得 500 经验:视觉只由上面的 GC_CREATE_FLY 路径生成。
|
||||
np._last_dead_mob_pos = Vector3(3, 0, 0)
|
||||
np._on_points({"exp": 1500, "next_exp": 5000, "level": 10})
|
||||
if mgr.active_count() != 3:
|
||||
printerr("FAIL: 经验增加时未能通过 net_world 生成经验光球!实际数量: ", mgr.active_count())
|
||||
if mgr.active_count() != 0:
|
||||
printerr("FAIL: POINT_EXP 不应重复生成经验光球,实际数量: ", mgr.active_count())
|
||||
fails += 1
|
||||
|
||||
mount.queue_free()
|
||||
|
||||
Reference in New Issue
Block a user