mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-12-02 01:18:37 +00:00
Make <MYB change the player direction... Shack cutscene pretty accurate
This commit is contained in:
parent
d427651de3
commit
639c296bcc
|
|
@ -902,6 +902,8 @@ impl TextScriptVM {
|
||||||
if let Some(direction) = Direction::from_int_facing(new_direction) {
|
if let Some(direction) = Direction::from_int_facing(new_direction) {
|
||||||
match direction {
|
match direction {
|
||||||
Direction::Left => {
|
Direction::Left => {
|
||||||
|
game_scene.player1.direction = Left;
|
||||||
|
game_scene.player2.direction = Left;
|
||||||
game_scene.player1.vel_x = 0x200;
|
game_scene.player1.vel_x = 0x200;
|
||||||
game_scene.player2.vel_x = 0x200;
|
game_scene.player2.vel_x = 0x200;
|
||||||
}
|
}
|
||||||
|
|
@ -910,6 +912,8 @@ impl TextScriptVM {
|
||||||
game_scene.player2.vel_y = -0x200;
|
game_scene.player2.vel_y = -0x200;
|
||||||
}
|
}
|
||||||
Direction::Right => {
|
Direction::Right => {
|
||||||
|
game_scene.player1.direction = Right;
|
||||||
|
game_scene.player2.direction = Right;
|
||||||
game_scene.player1.vel_x = -0x200;
|
game_scene.player1.vel_x = -0x200;
|
||||||
game_scene.player2.vel_x = -0x200;
|
game_scene.player2.vel_x = -0x200;
|
||||||
}
|
}
|
||||||
|
|
@ -919,7 +923,7 @@ impl TextScriptVM {
|
||||||
}
|
}
|
||||||
Direction::FacingPlayer => {
|
Direction::FacingPlayer => {
|
||||||
for npc in game_scene.npc_list.iter_alive() {
|
for npc in game_scene.npc_list.iter_alive() {
|
||||||
if npc.event_num == event_num {
|
if npc.event_num == new_direction as u16{
|
||||||
if game_scene.player1.x >= npc.x {
|
if game_scene.player1.x >= npc.x {
|
||||||
game_scene.player1.direction = Left;
|
game_scene.player1.direction = Left;
|
||||||
game_scene.player1.vel_x = 0x200;
|
game_scene.player1.vel_x = 0x200;
|
||||||
|
|
@ -1275,8 +1279,8 @@ impl TextScriptVM {
|
||||||
let pos_x = read_cur_varint(&mut cursor)? as i32 * block_size;
|
let pos_x = read_cur_varint(&mut cursor)? as i32 * block_size;
|
||||||
let pos_y = read_cur_varint(&mut cursor)? as i32 * block_size;
|
let pos_y = read_cur_varint(&mut cursor)? as i32 * block_size;
|
||||||
|
|
||||||
new_scene.player1.cond.set_interacted(false);
|
game_scene.player1.cond.set_interacted(false);
|
||||||
new_scene.player2.cond.set_interacted(false);
|
game_scene.player2.cond.set_interacted(false);
|
||||||
|
|
||||||
for player in [&mut game_scene.player1, &mut game_scene.player2].iter_mut() {
|
for player in [&mut game_scene.player1, &mut game_scene.player2].iter_mut() {
|
||||||
player.vel_x = 0;
|
player.vel_x = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue