- fixed: OptionMenuItemSafeCommand did not allow unsafe commands.

This commit is contained in:
Christoph Oelckers 2019-03-30 09:25:48 +01:00 committed by drfrag
parent 80d8962818
commit 9ea041897c

View file

@ -171,7 +171,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
override bool Activate()
{
// This needs to perform a few checks to prevent abuse by malicious modders.
// This needs to perform a few checks to prevent abuse by malicious modders.
if (GetClass() != "OptionMenuItemSafeCommand")
{
let m = OptionMenu(Menu.GetCurrentMenu());
@ -180,6 +180,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu
// don't execute if this item cannot be found in the current menu.
if (m.GetItem(mAction) != self) return false;
}
else mUnsafe = false;
Menu.MenuSound("menu/choose");
DoCommand(ccmd, mUnsafe);
if (mCloseOnSelect)