1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-11-30 16:18:00 +00:00

Fixed <ESC skipping intro cutscene

This commit is contained in:
dawnDus 2022-03-25 08:58:01 -04:00
parent 11454183a1
commit fb17edea7a
No known key found for this signature in database
GPG key ID: 972AABDE81848F21

View file

@ -22,7 +22,6 @@ use crate::input::touch_controls::TouchControlType;
use crate::npc::NPC;
use crate::player::{ControlMode, TargetPlayer};
use crate::scene::game_scene::GameScene;
use crate::scene::title_scene::TitleScene;
use crate::scripting::tsc::bytecode_utils::read_cur_varint;
use crate::scripting::tsc::encryption::decrypt_tsc;
use crate::scripting::tsc::opcodes::TSCOpCode;
@ -1605,13 +1604,17 @@ impl TextScriptVM {
exec_state = TextScriptExecutionState::Reset;
}
TSCOpCode::ESC => {
state.next_scene = Some(Box::new(TitleScene::new()));
state.control_flags.set_tick_world(false);
state.control_flags.set_control_enabled(false);
state.control_flags.set_interactions_disabled(true);
state.textscript_vm.flags.set_cutscene_skip(false);
exec_state = TextScriptExecutionState::Ended;
exec_state = TextScriptExecutionState::Running(state.constants.game.intro_event, 0);
state.textscript_vm.suspend = true;
state.sound_manager.play_song(0, &state.constants, &state.settings, ctx)?;
state.reset();
state.start_intro(ctx)?;
}
TSCOpCode::SVP => {
exec_state = TextScriptExecutionState::SaveProfile(event, cursor.position() as u32);