mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Addressed comments
This commit is contained in:
parent
93642428f2
commit
7af561263d
@ -343,10 +343,10 @@ impl<'a> System<'a> for Sys {
|
||||
) {
|
||||
controller.actions.push(ControlAction::Wield);
|
||||
|
||||
let eye_offset = body.map_or(1.0, |b| b.eye_height());
|
||||
let eye_offset = body.map_or(0.0, |b| b.eye_height());
|
||||
|
||||
let tgt_eye_offset =
|
||||
bodies.get(*target).map_or(1.0, |b| b.eye_height());
|
||||
bodies.get(*target).map_or(0.0, |b| b.eye_height());
|
||||
|
||||
let distance_offset = match tactic {
|
||||
Tactic::Bow => 0.0004 * pos.0.distance_squared(tgt_pos.0),
|
||||
|
@ -118,8 +118,7 @@ pub fn handle_shoot(
|
||||
.ecs()
|
||||
.read_storage::<comp::Body>()
|
||||
.get(entity)
|
||||
.map(|b| b.scale())
|
||||
.unwrap_or(1.0);
|
||||
.map_or(0.0, |b| b.scale());
|
||||
|
||||
pos.z += eye_height;
|
||||
|
||||
|
@ -472,16 +472,14 @@ impl Scene {
|
||||
.ecs()
|
||||
.read_storage::<comp::Body>()
|
||||
.get(scene_data.player_entity)
|
||||
.map(|b| b.scale())
|
||||
.unwrap_or(1.0);
|
||||
.map_or(1.0, |b| b.scale());
|
||||
|
||||
let eye_height = scene_data
|
||||
.state
|
||||
.ecs()
|
||||
.read_storage::<comp::Body>()
|
||||
.get(scene_data.player_entity)
|
||||
.map(|b| b.eye_height())
|
||||
.unwrap_or(1.0);
|
||||
.map_or(0.0, |b| b.eye_height());
|
||||
|
||||
// Add the analog input to camera
|
||||
self.camera
|
||||
|
Loading…
Reference in New Issue
Block a user