mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-24 20:58:06 +03:00
zomg fix for oldmenus^2
This commit is contained in:
parent
94308b208a
commit
778c2080b0
@ -90,6 +90,7 @@ bool CPlayer::Connect(const char* connectname, const char* ipaddress)
|
|||||||
time = gpGlobals->time;
|
time = gpGlobals->time;
|
||||||
bot = IsBot();
|
bot = IsBot();
|
||||||
death_killer = 0;
|
death_killer = 0;
|
||||||
|
menu = 0;
|
||||||
|
|
||||||
memset(flags, 0, sizeof(flags));
|
memset(flags, 0, sizeof(flags));
|
||||||
memset(weapons, 0, sizeof(weapons));
|
memset(weapons, 0, sizeof(weapons));
|
||||||
|
@ -86,7 +86,8 @@ public:
|
|||||||
bool ingame;
|
bool ingame;
|
||||||
bool bot;
|
bool bot;
|
||||||
bool authorized;
|
bool authorized;
|
||||||
|
bool vgui;
|
||||||
|
|
||||||
float time;
|
float time;
|
||||||
float playtime;
|
float playtime;
|
||||||
float menuexpire;
|
float menuexpire;
|
||||||
|
@ -925,6 +925,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
pPlayer->keys = keys;
|
pPlayer->keys = keys;
|
||||||
pPlayer->menu = menuid;
|
pPlayer->menu = menuid;
|
||||||
|
pPlayer->vgui = false;
|
||||||
|
|
||||||
if (time == -1)
|
if (time == -1)
|
||||||
pPlayer->menuexpire = INFINITE;
|
pPlayer->menuexpire = INFINITE;
|
||||||
@ -951,7 +952,8 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
pPlayer->keys = keys;
|
pPlayer->keys = keys;
|
||||||
pPlayer->menu = menuid;
|
pPlayer->menu = menuid;
|
||||||
|
pPlayer->vgui = false;
|
||||||
|
|
||||||
if (time == -1)
|
if (time == -1)
|
||||||
pPlayer->menuexpire = INFINITE;
|
pPlayer->menuexpire = INFINITE;
|
||||||
else
|
else
|
||||||
|
@ -59,6 +59,8 @@ void Client_VGUIMenu(void* mValue)
|
|||||||
{
|
{
|
||||||
if (!mPlayer) return;
|
if (!mPlayer) return;
|
||||||
|
|
||||||
|
mPlayer->vgui = true;
|
||||||
|
|
||||||
switch (mState++)
|
switch (mState++)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -72,7 +74,9 @@ void Client_VGUIMenu(void* mValue)
|
|||||||
void Client_ShowMenu(void* mValue)
|
void Client_ShowMenu(void* mValue)
|
||||||
{
|
{
|
||||||
if (!mPlayer) return;
|
if (!mPlayer) return;
|
||||||
|
|
||||||
|
mPlayer->vgui = true;
|
||||||
|
|
||||||
switch (mState++)
|
switch (mState++)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -716,7 +716,7 @@ void C_ClientCommand(edict_t *pEntity)
|
|||||||
|
|
||||||
if (pPlayer->keys & bit_key)
|
if (pPlayer->keys & bit_key)
|
||||||
{
|
{
|
||||||
if ((pPlayer->menu > 0) && (gpGlobals->time > pPlayer->menuexpire))
|
if ((pPlayer->menu > 0 && !pPlayer->vgui) && (gpGlobals->time > pPlayer->menuexpire))
|
||||||
{
|
{
|
||||||
pPlayer->menu = 0;
|
pPlayer->menu = 0;
|
||||||
pPlayer->keys = 0;
|
pPlayer->keys = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user