WaitForReferenceToLoad returns if a ref eventually loaded
This commit is contained in:
parent
d49e423ce5
commit
24343b657e
Binary file not shown.
@ -1,11 +1,12 @@
|
|||||||
Scriptname _00E_Func_WaitForRef Hidden
|
Scriptname _00E_Func_WaitForRef Hidden
|
||||||
|
|
||||||
Function WaitForReferenceToLoad(ObjectReference ref) Global
|
bool Function WaitForReferenceToLoad(ObjectReference ref, int iFramesToWait = 180) Global
|
||||||
|
|
||||||
Int maxIterationsToWait = 180
|
Int maxIterationsToWait = iFramesToWait
|
||||||
While ref.Is3DLoaded() == False && maxIterationsToWait > 0
|
While ref.Is3DLoaded() == False && maxIterationsToWait > 0
|
||||||
; Utility.Wait(0.02)
|
|
||||||
maxIterationsToWait -= 1
|
maxIterationsToWait -= 1
|
||||||
EndWhile
|
EndWhile
|
||||||
|
|
||||||
|
return maxIterationsToWait > 0 || ref.Is3DLoaded()
|
||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
Loading…
Reference in New Issue
Block a user