This commit is contained in:
AbstractConcept 2022-09-30 22:51:09 -05:00
parent 3e8476ce8a
commit d18d422a94
15 changed files with 68 additions and 39 deletions

View file

@ -86,7 +86,9 @@ namespace Rimworld_Animations_Patch
{
foreach (Pawn pawn in Current.Game.CurrentMap.mapPawns.AllPawns)
{
pawn.Drawer.renderer.graphics.ResolveAllGraphics();
if (pawn == null) continue;
pawn.Drawer?.renderer?.graphics?.ResolveAllGraphics();
pawn.TryGetComp<CompPawnSexData>()?.UpdateBodyAddonVisibility();
PortraitsCache.SetDirty(pawn);

View file

@ -78,7 +78,10 @@ namespace Rimworld_Animations_Patch
{
foreach (Pawn pawn in Current.Game.CurrentMap.mapPawns.AllPawns)
{
pawn.Drawer.renderer.graphics.ResolveAllGraphics();
if (pawn == null) continue;
pawn.Drawer?.renderer?.graphics?.ResolveAllGraphics();
PortraitsCache.SetDirty(pawn);
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
}