Merge branch 'telastrus/underwater-jump' into 'master'

Jump while underwater

See merge request veloren/veloren!661
This commit is contained in:
Justin Shipsey 2019-11-22 14:23:47 +00:00
commit 8ef5709c1b

View File

@ -362,7 +362,9 @@ impl<'a> System<'a> for Sys {
}
// Jump
if inputs.jump && physics.on_ground && vel.0.z <= 0.0 && !character.movement.is_roll() {
if (inputs.jump && physics.on_ground && vel.0.z <= 0.0 && !character.movement.is_roll())
|| (inputs.jump && character.movement == Swim)
{
local_emitter.emit(LocalEvent::Jump(entity));
}