mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
rebase with combat merge
Former-commit-id: 04885878ecaffba6b9bd78b2e59512d1914be3b1
This commit is contained in:
parent
c342a7136b
commit
7aab509701
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user