summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIronClawTrem <louie.nutman@gmail.com>2020-02-27 23:50:59 +0000
committerIronClawTrem <louie.nutman@gmail.com>2020-02-27 23:50:59 +0000
commit89d24a818535c0c7dc51ac21d1246e2a093c4992 (patch)
tree31cfe4011c8b6b8bd159ba64b4dd17863ddfabd7
parent920a59f036746316426e05fa4b95d0459d067645 (diff)
add .NOALIENS and .NOHUMANS flags
-rw-r--r--src/game/g_admin.h2
-rw-r--r--src/game/g_cmds.c21
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
{