mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Everything damage
This commit is contained in:
parent
8a8a5526f1
commit
6a2796dc17
BIN
assets/common/voxel/carriage/structure.vox
(Stored with Git LFS)
BIN
assets/common/voxel/carriage/structure.vox
(Stored with Git LFS)
Binary file not shown.
@ -146,7 +146,7 @@ impl Body {
|
|||||||
quadruped_low::Species::Deadwood => 140.0,
|
quadruped_low::Species::Deadwood => 140.0,
|
||||||
quadruped_low::Species::Mossdrake => 100.0,
|
quadruped_low::Species::Mossdrake => 100.0,
|
||||||
},
|
},
|
||||||
Body::Ship(ship::Body::Carriage) => 250.0,
|
Body::Ship(ship::Body::Carriage) => 350.0,
|
||||||
Body::Ship(_) => 0.0,
|
Body::Ship(_) => 0.0,
|
||||||
Body::Arthropod(arthropod) => match arthropod.species {
|
Body::Arthropod(arthropod) => match arthropod.species {
|
||||||
arthropod::Species::Tarantula => 135.0,
|
arthropod::Species::Tarantula => 135.0,
|
||||||
|
@ -1593,14 +1593,14 @@ fn box_voxel_collision<T: BaseVol<Vox = Block> + ReadVol>(
|
|||||||
/* if resolve_dir.z > 0.0 && vel.0.z <= 0.0 { */
|
/* if resolve_dir.z > 0.0 && vel.0.z <= 0.0 { */
|
||||||
if resolve_dir.z > 0.0 {
|
if resolve_dir.z > 0.0 {
|
||||||
on_ground = Some(block);
|
on_ground = Some(block);
|
||||||
|
|
||||||
if !was_on_ground {
|
|
||||||
land_on_ground(entity, *vel);
|
|
||||||
}
|
|
||||||
} else if resolve_dir.z < 0.0 && vel.0.z >= 0.0 {
|
} else if resolve_dir.z < 0.0 && vel.0.z >= 0.0 {
|
||||||
on_ceiling = true;
|
on_ceiling = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resolve_dir.magnitude_squared() > 0.0 {
|
||||||
|
land_on_ground(entity, *vel);
|
||||||
|
}
|
||||||
|
|
||||||
// When the resolution direction is non-vertical, we must be colliding
|
// When the resolution direction is non-vertical, we must be colliding
|
||||||
// with a wall
|
// with a wall
|
||||||
//
|
//
|
||||||
|
@ -602,7 +602,7 @@ pub fn handle_land_on_ground(server: &Server, entity: EcsEntity, vel: Vec3<f32>)
|
|||||||
// water. This was added as a *temporary* fix a bug that causes you to take
|
// water. This was added as a *temporary* fix a bug that causes you to take
|
||||||
// fall damage while swimming downwards. FIXME: Fix the actual bug and
|
// fall damage while swimming downwards. FIXME: Fix the actual bug and
|
||||||
// remove the following relevant part of the if statement.
|
// remove the following relevant part of the if statement.
|
||||||
if vel.z <= -30.0
|
if vel.magnitude() >= 30.0
|
||||||
&& ecs
|
&& ecs
|
||||||
.read_storage::<PhysicsState>()
|
.read_storage::<PhysicsState>()
|
||||||
.get(entity)
|
.get(entity)
|
||||||
@ -611,9 +611,9 @@ pub fn handle_land_on_ground(server: &Server, entity: EcsEntity, vel: Vec3<f32>)
|
|||||||
let char_states = ecs.read_storage::<CharacterState>();
|
let char_states = ecs.read_storage::<CharacterState>();
|
||||||
|
|
||||||
let reduced_vel_z = if let Some(CharacterState::DiveMelee(c)) = char_states.get(entity) {
|
let reduced_vel_z = if let Some(CharacterState::DiveMelee(c)) = char_states.get(entity) {
|
||||||
(vel.z + c.static_data.vertical_speed).min(0.0)
|
(vel.magnitude() + c.static_data.vertical_speed).min(0.0)
|
||||||
} else {
|
} else {
|
||||||
vel.z
|
vel.magnitude()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mass = ecs
|
let mass = ecs
|
||||||
|
Loading…
Reference in New Issue
Block a user