mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
rebase fix
Former-commit-id: b1a1136942ec37647401dfa28682f2ee33b760a2
This commit is contained in:
parent
b4e9359e3f
commit
d179ccbd92
@ -600,57 +600,6 @@ impl FigureMgr {
|
||||
|
||||
state.update(renderer, pos.0, dir.0, col);
|
||||
|
||||
state.update(renderer, pos.0, dir.0, col);
|
||||
}
|
||||
Body::QuadrupedMedium(body) => {
|
||||
let state =
|
||||
self.QuadrupedMedium_states
|
||||
.entry(entity)
|
||||
.or_insert_with(|| {
|
||||
FigureState::new(renderer, QuadrupedMediumSkeleton::new())
|
||||
});
|
||||
|
||||
let target_skeleton = match animation_history.current {
|
||||
comp::Animation::Run => quadrupedmedium::RunAnimation::update_skeleton(
|
||||
state.skeleton_mut(),
|
||||
(vel.0.magnitude(), time),
|
||||
animation_history.time,
|
||||
),
|
||||
comp::Animation::Idle => {
|
||||
quadrupedmedium::IdleAnimation::update_skeleton(
|
||||
state.skeleton_mut(),
|
||||
time,
|
||||
animation_history.time,
|
||||
)
|
||||
}
|
||||
comp::Animation::Jump => {
|
||||
quadrupedmedium::JumpAnimation::update_skeleton(
|
||||
state.skeleton_mut(),
|
||||
(vel.0.magnitude(), time),
|
||||
animation_history.time,
|
||||
)
|
||||
}
|
||||
|
||||
// TODO!
|
||||
_ => state.skeleton_mut().clone(),
|
||||
};
|
||||
|
||||
state.skeleton.interpolate(&target_skeleton);
|
||||
|
||||
// Change in health as color!
|
||||
let col = stats
|
||||
.and_then(|stats| stats.hp.last_change)
|
||||
.map(|(change_by, change_time)| Rgba::new(1.0, 0.7, 0.7, 1.0))
|
||||
.unwrap_or(Rgba::broadcast(1.0));
|
||||
|
||||
// Change in health as color!
|
||||
let col = stats
|
||||
.and_then(|stats| stats.hp.last_change)
|
||||
.map(|(change_by, change_time)| Rgba::new(1.0, 0.7, 0.7, 1.0))
|
||||
.unwrap_or(Rgba::broadcast(1.0));
|
||||
|
||||
state.update(renderer, pos.0, dir.0, col);
|
||||
|
||||
state.update(renderer, pos.0, dir.0, col);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user