mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'unvariant/trading_fix' into 'master'
prevent glider and sneak from triggering during trade See merge request veloren/veloren!3264
This commit is contained in:
commit
d05cb99007
@ -1116,6 +1116,8 @@ impl Client {
|
||||
&self.pending_trade
|
||||
}
|
||||
|
||||
pub fn is_trading(&self) -> bool { self.pending_trade.is_some() }
|
||||
|
||||
pub fn send_invite(&mut self, invitee: Uid, kind: InviteKind) {
|
||||
self.send_msg(ClientGeneral::ControlEvent(ControlEvent::InitiateInvite(
|
||||
invitee, kind,
|
||||
|
@ -599,7 +599,8 @@ impl PlayState for SessionState {
|
||||
}
|
||||
},
|
||||
GameInput::Sneak => {
|
||||
if state {
|
||||
let is_trading = self.client.borrow().is_trading();
|
||||
if state && !is_trading {
|
||||
self.stop_auto_walk();
|
||||
self.client.borrow_mut().toggle_sneak();
|
||||
}
|
||||
@ -629,7 +630,8 @@ impl PlayState for SessionState {
|
||||
self.key_state.right = state
|
||||
},
|
||||
GameInput::Glide => {
|
||||
if state {
|
||||
let is_trading = self.client.borrow().is_trading();
|
||||
if state && !is_trading {
|
||||
if global_state.settings.gameplay.stop_auto_walk_on_input {
|
||||
self.stop_auto_walk();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user