Skip to content

Commit

Permalink
Release v1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmBatby committed Jul 27, 2024
1 parent d465af9 commit 3a73db9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
**Changelog**
--

**<details><summary>Version 1.3.7</summary>**

**<details><summary>Fixes</summary>**

* Added additional safety checks to ExtendedFootstepSurface patches

</details>

</details>

**<details><summary>Version 1.3.6</summary>**

**<details><summary>Features</summary>**
Expand Down
11 changes: 7 additions & 4 deletions LethalLevelLoader/General/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,13 @@ internal static void RoundManagerSpawnOutsideHazards_Prefix()
[HarmonyPostfix]
internal static void RoundManagerFinishGeneratingNewLevelClientRpc_Prefix()
{
LevelLoader.RefreshFootstepSurfaces();
LevelLoader.BakeSceneColliderMaterialData(RoundManager.dungeonGenerator.gameObject.scene);
if (LevelLoader.vanillaWaterShader != null)
LevelLoader.TryRestoreWaterShaders(RoundManager.dungeonGenerator.gameObject.scene);
if (TimeOfDay.sunAnimator != null)
{
LevelLoader.RefreshFootstepSurfaces();
LevelLoader.BakeSceneColliderMaterialData(TimeOfDay.sunAnimator.gameObject.scene);
if (LevelLoader.vanillaWaterShader != null)
LevelLoader.TryRestoreWaterShaders(TimeOfDay.sunAnimator.gameObject.scene);
}
}

/*
Expand Down
9 changes: 7 additions & 2 deletions LethalLevelLoader/Loaders/LevelLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,14 @@ public static bool TryGetFootstepSurface(Collider collider, out FootstepSurface
{
footstepSurface = null;

if (collider == null)
return (false);

if (cachedLevelColliderMaterialDictionary.TryGetValue(collider, out List<Material> materials))
foreach (Material material in materials)
activeExtendedFootstepSurfaceDictionary.TryGetValue(material.name, out footstepSurface);
if (materials != null)
foreach (Material material in materials)
if (material != null && !string.IsNullOrEmpty(material.name))
activeExtendedFootstepSurfaceDictionary.TryGetValue(material.name, out footstepSurface);

return (footstepSurface != null);
}
Expand Down
2 changes: 1 addition & 1 deletion LethalLevelLoader/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class Plugin : BaseUnityPlugin
{
public const string ModGUID = "imabatby.lethallevelloader";
public const string ModName = "LethalLevelLoader";
public const string ModVersion = "1.3.6";
public const string ModVersion = "1.3.7";

internal static Plugin Instance;

Expand Down

0 comments on commit 3a73db9

Please sign in to comment.