From ff5712860f69560b63a9cf0130aed0c77759800a Mon Sep 17 00:00:00 2001 From: GMatrixGames Date: Sat, 26 Mar 2022 22:00:48 -0400 Subject: [PATCH] Fix Fortnite BR map viewer showing mask instead of map --- CUE4Parse | 2 +- FModel/ViewModels/MapViewerViewModel.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index e4826c4b..b337a88a 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit e4826c4b14a223acb2bd8ab860d9799ed6df7d41 +Subproject commit b337a88a7ec41d6542337687ec01f79fe03cb825 diff --git a/FModel/ViewModels/MapViewerViewModel.cs b/FModel/ViewModels/MapViewerViewModel.cs index 07f5f36a..6b08d567 100644 --- a/FModel/ViewModels/MapViewerViewModel.cs +++ b/FModel/ViewModels/MapViewerViewModel.cs @@ -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); });