Skip to content

Commit

Permalink
bug fix. refer to changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow1226 committed Aug 9, 2021
1 parent cc5db1b commit b60b806
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CameraPlus/Behaviours/CameraPlusBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ internal virtual void CreateScreenRenderTexture()
public virtual void SceneManager_activeSceneChanged(Scene from, Scene to)
{
CloseContextMenu();

StartCoroutine(GetMainCamera());
Config.SetCullingMask();
}

private void OnFPFCToglleEvent()
Expand Down
5 changes: 5 additions & 0 deletions CameraPlus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v6.0.2 Changes
- Fixed the problem that it cannot be started when cfg data remains in UserData/CameraPlus.
- Fixed an issue where profiles were not loaded immediately after launch when using GottaGoFast.
- Fixed an issue where displaying debris in-game links was failing.

# v6.0.1 Changes
- Missing folder integrity check when backing up old settings.

Expand Down
25 changes: 13 additions & 12 deletions CameraPlus/CameraPlusController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,23 @@ IEnumerator waitForcam()
yield return new WaitForSeconds(0.1f);
while (Camera.main == null) yield return new WaitForSeconds(0.05f);
}
if (ActiveSceneChanged != null)

if (PluginConfig.Instance.ProfileSceneChange && !isRestart)
{
if (PluginConfig.Instance.ProfileSceneChange && !isRestart)
if (!MultiplayerSession.ConnectedMultiplay || PluginConfig.Instance.MultiplayerProfile == "")
{
if (!MultiplayerSession.ConnectedMultiplay || PluginConfig.Instance.MultiplayerProfile == "")
{
if (to.name == "GameCore" && PluginConfig.Instance.RotateProfile != "" && LevelDataPatch.is360Level)
CameraUtilities.ProfileChange(PluginConfig.Instance.RotateProfile);
else if (to.name == "GameCore" && PluginConfig.Instance.GameProfile != "")
CameraUtilities.ProfileChange(PluginConfig.Instance.GameProfile);
else if ((to.name == "MainMenu" || to.name == "MenuCore" || to.name == "HealthWarning") && PluginConfig.Instance.MenuProfile != "")
CameraUtilities.ProfileChange(PluginConfig.Instance.MenuProfile);
}
if (to.name == "GameCore" && PluginConfig.Instance.RotateProfile != "" && LevelDataPatch.is360Level)
CameraUtilities.ProfileChange(PluginConfig.Instance.RotateProfile);
else if (to.name == "GameCore" && PluginConfig.Instance.GameProfile != "")
CameraUtilities.ProfileChange(PluginConfig.Instance.GameProfile);
else if ((to.name == "MainMenu" || to.name == "MenuCore" || to.name == "HealthWarning") && PluginConfig.Instance.MenuProfile != "")
CameraUtilities.ProfileChange(PluginConfig.Instance.MenuProfile);
}
yield return waitForcam();
}

if (ActiveSceneChanged != null)
{
yield return waitForcam();
// Invoke each activeSceneChanged event
foreach (var func in ActiveSceneChanged?.GetInvocationList())
{
Expand Down
13 changes: 12 additions & 1 deletion CameraPlus/HarmonyPatches/AudioTimeSyncControllerPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HarmonyLib;
using CameraPlus.Utilities;

namespace CameraPlus.HarmonyPatches
{
Expand All @@ -14,7 +15,17 @@ static void Postfix(AudioTimeSyncController __instance)
Instance = __instance;
}
}

[HarmonyPatch(typeof(AudioTimeSyncController), nameof(AudioTimeSyncController.StartSong))]
static class HookAudioTimeSyncController
{
static void Postfix(AudioTimeSyncController __instance)
{
#if DEBUG
Logger.log.Notice("AudioTimeSyncController StartSong");
#endif
CameraUtilities.SetAllCameraCulling();
}
}
[HarmonyPatch(typeof(AudioTimeSyncController), nameof(AudioTimeSyncController.StopSong))]
internal class AudioTimeSyncControllerPatch2
{
Expand Down
4 changes: 2 additions & 2 deletions CameraPlus/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.1")]
[assembly: AssemblyFileVersion("6.0.1")]
[assembly: AssemblyVersion("6.0.2")]
[assembly: AssemblyFileVersion("6.0.2")]
2 changes: 1 addition & 1 deletion CameraPlus/Utilities/ConfigConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal static void DefaultConfigConverter()
cc = PreviousConfigToCameraConfig(pc,
Path.Combine(UnityGame.UserDataPath, Plugin.Name,
$"{fi.Name.Substring(0, fi.Name.Length - fi.Extension.Length)}.json"));
File.Copy(fi.FullName, Path.Combine(UnityGame.UserDataPath, Plugin.Name, "OldProfiles", fi.Name));
File.Copy(fi.FullName, Path.Combine(UnityGame.UserDataPath, Plugin.Name, "OldProfiles", fi.Name),true);
File.Delete(fi.FullName);
Logger.log.Notice($"Profile Convert : {fi.Name}");
}
Expand Down
4 changes: 2 additions & 2 deletions CameraPlus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"id": "CameraPlus",
"name": "CameraPlus",
"author": "Various Modders",
"version": "6.0.1",
"version": "6.0.2",
"description": "CameraPlus is a Beat Saber mod that allows for multiple wide FOV cameras with smoothed movement.",
"gameVersion": "1.16.2",
"gameVersion": "1.16.4",
"dependsOn": {
"BSIPA": "^4.1.6"
},
Expand Down

0 comments on commit b60b806

Please sign in to comment.