@@ -80,7 +80,7 @@ private VnScene loadVnScene(String script, VnScene current) throws Exception {
8080 vn .setInterop (new RuntimeVnInterop (engine ));
8181 VnSettings settings = new VnSettings ();
8282 if (current != null ) copySettings (current .getState (), settings );
83- vn .getState (). setSettings ( settings );
83+ copySettingsIntoState ( settings , vn .getState ());
8484 if (current != null && current .getAudioFacade () != null ) {
8585 vn .setAudioFacade (current .getAudioFacade ());
8686 }
@@ -106,6 +106,29 @@ private static void copySettings(VnState from, VnSettings to) {
106106 to .setAutoPlayDelay (s .getAutoPlayDelay ());
107107 to .setSkipUnreadText (s .isSkipUnreadText ());
108108 to .setSkipAfterChoices (s .isSkipAfterChoices ());
109+ to .setPhysicsFixedStepMs (s .getPhysicsFixedStepMs ());
110+ to .setPhysicsMaxSubSteps (s .getPhysicsMaxSubSteps ());
111+ to .setPhysicsDefaultFriction (s .getPhysicsDefaultFriction ());
112+ to .setInputProfilePath (s .getInputProfilePath ());
113+ to .setInputProfileSerialized (s .getInputProfileSerialized ());
114+ }
115+
116+ private static void copySettingsIntoState (VnSettings src , VnState state ) {
117+ if (src == null || state == null ) return ;
118+ VnSettings dst = state .getSettings ();
119+ if (dst == null ) return ;
120+ dst .setTextSpeed (src .getTextSpeed ());
121+ dst .setBgmVolume (src .getBgmVolume ());
122+ dst .setSfxVolume (src .getSfxVolume ());
123+ dst .setVoiceVolume (src .getVoiceVolume ());
124+ dst .setAutoPlayDelay (src .getAutoPlayDelay ());
125+ dst .setSkipUnreadText (src .isSkipUnreadText ());
126+ dst .setSkipAfterChoices (src .isSkipAfterChoices ());
127+ dst .setPhysicsFixedStepMs (src .getPhysicsFixedStepMs ());
128+ dst .setPhysicsMaxSubSteps (src .getPhysicsMaxSubSteps ());
129+ dst .setPhysicsDefaultFriction (src .getPhysicsDefaultFriction ());
130+ dst .setInputProfilePath (src .getInputProfilePath ());
131+ dst .setInputProfileSerialized (src .getInputProfileSerialized ());
109132 }
110133
111134 private static String str (Map <String ,Object > props , String key , String def ) {
0 commit comments