Fix Fortnite BR map viewer showing mask instead of map

This commit is contained in:
GMatrixGames 2022-03-26 22:00:48 -04:00
parent 3a85fcbc05
commit ff5712860f
No known key found for this signature in database
GPG Key ID: 2621164AAF16CEDF
2 changed files with 6 additions and 2 deletions

@ -1 +1 @@
Subproject commit e4826c4b14a223acb2bd8ab860d9799ed6df7d41
Subproject commit b337a88a7ec41d6542337687ec01f79fe03cb825

View File

@ -376,8 +376,12 @@ namespace FModel.ViewModels
await _threadWorkerView.Begin(_ =>
{
if (!Utils.TryLoadObject("FortniteGame/Content/UI/IngameMap/UIMapManagerBR.Default__UIMapManagerBR_C", out UObject mapManager) ||
!mapManager.TryGetValue(out UMaterial mapMaterial, "MapMaterial") || mapMaterial.GetFirstTexture() is not UTexture2D tex) return;
!mapManager.TryGetValue(out UMaterial mapMaterial, "MapMaterial")) return;
var midTex = mapMaterial.GetFirstTexture();
if ((midTex?.Name ?? string.Empty).Contains("Mask"))
midTex = mapMaterial.GetTextureAtIndex(1);
if (midTex is not UTexture2D tex) return;
_bitmaps[0][_FIRST_BITMAP] = new MapLayer{Layer = Utils.GetBitmap(tex), IsEnabled = true};
_brMiniMapImage = GetImageSource(_bitmaps[0][_FIRST_BITMAP].Layer);
});