Skip to content

Commit

Permalink
Test remove menus
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn committed Feb 1, 2024
1 parent 0091de1 commit 9f2583c
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions LogApi/ReGameDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,43 +111,43 @@ CGameRules *ReGameDLL_InstallGameRules(IReGameHook_InstallGameRules *chain)

void ReGameDLL_InternalCommand(IReGameHook_InternalCommand* chain, edict_t* pEntity, const char* pcmd, const char* parg1)
{
// If is not null
if (pcmd)
{
// If string is not empty
if (pcmd[0u] != '\0')
{
// If is menuselect command
if (Q_stricmp(pcmd, "menuselect") == 0)
{
// If is not null
if (parg1)
{
// If entity is not null
if (!FNullEnt(pEntity))
{
// Get player entity
auto Player = UTIL_PlayerByIndexSafe(ENTINDEX(pEntity));

// if is not null
if (Player)
{
// If native CS menu is not being displayed
if (Player->m_iMenu == Menu_OFF)
{
// Handle menu
if (gLogMenu[Player->entindex()].Handle(Player->entindex(), Q_atoi(parg1)))
{
// Block original function call
return;
}
}
}
}
}
}
}
}
//// If is not null
//if (pcmd)
//{
// // If string is not empty
// if (pcmd[0u] != '\0')
// {
// // If is menuselect command
// if (Q_stricmp(pcmd, "menuselect") == 0)
// {
// // If is not null
// if (parg1)
// {
// // If entity is not null
// if (!FNullEnt(pEntity))
// {
// // Get player entity
// auto Player = UTIL_PlayerByIndexSafe(ENTINDEX(pEntity));

// // if is not null
// if (Player)
// {
// // If native CS menu is not being displayed
// if (Player->m_iMenu == Menu_OFF)
// {
// // Handle menu
// if (gLogMenu[Player->entindex()].Handle(Player->entindex(), Q_atoi(parg1)))
// {
// // Block original function call
// return;
// }
// }
// }
// }
// }
// }
// }
//}

// Call original function
chain->callNext(pEntity, pcmd, parg1);
Expand Down

0 comments on commit 9f2583c

Please sign in to comment.