diff options
-rw-r--r-- | src/game/g_admin.h | 2 | ||||
-rw-r--r-- | src/game/g_cmds.c | 21 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 1d3b254..9a03f2e 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -106,6 +106,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define ADMF_NO_CHAT ".NOCHAT" #define ADMF_NO_VOTE ".NOVOTE" #define ADMF_FAKE_NO_VOTE ".FAKENOVOTE" +#define ADMF_NO_ALIENS ".NOALIENS" +#define ADMF_NO_HUMANS ".NOHUMANS" #define MAX_ADMIN_LISTITEMS 20 #define MAX_ADMIN_SHOWBANS 10 diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index c380b45..4f0f919 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -852,9 +852,11 @@ void Cmd_Team_f( gentity_t *ent ) G_TriggerMenu( ent - g_entities, MN_A_TEAMFULL ); return; } - - team = PTE_ALIENS; + if( G_admin_permission( ent, ADMF_NO_ALIENS ) ) + team = PTE_HUMANS; + else + team = PTE_ALIENS; } else if( !Q_stricmpn( s, "human", 5 ) ) { @@ -883,7 +885,10 @@ void Cmd_Team_f( gentity_t *ent ) return; } - team = PTE_HUMANS; + if( G_admin_permission( ent, ADMF_NO_HUMANS ) ) + team = PTE_ALIENS; + else + team = PTE_HUMANS; } else if( !Q_stricmp( s, "auto" ) ) { @@ -900,6 +905,16 @@ void Cmd_Team_f( gentity_t *ent ) team = PTE_HUMANS; else if( team == PTE_HUMANS && level.humanTeamLocked ) team = PTE_ALIENS; + + if( G_admin_permission( ent, ADMF_NO_ALIENS ) ) + team = PTE_HUMANS; + else + team = PTE_ALIENS; + + if( G_admin_permission( ent, ADMF_NO_HUMANS ) ) + team = PTE_ALIENS; + else + team = PTE_HUMANS; } else { |