mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevented jumping airships
This commit is contained in:
parent
1637a5e889
commit
0c5ff2ea11
@ -181,6 +181,13 @@ impl Body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn can_jump(&self) -> bool {
|
||||||
|
match self {
|
||||||
|
Body::Object(_) | Body::Ship(_) => false,
|
||||||
|
_ => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn can_climb(&self) -> bool { matches!(self, Body::Humanoid(_)) }
|
pub fn can_climb(&self) -> bool { matches!(self, Body::Humanoid(_)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,6 +442,7 @@ pub fn handle_jump(data: &JoinData, update: &mut StateUpdate) {
|
|||||||
.in_liquid
|
.in_liquid
|
||||||
.map(|depth| depth > 1.0)
|
.map(|depth| depth > 1.0)
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
|
&& data.body.can_jump()
|
||||||
{
|
{
|
||||||
update
|
update
|
||||||
.local_events
|
.local_events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user