Skip to content

Commit

Permalink
Fix outfit texture mapping
Browse files Browse the repository at this point in the history
If an outfit import attempt fails, and the subsequent allocation is the level's default outfit, texture mapping will have been wiped out on the first attempt. This restores it. Only applicable to TR2.
  • Loading branch information
lahm86 committed Jun 17, 2024
1 parent af4cab2 commit 7e9518d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ private bool Import(TR2CombinedLevel level, TR2Type lara)
// Try to import the selected models into the level.
importer.Import();

if (lara == TR2TypeUtilities.GetAliasForLevel(level.Name, TR2Type.Lara))
{
// In case a previous attempt failed, we need to restore default texture mapping
_outer.TextureMonitor.GetMonitor(level.Name)?.RemovedTextures?.Remove(TR2Type.Lara);
}

if (level.IsCutScene)
{
// Restore original cutscene animations
Expand Down

0 comments on commit 7e9518d

Please sign in to comment.