remove unnecessary check
This commit is contained in:
parent
8acbd4f33b
commit
9b48112ee6
|
@ -429,7 +429,6 @@ pub fn apply_input_to_player(
|
|||
&mut LinearVelocity,
|
||||
&mut ExternalTorque,
|
||||
Option<&actor::PlayerDrivesThis>,
|
||||
Option<&actor::WantsMaxRotation>,
|
||||
),
|
||||
(With<actor::PlayerCamera>, Without<Camera>),
|
||||
>,
|
||||
|
@ -458,7 +457,7 @@ pub fn apply_input_to_player(
|
|||
DVec3::splat(0.0)
|
||||
};
|
||||
|
||||
if let Ok((player_entity, player_transform, mut engine, mut v, mut torque, bike, maxrot)) =
|
||||
if let Ok((player_entity, player_transform, mut engine, mut v, mut torque, bike)) =
|
||||
q_playercam.get_single_mut()
|
||||
{
|
||||
// Handle key input
|
||||
|
@ -594,12 +593,10 @@ pub fn apply_input_to_player(
|
|||
}
|
||||
|
||||
if settings.rotation_stabilizer_active || key_input.pressed(settings.key_stop) {
|
||||
if maxrot.is_none() {
|
||||
commands
|
||||
.entity(player_entity)
|
||||
.insert(actor::WantsMaxRotation(0.0));
|
||||
}
|
||||
} else if maxrot.is_some() {
|
||||
} else {
|
||||
commands
|
||||
.entity(player_entity)
|
||||
.remove::<actor::WantsMaxRotation>();
|
||||
|
|
Loading…
Reference in a new issue