mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Make falldamage local, don't use force update for local, cleanup
This commit is contained in:
@ -243,19 +243,6 @@ impl Server {
|
||||
let clients = &mut self.clients;
|
||||
|
||||
match event {
|
||||
ServerEvent::LandOnGround { entity, vel } => {
|
||||
if let Some(stats) = state
|
||||
.ecs_mut()
|
||||
.write_storage::<comp::Stats>()
|
||||
.get_mut(entity)
|
||||
{
|
||||
let falldmg = (vel.z / 1.5 + 10.0) as i32;
|
||||
if falldmg < 0 {
|
||||
stats.health.change_by(falldmg, comp::HealthSource::World);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ServerEvent::Explosion { pos, radius } => {
|
||||
const RAYS: usize = 500;
|
||||
|
||||
|
Reference in New Issue
Block a user