客户端问题修改

This commit is contained in:
shen
2026-09-07 14:53:36 +08:00
parent b19d5b5dd3
commit 61272b75e9
32 changed files with 1023 additions and 95 deletions
+17
View File
@@ -213,6 +213,23 @@ func catch_up() -> void:
func set_model_factory(f: Callable) -> void:
_model_factory = f
# The game server can send the initial actor burst before GameScene has
# finished loading mob/item proto tables. Those actors were necessarily made
# as capsules; once the real factory is available, replace them from the
# authoritative EntityStore rows instead of leaving mixed placeholder/GR2
# models on screen.
_refresh_existing_model_views()
func _refresh_existing_model_views() -> void:
if not _model_factory.is_valid() or client == null or not client.has_method("get_entity"):
return
for vid in _by_vid.keys().duplicate():
var id := int(vid)
if id == _local_vid:
continue
var d: Dictionary = client.get_entity(id)
if not d.is_empty():
_on_spawn(d)
# 本地玩家用 player_controller 的节点代表,这里就不要再画一个。
func set_local_vid(vid: int) -> void: