rebuild PlayerManager to CacheCreationService and optimize creation of the local file cache
This commit is contained in:
@@ -226,11 +226,13 @@ public class DalamudUtil : IDisposable
|
||||
{
|
||||
if (!_clientState.IsLoggedIn || characterAddress == IntPtr.Zero) return;
|
||||
|
||||
Logger.Verbose($"Starting wait for {name} to draw");
|
||||
|
||||
var obj = (GameObject*)characterAddress;
|
||||
const int tick = 250;
|
||||
int curWaitTime = 0;
|
||||
// ReSharper disable once LoopVariableIsNeverChangedInsideLoop
|
||||
while ((obj->RenderFlags & 0b100000000000) == 0b100000000000 && (!ct?.IsCancellationRequested ?? true) && curWaitTime < timeOut) // 0b100000000000 is "still rendering" or something
|
||||
while ((obj->DrawObject == null || (obj->RenderFlags & 0b100000000000) == 0b100000000000) && (!ct?.IsCancellationRequested ?? true) && curWaitTime < timeOut) // 0b100000000000 is "still rendering" or something
|
||||
{
|
||||
Logger.Verbose($"Waiting for {name} to finish drawing");
|
||||
curWaitTime += tick;
|
||||
|
||||
Reference in New Issue
Block a user