perf(sites): validate the site once and hand collision the field array
DiveSite.configure() builds the height field once (TerrainHeightField validates the data) instead of running the definition validation and then the field construction again; the composition root relies on the error returned by configure(). The collision shape takes the field's row-major elevations directly instead of copying 263k cells one by one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be16d2ee07
commit
682e1f18e5
5 files changed
+14
-16
No files matched your search
@@ -130,10 +130,6 @@ func _start_dive() -> void:
|
||||
if definition == null:
|
||||
push_error("dive site definition %s cannot be loaded" % _selected_site_path)
|
||||
return
|
||||
var definition_error := definition.validation_error()
|
||||
if not definition_error.is_empty():
|
||||
push_error("dive site %s is invalid: %s" % [_selected_site_path, definition_error])
|
||||
return
|
||||
var world_scene := load(DIVE_WORLD_SCENE_PATH) as PackedScene
|
||||
if world_scene == null:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user