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
Mark 2017-01-13 00:05:35 +01:00
parent 92e53fe09f
commit 38648dedcc
1 changed files with 7 additions and 0 deletions

View File

@ -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)
{