forked from Mirrors/openclonk
UseControl: #1873 Prevent use while a menu is opened.
Using objects was blocked by the GUI menus and the ObjectControl() function anyway, but (!) it was not blocked for the old style menus that can still be used.alut-include-path
parent
92e53fe09f
commit
38648dedcc
|
@ -442,6 +442,13 @@ func ControlUse2Script(int ctrl, int x, int y, int strength, bool repeat, int st
|
|||
{
|
||||
if (ctrl == CON_Use || ctrl == CON_UseAlt)
|
||||
{
|
||||
// cancel usage if a menu pops up
|
||||
if (this->~GetMenu())
|
||||
{
|
||||
CancelUse();
|
||||
return true;
|
||||
}
|
||||
|
||||
// standard use
|
||||
if (status == CONS_Down && !repeat)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue