Skip to content

Commit ff69e32

Browse files
committed
Fix Bright Mode in Abyss
1 parent 99a7a6f commit ff69e32

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NobetaTrainer/NobetaTrainer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<AssemblyName>NobetaTrainer</AssemblyName>
66
<Description>Little Witch Nobeta speedrun Trainer tool</Description>
7-
<Version>1.4.1</Version>
7+
<Version>1.4.2</Version>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
<LangVersion>latest</LangVersion>
1010
<RestoreAdditionalProjectSources>

NobetaTrainer/Trainer/OtherPatches.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static class OtherPatches
2626
private static float _initialLightIntensity;
2727
private static Color _initialLightColor;
2828
private static LightShadows _initialShadows;
29+
private static bool _initialLightEnabled;
2930

3031
public static void RemoveLava()
3132
{
@@ -70,6 +71,7 @@ public static void UpdateBrightMode()
7071
var lightBakingOutput = _light.bakingOutput;
7172
if (BrightMode)
7273
{
74+
_light.enabled = true;
7375
_light.shadows = LightShadows.None;
7476
lightBakingOutput.lightmapBakeType = LightmapBakeType.Realtime;
7577

@@ -78,6 +80,7 @@ public static void UpdateBrightMode()
7880
}
7981
else
8082
{
83+
_light.enabled = _initialLightEnabled;
8184
_light.shadows = _initialShadows;
8285
lightBakingOutput.lightmapBakeType = LightmapBakeType.Mixed;
8386

@@ -125,6 +128,7 @@ private static void EnterScenePostfix()
125128
_initialShadows = _light.shadows;
126129
_initialLightColor = _light.color;
127130
_initialLightIntensity = _light.intensity;
131+
_initialLightEnabled = _light.enabled;
128132

129133
UpdateBrightMode();
130134
}

0 commit comments

Comments
 (0)