Bug Tracker – Bug 804

Removing cl_team and server-side player color forcing.

Last modified: 2012-03-18 21:46:49 CDT
Bug 804 - (ARRAY(0x531e688)) Removing cl_team and server-side player color forcing.
(ARRAY(0x531e688))
Removing cl_team and server-side player color forcing.
Status: NEW
Product: Odamex
Classification: Unclassified
Component: Server & Client
(old) 0.6-dev
All All
: P1 normal
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-03-18 21:46:49 CDT by Alexander Mayfield
Modified: 2012-03-18 21:46 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mayfield 2012-03-18 21:46:49 CDT
Doing some work on my voting branch has brought to light some really weird behavior on the part of teams.  Players can currently set a 'preferred team' in their player information/through 'cl_team', and it results in some really odd behavior if you try and force a team from the server.  I've also somehow managed to inexplicably join TEAM_NONE occasionally.

I propose the following updates to the implementation of teams in Odamex:
* Remove the client's 'cl_team' variable completely.  On connect, instead of having a preferred team, the server automatically places the client on a team that needs ingame players, or alternatively a random team if both teams are identical.  On mapchange, the server does not touch the players' team.
* 'join' or pressing use should join the game on the team that the player is currently spectating, like it does now.  However, there should also be a way to manually join a particular team by using 'join <teanmame>'.  The combination of this and the above bullet point ensures that players don't teamstack by accident like they do now, while allowing people to easily join teams like they do through cl_team if they wanted to.
* The server should not "force" player colors at any point the way SV_CheckTeam() does now.  Coloring players should be the duty of the client instead.
* There was a suggestion bounced around as a potential new feature to go along with clientside team coloring was to take the players' color and generate a 'team color' from it that was within a specific range instead of simply bright red or blue.  This would allow you to be able to tell your teammates and enemies apart more easily.
* And of course, this opens the door for player color forcing.  But that's another bug entirely.

Sean mentioned that these changes would be around 2 hours to make, and something I think would be worthwhile to do before 0.6 comes out.  Failing that, if we don't have time to address this fully for 0.6, it is probably a good idea for 0.6 to ensure that the default value of cl_team to be none, as I believe it was BLUE in 0.5.6.