Bug Tracker – Bug 1234

Team Colors Do Not Switch Teams

Last modified: 2019-07-26 10:44:38 UTC
Bug 1234 - Team Colors Do Not Switch Teams
Summary: Team Colors Do Not Switch Teams
Alias: None
Product: Odamex
Classification: Unclassified
Component: Client (show other bugs)
Version: 0.7.x (Old)
Hardware: Other Other
: P5 normal
Assignee: Odamex Bug Reporter
Depends on:
Blocks: 1231
  Show dependency tree
Reported: 2018-12-23 17:23 UTC by HeX_Vulture
Modified: 2019-07-26 10:44 UTC (History)
4 users (show)

See Also:


Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description HeX_Vulture 2018-12-23 17:23:15 UTC
If you have an enemy team color set (in my case orange) and you switch teams, your team mates will be the color set for enemies and your enemies will be their normal team color.
Comment 1 Dr. Sean 2019-01-05 22:08:32 UTC
I applied a fix for this issue specifically with the use of "changeteams" command. The assumption was that the "cl_team" CVAR callback would be called and player color translations would be rebuilt. However, the cvar_t::Set function doesn't initiate the callback.
Comment 2 Ralph Vickers 2019-01-14 07:14:31 UTC
Sean, your commit introduces a new issue. If an enemy's color's RGB values are all the same, it will not show the correct color. For instance, I use all 3 sliders set to max so that the enemy appears white. Now, they appear red. If I change the values in any way so that all 3 do not match, it will show the correct forced color.
Comment 3 Dr. Sean 2019-01-14 21:10:59 UTC
The previous code was hard-coding the saturation for the blended color at 100% saturation. That lead to wonky results when r_enemycolor was set to a gray-ish hue but was especially evident when set to a color where the saturation value was 0%, like "FF FF FF". The revised code now uses the base color's saturation and hue and only affects the intensity of the color.
Comment 4 Ralph Vickers 2019-01-14 21:19:53 UTC
Tested and can confirm that commit a776835 has resolved the issue. Thanks Sean!
Comment 5 Maëllig Desmottes 2019-07-26 10:44:38 UTC
This Pull request should fix the problem noticed : https://github.com/odamex/odamex/pull/64