perf: harden runtime for weaker hardware
This commit is contained in:
@@ -130,6 +130,10 @@ func _run() -> void:
|
||||
)
|
||||
var reloaded_goat := load("res://world/animals/goat/cozy_goat.tscn").instantiate() as AnimalNode
|
||||
animals_parent.add_child(reloaded_goat)
|
||||
# Freeze presentation movement while proving that binding itself is a pure
|
||||
# reload. A physics step may otherwise land between add_child() and the next
|
||||
# process frame and legitimately advance the authoritative route.
|
||||
reloaded_goat.set_physics_process(false)
|
||||
await process_frame
|
||||
goat = reloaded_goat
|
||||
goat.move_speed = 4.0
|
||||
@@ -141,6 +145,7 @@ func _run() -> void:
|
||||
),
|
||||
"Reloading the self-contained goat scene should bind the same state without resetting it"
|
||||
)
|
||||
goat.set_physics_process(true)
|
||||
for _frame in 3:
|
||||
await physics_frame
|
||||
_check(
|
||||
|
||||
Reference in New Issue
Block a user