From 7aab509701115aa2cf7465458a19f5776adc8983 Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sun, 26 May 2019 11:02:01 -0400 Subject: [PATCH] rebase with combat merge Former-commit-id: 04885878ecaffba6b9bd78b2e59512d1914be3b1 --- common/src/comp/mod.rs | 2 -- server/src/cmd.rs | 6 +++--- voxygen/src/scene/figure.rs | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 8de7e629d3..1083504ad2 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -20,8 +20,6 @@ pub use inputs::Control; pub use inputs::Gliding; pub use inputs::Jumping; pub use inputs::Respawning; -pub use agent::{Agent, Control}; ->>>>>>> add wolf pub use player::Player; pub use stats::Dying; pub use stats::Stats; diff --git a/server/src/cmd.rs b/server/src/cmd.rs index bc8f64e740..b3e96748ef 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -244,18 +244,18 @@ fn handle_petwolf(server: &mut Server, entity: EcsEntity, args: String, action: .state .read_component_cloned::(entity) { - Some(pos) => { + Some(mut pos) => { + pos.0.x += 1.0; // Temp fix TODO: Solve NaN issue with positions of pets server .create_npc( + pos, "Tobermory".to_owned(), comp::Body::QuadrupedMedium(comp::QuadrupedMediumBody::random()), ) - .with(comp::Control::default()) .with(comp::Agent::Pet { target: entity, offset: Vec2::zero(), }) - .with(pos) .build(); server .clients diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 66d23f22b9..e97d097f9d 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -559,24 +559,24 @@ impl FigureMgr { FigureState::new(renderer, QuadrupedMediumSkeleton::new()) }); - let target_skeleton = match animation_history.current { + let target_skeleton = match animation_info.animation { comp::Animation::Run => quadrupedmedium::RunAnimation::update_skeleton( state.skeleton_mut(), (vel.0.magnitude(), time), - animation_history.time, + animation_info.time, ), comp::Animation::Idle => { quadrupedmedium::IdleAnimation::update_skeleton( state.skeleton_mut(), time, - animation_history.time, + animation_info.time, ) } comp::Animation::Jump => { quadrupedmedium::JumpAnimation::update_skeleton( state.skeleton_mut(), (vel.0.magnitude(), time), - animation_history.time, + animation_info.time, ) }