mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-11-22 13:42:47 +00:00
Fix MYB bumping away from NPC when direction >4
This commit is contained in:
parent
2be1c422d6
commit
0330cf3b2b
|
@ -794,27 +794,27 @@ impl TextScriptVM {
|
||||||
game_scene.player1.vel_y = 0x200;
|
game_scene.player1.vel_y = 0x200;
|
||||||
game_scene.player2.vel_y = 0x200;
|
game_scene.player2.vel_y = 0x200;
|
||||||
}
|
}
|
||||||
Direction::FacingPlayer => {
|
_ => (),
|
||||||
for npc in game_scene.npc_list.iter_alive() {
|
}
|
||||||
if npc.event_num == new_direction as u16 {
|
} else {
|
||||||
if game_scene.player1.x >= npc.x {
|
for npc in game_scene.npc_list.iter_alive() {
|
||||||
game_scene.player1.direction = Left;
|
if npc.event_num == new_direction as u16 {
|
||||||
game_scene.player1.vel_x = 0x200;
|
if game_scene.player1.x >= npc.x {
|
||||||
} else {
|
game_scene.player1.direction = Left;
|
||||||
game_scene.player1.direction = Right;
|
game_scene.player1.vel_x = 0x200;
|
||||||
game_scene.player1.vel_x = -0x200;
|
} else {
|
||||||
}
|
game_scene.player1.direction = Right;
|
||||||
|
game_scene.player1.vel_x = -0x200;
|
||||||
if game_scene.player2.x >= npc.x {
|
|
||||||
game_scene.player2.direction = Left;
|
|
||||||
game_scene.player2.vel_x = 0x200;
|
|
||||||
} else {
|
|
||||||
game_scene.player2.direction = Right;
|
|
||||||
game_scene.player2.vel_x = -0x200;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if game_scene.player2.x >= npc.x {
|
||||||
|
game_scene.player2.direction = Left;
|
||||||
|
game_scene.player2.vel_x = 0x200;
|
||||||
|
} else {
|
||||||
|
game_scene.player2.direction = Right;
|
||||||
|
game_scene.player2.vel_x = -0x200;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue