Skip to content

Commit

Permalink
refactor: destroy black sky volume
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Aug 11, 2024
1 parent 01037e7 commit 0c6d98c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lc-hax/Scripts/Modules/ClearVisionMod.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using Hax;
using System;
Expand Down Expand Up @@ -50,6 +51,10 @@ IEnumerator SetNightVision(object[] args) {
continue;
}

if (startOfRound.blackSkyVolume is Volume blackSkyVolume) {
Destroy(blackSkyVolume);
}

sunAnimator.enabled = false;
timeOfDay.sunIndirect.transform.eulerAngles = new Vector3(90, 0, 0);
timeOfDay.sunIndirect.transform.position = camera.transform.position;
Expand All @@ -61,7 +66,6 @@ IEnumerator SetNightVision(object[] args) {
lightData.lightDimmer = float.MaxValue;
lightData.distance = float.MaxValue;
timeOfDay.insideLighting = false;
startOfRound.blackSkyVolume.weight = 0;

yield return waitForEndOfFrame;
}
Expand Down

0 comments on commit 0c6d98c

Please sign in to comment.