From 3a90819106bb9b1190106a8eb44f3cffd906f581 Mon Sep 17 00:00:00 2001 From: sindoring Date: Sat, 27 Jun 2026 16:08:45 +0400 Subject: [PATCH] fix --- src/scenes/streaming/streaming_world_loader.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/scenes/streaming/streaming_world_loader.gd b/src/scenes/streaming/streaming_world_loader.gd index 4d69406..2e1439a 100644 --- a/src/scenes/streaming/streaming_world_loader.gd +++ b/src/scenes/streaming/streaming_world_loader.gd @@ -257,6 +257,7 @@ func _ready() -> void: _position_camera_over_world() set_process(true) + call_deferred("_refresh_streaming_targets_after_ready") func _process(delta: float) -> void: @@ -607,6 +608,15 @@ func _refresh_streaming_targets(force: bool) -> void: _refresh_streaming_targets_at(camera.global_position, force) +func _refresh_streaming_targets_after_ready() -> void: + var camera := _get_stream_camera() + if camera == null: + return + _terrain_root.position = Vector3.ZERO + _has_refresh_focus = false + _refresh_streaming_targets_at(camera.global_position, false) + + ## Core streaming update — works for both game (camera pos) and editor (preview center pos). func _refresh_editor_streaming_targets_at(focus_pos: Vector3, force: bool) -> void: if not force and not _should_refresh_focus(focus_pos): @@ -2053,6 +2063,7 @@ func _finalize_loaded_tile(request: Dictionary, data: Dictionary) -> void: state["desired_tile_lod"] = -1 if not state["desired_lods"].is_empty() else _compute_desired_tile_lod(state, _last_focus_pos) state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos) _tile_states[key] = state + state = _sync_terrain_quality(state, _last_focus_pos) state = _sync_detail_assets(state, _last_focus_pos) _tile_states[key] = state _rebuild_chunk_queues() @@ -2199,6 +2210,7 @@ func _finalize_loaded_streaming_tile(request: Dictionary, stream_tile: Resource) state["desired_tile_lod"] = _compute_desired_tile_lod(state, _last_focus_pos) state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos) _tile_states[key] = state + state = _sync_terrain_quality(state, _last_focus_pos) state = _sync_detail_assets(state, _last_focus_pos) _tile_states[key] = state _rebuild_chunk_queues()