add 'b' key cheat to fly backwards quickly

This commit is contained in:
yuni 2024-04-01 20:37:32 +02:00
parent 65c911d4dd
commit adeb207919
2 changed files with 5 additions and 0 deletions

View file

@ -47,6 +47,7 @@ pub struct Settings {
pub key_reply10: KeyCode, pub key_reply10: KeyCode,
pub key_cheat_stop: KeyCode, pub key_cheat_stop: KeyCode,
pub key_cheat_speed: KeyCode, pub key_cheat_speed: KeyCode,
pub key_cheat_speed_backward: KeyCode,
pub key_cheat_pizza: KeyCode, pub key_cheat_pizza: KeyCode,
pub key_cheat_farview1: KeyCode, pub key_cheat_farview1: KeyCode,
pub key_cheat_farview2: KeyCode, pub key_cheat_farview2: KeyCode,
@ -118,6 +119,7 @@ impl Default for Settings {
key_reply10: KeyCode::Digit0, key_reply10: KeyCode::Digit0,
key_cheat_stop: KeyCode::KeyC, key_cheat_stop: KeyCode::KeyC,
key_cheat_speed: KeyCode::KeyV, key_cheat_speed: KeyCode::KeyV,
key_cheat_speed_backward: KeyCode::KeyB,
key_cheat_pizza: KeyCode::F1, key_cheat_pizza: KeyCode::F1,
key_cheat_farview1: KeyCode::F2, key_cheat_farview1: KeyCode::F2,
key_cheat_farview2: KeyCode::F3, key_cheat_farview2: KeyCode::F3,

View file

@ -255,6 +255,9 @@ fn handle_cheats(
if key_input.pressed(settings.key_cheat_speed) { 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, 1000.0));
} }
if key_input.pressed(settings.key_cheat_speed_backward) {
v.0 += DVec3::from(trans.rotation * Vec3::new(0.0, 0.0, -1000.0));
}
if key_input.pressed(settings.key_cheat_adrenaline_zero) { if key_input.pressed(settings.key_cheat_adrenaline_zero) {
lifeform.adrenaline = 0.0; lifeform.adrenaline = 0.0;
} }