diff options
author | M. Kristall <mkpdev@gmail.com> | 2010-03-26 03:30:02 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:32 +0000 |
commit | 31922eb1d2b923221401e5b7d06775f2899f5055 (patch) | |
tree | a1005389ebe4078d852193d9e3157fb5a0a6eabd | |
parent | 05ef75b546fd025f9e46f4088829e4296ad9047e (diff) |
* Revert revision 1965 and parts of revisions 1962 and 1966 since muted players
should be allowed to join/switch teams
-rw-r--r-- | src/game/g_cmds.c | 6 | ||||
-rw-r--r-- | src/game/g_local.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 097fa836..4a3a1822 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -530,6 +530,10 @@ void Cmd_Team_f( gentity_t *ent ) else if( oldteam == TEAM_HUMANS ) humans--; + // stop team join spam + if( level.time - ent->client->pers.teamChangeTime < 1000 ) + return; + // disallow joining teams during warmup if( g_doWarmup.integer && ( ( level.warmupTime - level.time ) / 1000 ) > 0 ) { @@ -2872,7 +2876,7 @@ commands_t cmds[ ] = { { "score", CMD_INTERMISSION, ScoreboardMessage }, { "sell", CMD_HUMAN|CMD_LIVING, Cmd_Sell_f }, { "setviewpos", CMD_CHEAT_TEAM, Cmd_SetViewpos_f }, - { "team", CMD_MESSAGE, Cmd_Team_f }, + { "team", 0, Cmd_Team_f }, { "teamvote", CMD_TEAM, Cmd_Vote_f }, { "test", CMD_CHEAT, Cmd_Test_f }, { "unignore", 0, Cmd_Ignore_f }, diff --git a/src/game/g_local.h b/src/game/g_local.h index a4acf39b..9ee9e043 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -317,6 +317,7 @@ typedef struct weapon_t humanItemSelection; // humans have a starting item team_t teamSelection; // player team (copied to ps.stats[ STAT_TEAM ]) + int teamChangeTime; // level.time of last team change namelog_t *namelog; g_admin_admin_t *admin; |