veloren/common
Ben Frankel 823141f825 Maintain character state when inventory is modified
If the mainhand slot is swapped out or dropped while the character is
wielding, the character will be set to idle (same behavior). However, if
an item is picked up or used; or a non-mainhand item is dropped; or two
non-mainhand items are swapped; the character state will not be set to
idle (new behavior).

Rationale for keeping the same behavior:

Swapping a weapon out while in a wielding state can put the player in a
barehanded wielding state, which would be inconsistent with the fact
that that state can't be entered by toggling wield while barehanded.

Rationale for setting the new behavior:

Setting character state to idle was originally added because "Interact"
was mapped to right mouse button, so picking up an item with RMB would
also activate secondary attack if the player was wielding during the
interaction. Now the default keybinding for "Interact" is E, so this
isn't a problem unless the player changes their keybinding to RMB.

In addition, setting character state to idle for any inventory
manipulation may cause players to fall out of glider unexpectedly.
2020-07-07 09:43:48 -07:00
..
benches apply new rustfmt - touching alot of files 2020-02-01 21:39:39 +01:00
src Maintain character state when inventory is modified 2020-07-07 09:43:48 -07:00
build.rs nix: Switch to crate2nix, and niv for dependency management 2020-06-23 20:51:32 +03:00
Cargo.toml fix specs 2020-07-07 14:28:00 +02:00