fix global draw block for different object quantity
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.8.33</Version>
|
<Version>0.8.34</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||||
|
|||||||
@@ -350,24 +350,34 @@ public class DalamudUtilService : IHostedService
|
|||||||
if (!IsAnythingDrawing)
|
if (!IsAnythingDrawing)
|
||||||
{
|
{
|
||||||
var gameObj = (GameObject*)p.Address;
|
var gameObj = (GameObject*)p.Address;
|
||||||
bool isDrawing = gameObj->RenderFlags == 0b100000000000;
|
|
||||||
if (!isDrawing)
|
|
||||||
{
|
|
||||||
var drawObj = gameObj->DrawObject;
|
var drawObj = gameObj->DrawObject;
|
||||||
|
bool isDrawing = false;
|
||||||
if ((nint)drawObj != IntPtr.Zero)
|
if ((nint)drawObj != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
isDrawing = gameObj->RenderFlags == 0b100000000000;
|
||||||
|
if (!isDrawing)
|
||||||
{
|
{
|
||||||
isDrawing = ((CharacterBase*)drawObj)->HasModelInSlotLoaded != 0;
|
isDrawing = ((CharacterBase*)drawObj)->HasModelInSlotLoaded != 0;
|
||||||
if (!isDrawing)
|
if (!isDrawing)
|
||||||
{
|
{
|
||||||
isDrawing = ((CharacterBase*)drawObj)->HasModelFilesInSlotLoaded != 0;
|
isDrawing = ((CharacterBase*)drawObj)->HasModelFilesInSlotLoaded != 0;
|
||||||
|
if (isDrawing)
|
||||||
|
{
|
||||||
|
_logger.LogTrace("Global draw block triggered by {name} due to HasModelFilesInSlotLoaded", p.Name.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.LogTrace("Global draw block triggered by {name} due to HasModelInSlotLoaded", p.Name.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.LogTrace("Global draw block triggered by {name} due to RenderFlags", p.Name.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDrawing)
|
IsAnythingDrawing |= isDrawing;
|
||||||
{
|
|
||||||
IsAnythingDrawing = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return (p.Name.ToString(), p.Address);
|
return (p.Name.ToString(), p.Address);
|
||||||
}, StringComparer.Ordinal));
|
}, StringComparer.Ordinal));
|
||||||
|
|||||||
Reference in New Issue
Block a user