mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Fix unexpected behaviors when a game menu is overlapped with custom one (bug 3199, r=me)
This commit is contained in:
parent
4c3fc7eb97
commit
96390761d3
@ -1058,6 +1058,11 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
||||
|
||||
if (pPlayer->ingame)
|
||||
{
|
||||
pPlayer->keys = 0;
|
||||
pPlayer->menu = 0;
|
||||
|
||||
UTIL_FakeClientCommand(pPlayer->pEdict, "menuselect", "10", 0);
|
||||
|
||||
pPlayer->keys = keys;
|
||||
pPlayer->menu = menuid;
|
||||
pPlayer->vgui = false;
|
||||
@ -1085,6 +1090,11 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
||||
|
||||
if (pPlayer->ingame)
|
||||
{
|
||||
pPlayer->keys = 0;
|
||||
pPlayer->menu = 0;
|
||||
|
||||
UTIL_FakeClientCommand(pPlayer->pEdict, "menuselect", "10", 0);
|
||||
|
||||
pPlayer->keys = keys;
|
||||
pPlayer->menu = menuid;
|
||||
pPlayer->vgui = false;
|
||||
|
@ -305,6 +305,11 @@ bool Menu::Display(int player, page_t page)
|
||||
|
||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(player);
|
||||
|
||||
pPlayer->keys = 0;
|
||||
pPlayer->menu = 0;
|
||||
|
||||
UTIL_FakeClientCommand(pPlayer->pEdict, "menuselect", "10", 0);
|
||||
|
||||
pPlayer->keys = keys;
|
||||
pPlayer->menu = menuId;
|
||||
pPlayer->newmenu = thisId;
|
||||
|
Loading…
Reference in New Issue
Block a user