Skip to content

Commit

Permalink
Delete unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow1226 committed Jul 23, 2021
1 parent e45c2ca commit 827daa6
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions CameraPlus/Behaviours/CameraPlusBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ protected IEnumerator DelayedInit()
_quad.transform.eulerAngles = ThirdPersonRot;
}

// Add our camera movement script if the movement script path is set
if (Config.movementScript.movementScript != String.Empty || Config.movementScript.songSpecificScript)
AddMovementScript();
AddMovementScript();

Plugin.cameraController.ActiveSceneChanged += SceneManager_activeSceneChanged;
SceneManager_activeSceneChanged(new Scene(), new Scene());
Expand Down Expand Up @@ -336,20 +334,6 @@ public virtual void SceneManager_activeSceneChanged(Scene from, Scene to)
CloseContextMenu();

StartCoroutine(GetMainCamera());

if (SceneManager.GetActiveScene().name == "GameCore")
{
if (!_cameraMovement || Config.movementScript.useAudioSync)
{
string scriptpath = AddMovementScript();
Logger.log.Notice($"{this.name} Add MoveScript \"{Path.GetFileName(scriptpath)}\" successfully initialized! {Convert.ToString(_cam.cullingMask, 16)}");
}

}
else if (Config.movementScript.useAudioSync || (!Config.movementScript.useAudioSync && Config.movementScript.movementScript == string.Empty))
{
ClearMovementScript();
}
}

private void OnFPFCToglleEvent()
Expand Down

0 comments on commit 827daa6

Please sign in to comment.