fix velocity after using stop cheat
This commit is contained in:
parent
79351dc4d0
commit
91bf2ddc54
|
@ -271,6 +271,7 @@ fn handle_cheats(
|
||||||
>,
|
>,
|
||||||
mut ew_playerdies: EventWriter<PlayerDiesEvent>,
|
mut ew_playerdies: EventWriter<PlayerDiesEvent>,
|
||||||
mut settings: ResMut<Settings>,
|
mut settings: ResMut<Settings>,
|
||||||
|
jupiter_pos: Res<JupiterPos>,
|
||||||
id2pos: Res<Id2Pos>,
|
id2pos: Res<Id2Pos>,
|
||||||
id2v: Res<Id2V>,
|
id2v: Res<Id2V>,
|
||||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||||
|
@ -297,7 +298,7 @@ fn handle_cheats(
|
||||||
|
|
||||||
if key_input.just_pressed(settings.key_cheat_stop) {
|
if key_input.just_pressed(settings.key_cheat_stop) {
|
||||||
gforce.ignore_gforce_seconds = 1.0;
|
gforce.ignore_gforce_seconds = 1.0;
|
||||||
v.0 = DVec3::ZERO;
|
v.0 = nature::orbital_velocity(pos.0 - jupiter_pos.0, nature::JUPITER_MASS);
|
||||||
}
|
}
|
||||||
if key_input.pressed(settings.key_cheat_speed)
|
if key_input.pressed(settings.key_cheat_speed)
|
||||||
|| key_input.pressed(settings.key_cheat_speed_backward)
|
|| key_input.pressed(settings.key_cheat_speed_backward)
|
||||||
|
|
Loading…
Reference in a new issue