mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-31 09:49:06 +03:00
Script updates and simplification
This commit is contained in:
@@ -84,7 +84,7 @@ func _wait_for_resource(res, path):
|
||||
VisualServer.sync()
|
||||
OS.delay_usec(16000) # Wait approximately 1 frame.
|
||||
_lock("wait_for_resource")
|
||||
if queue.size() == 0 || queue[0] != res:
|
||||
if queue.size() == 0 or queue[0] != res:
|
||||
return pending[path]
|
||||
_unlock("wait_for_resource")
|
||||
|
||||
@@ -123,7 +123,7 @@ func thread_process():
|
||||
var ret = res.poll()
|
||||
_lock("process_check_queue")
|
||||
|
||||
if ret == ERR_FILE_EOF || ret != OK:
|
||||
if ret == ERR_FILE_EOF or ret != OK:
|
||||
var path = res.get_meta("path")
|
||||
if path in pending: # Else, it was already retrieved.
|
||||
pending[res.get_meta("path")] = res.get_resource()
|
||||
|
||||
Reference in New Issue
Block a user