From c08a47c920cba3887c797e74d184f819bf5e5b55 Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Thu, 25 Apr 2024 15:52:31 +0800 Subject: [PATCH] Allow scripted menu Drawer to write to CVars --- src/common/menu/menu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/menu/menu.cpp b/src/common/menu/menu.cpp index 26ad084c8..ee9a1277e 100644 --- a/src/common/menu/menu.cpp +++ b/src/common/menu/menu.cpp @@ -406,7 +406,9 @@ void DMenu::CallDrawer() IFVIRTUAL(DMenu, Drawer) { VMValue params[] = { (DObject*)this }; + InMenu++; VMCall(func, params, 1, nullptr, 0); + InMenu--; twod->ClearClipRect(); // make sure the scripts don't leave a valid clipping rect behind. } }