mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made behaviour during GlideWield more clean
This commit is contained in:
parent
29ca171256
commit
3eee002fa3
@ -192,8 +192,15 @@ fn maintain_if_gliding(bdata: &mut BehaviorData) -> bool {
|
|||||||
.glider_flight(bdata.controller, bdata.read_data);
|
.glider_flight(bdata.controller, bdata.read_data);
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
CharacterState::GlideWield(_) if bdata.agent_data.physics_state.on_ground.is_some() => {
|
CharacterState::GlideWield(_) => {
|
||||||
|
if bdata.agent_data.physics_state.on_ground.is_some() {
|
||||||
bdata.controller.push_action(ControlAction::Unwield);
|
bdata.controller.push_action(ControlAction::Unwield);
|
||||||
|
}
|
||||||
|
// Always stop execution if during GlideWield.
|
||||||
|
// - If on ground, the line above will unwield the glider on next
|
||||||
|
// tick
|
||||||
|
// - If in air, we probably wouldn't want to do anything anyway, as
|
||||||
|
// character state code will shift itself to glide on next tick
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
_ => false,
|
_ => false,
|
||||||
|
Loading…
Reference in New Issue
Block a user