Skip to content

Commit

Permalink
Fixed Coordinate Load ME support
Browse files Browse the repository at this point in the history
Added function to coordinate load for when main feature is off
  • Loading branch information
jalil49 committed Mar 15, 2021
1 parent ab39bc1 commit d0b89cb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 21 additions & 2 deletions src/CharaEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,13 @@ protected override void OnCoordinateBeingLoaded(ChaFileCoordinate coordinate)
if (TextureQueue.Peek() != null && TextureQueue.Peek().ObjectType != ObjectType.Unknown)
{
MaterialTextureProperty ME_Info = TextureQueue.Dequeue();
if (!ThisOutfitData.ME_Work && ME_Info.TexID != null)
{
if (ThisOutfitData.importDictionaryQueue[ME_Info.CoordinateIndex].TryGetValue((int)ME_Info.TexID, out byte[] imgbyte))
{
ME_Info.TexID = ME_Support.SetAndGetTextureID(imgbyte);
}
}
ME_Info.Slot = ACCpostion;
MaterialTexture.Add(ME_Info);
}
Expand Down Expand Up @@ -1042,8 +1049,13 @@ protected override void OnCoordinateBeingLoaded(ChaFileCoordinate coordinate)
if (TextureQueue.Peek() != null && TextureQueue.Peek().ObjectType != ObjectType.Unknown)
{
MaterialTextureProperty ME_Info = TextureQueue.Dequeue();
ME_Info.Slot = ACCpostion;

if (!ThisOutfitData.ME_Work && ME_Info.TexID != null)
{
if (ThisOutfitData.importDictionaryQueue[ME_Info.CoordinateIndex].TryGetValue((int)ME_Info.TexID, out byte[] imgbyte))
{
ME_Info.TexID = ME_Support.SetAndGetTextureID(imgbyte);
}
}
ME_Info.Slot = ACCpostion;
MaterialTexture.Add(ME_Info);
}
Expand Down Expand Up @@ -1147,6 +1159,13 @@ protected override void OnCoordinateBeingLoaded(ChaFileCoordinate coordinate)
if (TextureQueue.Peek() != null && TextureQueue.Peek().ObjectType != ObjectType.Unknown)
{
MaterialTextureProperty ME_Info = TextureQueue.Dequeue();
if (!ThisOutfitData.ME_Work && ME_Info.TexID != null)
{
if (ThisOutfitData.importDictionaryQueue[ME_Info.CoordinateIndex].TryGetValue((int)ME_Info.TexID, out byte[] imgbyte))
{
ME_Info.TexID = ME_Support.SetAndGetTextureID(imgbyte);
}
}
ME_Info.Slot = ACCpostion;
MaterialTexture.Add(ME_Info);
}
Expand Down
2 changes: 0 additions & 2 deletions src/ClothingLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ private void GeneralizedLoad(int outfitnum)
ME_Info.TexID = ME_Support.SetAndGetTextureID(imgbyte);
}
}
ME_Info.Slot = ACCpostion;

ME_Info.Slot = ACCpostion;
MaterialTexture.Add(ME_Info);
}
Expand Down

0 comments on commit d0b89cb

Please sign in to comment.