diff --git a/dlls/client.cpp b/dlls/client.cpp index 98e7a5e4..22d49a7f 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -523,6 +523,7 @@ void ClientCommand( edict_t *pEntity ) if ( FStrEq(pcmd, "say" ) ) { Host_Say( pEntity, 0 ); + GGM_Say(pEntity); } else if ( FStrEq(pcmd, "say_team" ) ) { diff --git a/dlls/gravgunmod.cpp b/dlls/gravgunmod.cpp index f699c8a1..c30e2821 100644 --- a/dlls/gravgunmod.cpp +++ b/dlls/gravgunmod.cpp @@ -426,6 +426,24 @@ extern "C" const char *CMD_ARGV( int i ) return g_engfuncs.pfnCmd_Argv( i ); } +// client.cpp +void ClientCommand( edict_t *pEntity ); + +// Allow say /command as alias to command +void GGM_Say( edict_t *pEntity ) +{ + const char *args = CMD_ARGS(); + + if( !args || strlen( args ) < 2 ) + return; + + if( args[1] != '/' ) + return; + + GGM::Cmd_TokenizeString( args + 2 ); + ClientCommand( pEntity ); + GGM::Cmd_Reset(); +} GGM_PlayerMenu &GGM_PlayerMenu::Add(const char *name, const char *command) @@ -491,9 +509,6 @@ void GGM_PlayerMenu::Show() } } -// client.cpp -void ClientCommand( edict_t *pEntity ); - bool GGM_PlayerMenu::MenuSelect( int select ) { if( select > m_iCount || select < 1 ) diff --git a/dlls/gravgunmod.h b/dlls/gravgunmod.h index e388a0ee..53ac5827 100644 --- a/dlls/gravgunmod.h +++ b/dlls/gravgunmod.h @@ -26,6 +26,7 @@ void GGM_ClientPutinServer(edict_t *pEntity , CBasePlayer *pPlayer); void GGM_ClientFirstSpawn(CBasePlayer *pPlayer ); const char *GGM_GetPlayerID( edict_t *player ); edict_t *GGM_PlayerByID( const char *id ); +void GGM_Say( edict_t *pEntity ); enum PlayerState { STATE_UNINITIALIZED = 0, diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index c7c2bdbd..abc4637e 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -524,7 +524,7 @@ void CHalfLifeMultiplay::InitHUD( CBasePlayer *pl ) { pl->gravgunmod_data.m_iMenuState = MENUSTATE_COOPMENU_SPEC; - if( mp_coop.value ) + if( mp_coop.value && !pl->gravgunmod_data.m_fTouchMenu ) { const char *menu[] = { "Join coop",