diff --git a/wadsrc/static/zscript/menu/optionmenuitems.txt b/wadsrc/static/zscript/menu/optionmenuitems.txt index f08dca713..3405ae549 100644 --- a/wadsrc/static/zscript/menu/optionmenuitems.txt +++ b/wadsrc/static/zscript/menu/optionmenuitems.txt @@ -126,9 +126,12 @@ class OptionMenuItemSubmenu : OptionMenuItem class OptionMenuItemCommand : OptionMenuItemSubmenu { + private String ccmd; // do not allow access to this from the outside. + OptionMenuItemCommand Init(String label, Name command, bool centered = false) { Super.Init(label, command, 0, centered); + ccmd = command; return self; } @@ -146,7 +149,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu if (m.GetItem(mAction) != self) return false; } Menu.MenuSound("menu/choose"); - DoCommand(mAction); + DoCommand(ccmd); return true; }