- Added back the code to allow some variation to the players' shades when

players are on teams.
- Set TEAM_None back to 255. Since a player's team has already been accessible
  through ACS, needlessly redefining this is a bad thing to do, since it can
  break existing maps. 255 different teams should still be more than enough.
- Fixed: At certain resolutions, there was a one pixel row between the status
  bar and the rest of the screen, thanks to rounding error.
- Added automatic batching of quads to D3DFB. Screens with a lot of text are
  ever-so-slightly faster now, though still only about half the speed of
  sofware-only text. I suppose the only way to see a marked improvement is
  going to be by stuffing multiple glyphs in a single texture.
- Fixed: Crosshairgrow's animation was not framerate-independent.


SVN r668 (trunk)
This commit is contained in:
Randy Heit 2008-01-06 04:03:33 +00:00
commit 51461aa010
10 changed files with 452 additions and 127 deletions

View file

@ -54,6 +54,7 @@
#include "m_random.h"
#include "teaminfo.h"
#include "r_translate.h"
#include "templates.h"
static FRandom pr_pickteam ("PickRandomTeam");
@ -185,10 +186,25 @@ int D_PlayerClassToInt (const char *classname)
void D_GetPlayerColor (int player, float *h, float *s, float *v)
{
userinfo_t *info = &players[player].userinfo;
int color = teamplay ? teams[info->team].playercolor : info->color;
int color = info->color;
RGBtoHSV (RPART(color)/255.f, GPART(color)/255.f, BPART(color)/255.f,
h, s, v);
if (teamplay && TEAMINFO_IsValidTeam(info->team))
{
// In team play, force the player to use the team's hue
// and adjust the saturation and value so that the team
// hue is visible in the final color.
float ts, tv;
int tcolor = teams[info->team].playercolor;
RGBtoHSV (RPART(tcolor)/255.f, GPART(tcolor)/255.f, BPART(tcolor)/255.f,
h, &ts, &tv);
*s = clamp(ts + *s * 0.15f - 0.075f, 0.f, 1.f);
*v = clamp(tv + *v * 0.5f - 0.25f, 0.f, 1.f);
}
}
// Find out which teams are present. If there is only one,
@ -284,7 +300,7 @@ static void UpdateTeam (int pnum, int team, bool update)
int oldteam;
if (team < TEAM_None)
if (team < 0)
{
team = TEAM_None;
}