Merge branch 'attack' into 'master'

Attack fixes

See merge request veloren/veloren!179

Former-commit-id: 97f1e109dcbcbf7f1d860cf3aebae871f93884cf
This commit is contained in:
Timo Koesters 2019-05-26 16:07:08 +00:00
commit 48a905ba86
2 changed files with 3 additions and 16 deletions

View File

@ -215,6 +215,8 @@ impl Server {
for entity in todo_kill {
if let Some(client) = self.clients.get_mut(&entity) {
self.state
.write_component(entity, comp::phys::Vel(Vec3::zero()));
client.force_state(ClientState::Dead);
} else {
self.state.ecs_mut().delete_entity_synced(entity);

View File

@ -585,21 +585,6 @@ impl FigureMgr {
};
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);
}
},
@ -633,7 +618,7 @@ impl FigureMgr {
.join()
{
if stat.is_dead() {
return;
continue;
}
match actor {