From 9e10851e3971a73447a8bd1ec90d5a8858d77579 Mon Sep 17 00:00:00 2001 From: Vinjul1704 Date: Thu, 6 Jun 2024 09:52:46 +0200 Subject: [PATCH] Add no collision flag. (#75) --- jdsd_dsiii_practice_tool.toml | 3 ++- lib/libds3/src/pointers.rs | 2 ++ practice-tool/src/config.rs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jdsd_dsiii_practice_tool.toml b/jdsd_dsiii_practice_tool.toml index 5b869a6..634ece9 100644 --- a/jdsd_dsiii_practice_tool.toml +++ b/jdsd_dsiii_practice_tool.toml @@ -40,7 +40,8 @@ commands = [ { target = "ctrl+n" }, { flag = "ai_disable", hotkey = "f1" }, { flag = "gravity", hotkey = "f2" }, - { flag = "evt_disable", hotkey = "f3" }, + { flag = "collision", hotkey = "f3" }, + { flag = "evt_disable", hotkey = "f9" }, { quitout = "p" } ] diff --git a/lib/libds3/src/pointers.rs b/lib/libds3/src/pointers.rs index b23631e..c552f92 100644 --- a/lib/libds3/src/pointers.rs +++ b/lib/libds3/src/pointers.rs @@ -64,6 +64,7 @@ pub struct PointerChains { pub debug_sphere_1: Bitflag, pub debug_sphere_2: Bitflag, pub gravity: Bitflag, + pub collision: Bitflag, pub speed: PointerChain, pub position: (PointerChain, PointerChain<[f32; 3]>), pub character_stats: PointerChain, @@ -301,6 +302,7 @@ impl From for PointerChains { debug_sphere_1: bitflag!(0b1; base_hbd, 0x30), debug_sphere_2: bitflag!(0b1; base_hbd, 0x31), gravity: bitflag!(0b1000000; world_chr_man, 0x80, 0x1a08), + collision: bitflag!(0b1; world_chr_man, 0x40, 0x0, 0x50, 0x187), speed: pointer_chain!(world_chr_man, 0x80, xa as _, 0x28, offs_speed as _), position: ( pointer_chain!(world_chr_man, 0x40, 0x28, 0x74), diff --git a/practice-tool/src/config.rs b/practice-tool/src/config.rs index 933e979..a6a2547 100644 --- a/practice-tool/src/config.rs +++ b/practice-tool/src/config.rs @@ -328,6 +328,7 @@ impl TryFrom for FlagSpec { "debug_sphere_1" => Ok(FlagSpec::new("Debug sphere 1", |c| &c.debug_sphere_1)), "debug_sphere_2" => Ok(FlagSpec::new("Debug sphere 2", |c| &c.debug_sphere_2)), "gravity" => Ok(FlagSpec::new("No Gravity", |c| &c.gravity)), + "collision" => Ok(FlagSpec::new("No Collision", |c| &c.collision)), e => Err(format!("\"{}\" is not a valid flag specifier", e)), } }