diff options
Diffstat (limited to 'src/game/g_utils.c')
-rw-r--r-- | src/game/g_utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/g_utils.c b/src/game/g_utils.c index a74df3f..272c968 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -162,6 +162,17 @@ void G_TeamCommand( pTeam_t team, char *cmd ) { if( level.clients[ i ].pers.connected == CON_CONNECTED ) { + if (level.clients[i].pers.control > 0) + { + int j = level.clients[i].pers.control - 1; + + if (level.clients[j].pers.teamSelection == team + || (level.clients[j].pers.teamSelection == PTE_NONE + && G_admin_permission(&g_entities[j], ADMF_SPEC_ALLCHAT))) + { + continue; + } + } if( level.clients[ i ].pers.teamSelection == team || ( level.clients[ i ].pers.teamSelection == PTE_NONE && G_admin_permission( &g_entities[ i ], ADMF_SPEC_ALLCHAT ) ) ) @@ -828,6 +839,10 @@ void G_TriggerMenu( int clientNum, dynMenu_t menu ) { char buffer[ 32 ]; + clientPersistant_t *p = &g_clients[clientNum].pers; + if (p->control > 0 || (p->isPlaceholder && p->control >= 0)) + return; + Com_sprintf( buffer, 32, "servermenu %d", menu ); trap_SendServerCommand( clientNum, buffer ); } |