mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 17:31:08 +00:00
Spawn a green dlight for chatting players.
It's not very big, and shows as green only in gl, but at least there's some indication until I sort out icons etc.
This commit is contained in:
parent
891500ac58
commit
7eaa6b72d6
3 changed files with 13 additions and 2 deletions
|
@ -67,6 +67,7 @@ typedef struct player_info_s {
|
|||
// scoreboard information
|
||||
struct info_key_s *name;
|
||||
struct info_key_s *team;
|
||||
struct info_key_s *chat;
|
||||
float entertime;
|
||||
int frags;
|
||||
int ping;
|
||||
|
|
|
@ -424,8 +424,16 @@ CL_LinkPlayers (void)
|
|||
VectorCopy (state->pls.origin, org);
|
||||
clientplayer = false;
|
||||
}
|
||||
CL_NewDlight (j + 1, org, state->pls.effects, state->pls.glow_size,
|
||||
state->pls.glow_color);
|
||||
if (info->chat && info->chat->value[0] != '0') {
|
||||
dlight_t *dl = r_funcs->R_AllocDlight (j + 1);
|
||||
VectorCopy (org, dl->origin);
|
||||
dl->radius = 100;
|
||||
dl->die = cl.time + 0.1;
|
||||
QuatSet (0.0, 1.0, 0.0, 1.0, dl->color);
|
||||
} else {
|
||||
CL_NewDlight (j + 1, org, state->pls.effects, state->pls.glow_size,
|
||||
state->pls.glow_color);
|
||||
}
|
||||
|
||||
// Draw player?
|
||||
if (!Cam_DrawPlayer (j))
|
||||
|
|
|
@ -1102,6 +1102,8 @@ CL_ProcessUserInfo (int slot, player_info_t *player)
|
|||
Info_SetValueForKey (player->userinfo, "team", "", 1);
|
||||
while (!(player->skinname = Info_Key (player->userinfo, "skin")))
|
||||
Info_SetValueForKey (player->userinfo, "skin", "", 1);
|
||||
while (!(player->chat = Info_Key (player->userinfo, "chat")))
|
||||
Info_SetValueForKey (player->userinfo, "chat", "0", 1);
|
||||
|
||||
if (Info_ValueForKey (player->userinfo, "*spectator")[0])
|
||||
player->spectator = true;
|
||||
|
|
Loading…
Reference in a new issue