cleanup, add TODO
This commit is contained in:
parent
bfad39613e
commit
224e0ce2c9
11
src/actor.rs
11
src/actor.rs
|
@ -560,13 +560,7 @@ fn handle_wants_maxvelocity(
|
|||
}
|
||||
|
||||
fn handle_wants_lookat(
|
||||
mut query: Query<(
|
||||
&Position,
|
||||
&mut Rotation,
|
||||
&Transform,
|
||||
&mut ExternalTorque,
|
||||
&WantsToLookAt,
|
||||
)>,
|
||||
mut query: Query<(&Position, &mut Rotation, &Transform, &WantsToLookAt)>,
|
||||
q_playercam: Query<&Position, With<PlayerCamera>>,
|
||||
id2pos: Res<game::Id2Pos>,
|
||||
) {
|
||||
|
@ -577,7 +571,8 @@ fn handle_wants_lookat(
|
|||
return;
|
||||
};
|
||||
|
||||
for (pos, mut rot, trans, mut _torque, target_id) in &mut query {
|
||||
// TODO: use ExternalTorque rather than hard-resetting the rotation
|
||||
for (pos, mut rot, trans, target_id) in &mut query {
|
||||
let target_pos = if target_id.0 == cmd::ID_SPECIAL_PLAYERCAM {
|
||||
player_pos
|
||||
} else if let Some(target_pos) = id2pos.0.get(&target_id.0) {
|
||||
|
|
Loading…
Reference in a new issue