소스 검색

Check meido before setting global gravity

When there are no meidos, setting global gravity is not possible through
the UI. Deserializing a scene can modify the global gravity value
without there being meidos and that breaks deserialization.
habeebweeb 4 년 전
부모
커밋
c30925f2af
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/MeidoManager.cs

+ 3 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/MeidoManager.cs

@@ -33,6 +33,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             set
             {
                 globalGravity = value;
+
+                if (!HasActiveMeido) return;
+
                 Meido activeMeido = ActiveMeido;
                 int activeMeidoSlot = activeMeido.Slot;