Drop() doesn't work when an item is held (with the mouse)
I'm trying to drop an item via script, but it doesn't work when the PC helds it in it's hands (not equipped). Here's the code snippet
if ( player->GetEffect sEffectCharm == 0 ) ; gets true when the item is unequipped
player->Drop foo 1
What happens here is, that - although foo is dropped by the script - the items icon still sticks on the mouse pointer until you click into the inventory window. I'd assume that Drop() means: drop it right before the next frame. If an item is dropped here - only when the player does an action (like click on the ground) in order to make the item be dropped - Drop() is useless.
Bug confirmed: https://forum.openmw.org/viewtopic.php?f=2&t=3258&p=36286#p36286
- Category set to GUI
- Target version set to openmw-0.38
- Target version changed from openmw-0.38 to openmw-0.39
- Target version changed from openmw-0.39 to openmw-0.40
- Target version changed from openmw-0.40 to openmw-0.41
- Target version changed from openmw-0.41 to openmw-0.42
- Target version changed from openmw-0.42 to openmw-0.43
This should be easy to solve by checking if the item has been deleted (count 0) in the drag-and-drop handler every frame, and if so, stop dragging.
- Target version deleted (
- Status changed from New to Confirmed
- Status changed from Confirmed to Resolved
- Assignee set to scrawl .
- Target version set to openmw-0.43
- % Done changed from 0 to 100
- Operating system changed from Linux to Other
- Status changed from Resolved to Closed
Also available in: Atom