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;
|
||||
bot = IsBot();
|
||||
death_killer = 0;
|
||||
menu = 0;
|
||||
|
||||
memset(flags, 0, sizeof(flags));
|
||||
memset(weapons, 0, sizeof(weapons));
|
||||
|
|
|
@ -86,7 +86,8 @@ public:
|
|||
bool ingame;
|
||||
bool bot;
|
||||
bool authorized;
|
||||
|
||||
bool vgui;
|
||||
|
||||
float time;
|
||||
float playtime;
|
||||
float menuexpire;
|
||||
|
|
|
@ -925,6 +925,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||
{
|
||||
pPlayer->keys = keys;
|
||||
pPlayer->menu = menuid;
|
||||
pPlayer->vgui = false;
|
||||
|
||||
if (time == -1)
|
||||
pPlayer->menuexpire = INFINITE;
|
||||
|
@ -951,7 +952,8 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
|||
{
|
||||
pPlayer->keys = keys;
|
||||
pPlayer->menu = menuid;
|
||||
|
||||
pPlayer->vgui = false;
|
||||
|
||||
if (time == -1)
|
||||
pPlayer->menuexpire = INFINITE;
|
||||
else
|
||||
|
|
|
@ -59,6 +59,8 @@ void Client_VGUIMenu(void* mValue)
|
|||
{
|
||||
if (!mPlayer) return;
|
||||
|
||||
mPlayer->vgui = true;
|
||||
|
||||
switch (mState++)
|
||||
{
|
||||
case 0:
|
||||
|
@ -72,7 +74,9 @@ void Client_VGUIMenu(void* mValue)
|
|||
void Client_ShowMenu(void* mValue)
|
||||
{
|
||||
if (!mPlayer) return;
|
||||
|
||||
|
||||
mPlayer->vgui = true;
|
||||
|
||||
switch (mState++)
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -716,7 +716,7 @@ void C_ClientCommand(edict_t *pEntity)
|
|||
|
||||
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->keys = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user