Browse Source

Fix issue with quicksaving camera after scene load

Quick saving camera transform with Q + S after loading a scene and then
quick loading the camera transform with Q + A results in an unexpected
camera rotation

MM uses the camera's AroundAngle to save its rotation when quick saving
the camera's transform but uses euler angles when saving the scene. On
scene load, the camera's rotation is set through the euler angles but
not the AroundAngle.
habeebweeb 4 years ago
parent
commit
e3057af99c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

+ 2 - 2
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -3469,8 +3469,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                                             float.Parse(strArray3[29])),
                                                 true);
                         mainCamera.SetDistance(float.Parse(strArray3[30]), true);
-                        mainCamera.transform.eulerAngles =
-                                new Vector3(float.Parse(strArray3[31]), float.Parse(strArray3[32]), float.Parse(strArray3[33]));
+                        // strArray3[33] is not used
+                        mainCamera.SetAroundAngle(new Vector2(float.Parse(strArray3[32]), float.Parse(strArray3[31])), true);
                         if (int.Parse(strArray3[34]) == 1)
                         {
                             inName = strArray3[35];