Skip to content
Permalink
Browse files

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.
  • Loading branch information
gitMarky committed Jan 12, 2017
1 parent 92e53fe commit 38648dedccc525c960141bf572ac44722188dafd
Showing with 7 additions and 0 deletions.
  1. +7 −0 planet/Objects.ocd/Libraries.ocd/ClonkUseControl.ocd/Script.c
@@ -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)
{

0 comments on commit 38648de

Please sign in to comment.
You can’t perform that action at this time.