Script updates and simplification

This commit is contained in:
Aaron Franke
2021-01-06 00:39:17 -05:00
parent 6bdbeafca2
commit e73af12f49
7 changed files with 57 additions and 67 deletions

View File

@@ -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()