rebase with combat merge

Former-commit-id: 04885878ecaffba6b9bd78b2e59512d1914be3b1
This commit is contained in:
jshipsey 2019-05-26 11:02:01 -04:00
parent c342a7136b
commit 7aab509701
3 changed files with 7 additions and 9 deletions

View File

@ -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;

View File

@ -244,18 +244,18 @@ fn handle_petwolf(server: &mut Server, entity: EcsEntity, args: String, action:
.state
.read_component_cloned::<comp::phys::Pos>(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

View File

@ -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,
)
}