From 6d3a0da314910ae7cc870e6c5aacd80d1b3f52bd Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 2 Apr 2024 01:14:18 +0200 Subject: [PATCH] 1000x speed boost with v/b cheats when holding shift --- src/world.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/world.rs b/src/world.rs index 7f65d5e..8dca846 100644 --- a/src/world.rs +++ b/src/world.rs @@ -320,23 +320,28 @@ fn handle_cheats( } let (trans, mut pos, mut v) = q_player.get_single_mut().unwrap(); let (mut lifeform, ) = q_life.get_single_mut().unwrap(); + let boost = if key_input.pressed(KeyCode::ShiftLeft) { + 1e6 + } else { + 1e3 + }; if key_input.just_pressed(settings.key_cheat_pizza) { pos.0 = DVec3::new(-303370.0, 0.0, -500000.0); } if key_input.just_pressed(settings.key_cheat_farview1) { - pos.0 = DVec3::new(-1000000.0, 1000000.0, -500000.0); + pos.0 = DVec3::new(-1000.0e6, 1000.0e6, -500.0e6); } if key_input.just_pressed(settings.key_cheat_farview2) { - pos.0 = DVec3::new(1000000.0, 1000000.0, -500000.0); + pos.0 = DVec3::new(1000.0e6, 1000.0e6, -500.0e6); } if key_input.just_pressed(settings.key_cheat_stop) { v.0 = DVec3::ZERO; } if key_input.pressed(settings.key_cheat_speed) { - v.0 += DVec3::from(trans.rotation * Vec3::new(0.0, 0.0, 1000.0)); + v.0 += DVec3::from(trans.rotation * Vec3::new(0.0, 0.0, boost)); } if key_input.pressed(settings.key_cheat_speed_backward) { - v.0 += DVec3::from(trans.rotation * Vec3::new(0.0, 0.0, -1000.0)); + v.0 += DVec3::from(trans.rotation * Vec3::new(0.0, 0.0, -boost)); } if key_input.pressed(settings.key_cheat_adrenaline_zero) { lifeform.adrenaline = 0.0;