From 2e729c49281ee6264590b951decbffae3f86e239 Mon Sep 17 00:00:00 2001 From: Alula Date: Sat, 31 Oct 2020 14:40:07 +0100 Subject: [PATCH] I SPENT A FUCKING MONTH TRYING TO FIND OUT WHY BALROG KEEPS JUMPING AND TOROKO IS NOT DAMAGING ME AND I WANT TO DIE NOW --- src/text_script.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/text_script.rs b/src/text_script.rs index 5928916..c740933 100644 --- a/src/text_script.rs +++ b/src/text_script.rs @@ -754,9 +754,9 @@ impl TextScriptVM { if let Some(direction) = Direction::from_int_facing(new_direction) { match direction { Direction::Left => game_scene.player.vel_x = 0x200, - Direction::Up => game_scene.player.vel_y = 0x200, + Direction::Up => game_scene.player.vel_y = -0x200, Direction::Right => game_scene.player.vel_x = -0x200, - Direction::Bottom => game_scene.player.vel_y = -0x200, + Direction::Bottom => game_scene.player.vel_y = 0x200, Direction::FacingPlayer => { // todo npc direction dependent bump } @@ -982,6 +982,7 @@ impl TextScriptVM { let pos_y = read_cur_varint(&mut cursor)? as isize * 16 * 0x200; let mut new_scene = GameScene::new(state, ctx, map_id)?; + new_scene.intro_mode = game_scene.intro_mode; new_scene.inventory = game_scene.inventory.clone(); new_scene.player = game_scene.player.clone(); new_scene.player.vel_x = 0; @@ -1168,6 +1169,9 @@ impl TextScriptVM { let entry = state.npc_table.get_entry(new_type).unwrap().to_owned(); npc.npc_flags.0 |= entry.npc_flags.0; npc.life = entry.life; + npc.size = entry.size; + npc.exp = entry.experience as u16; + npc.damage = entry.damage as u16; npc.cond.set_alive(true); npc.action_num = 0;