From: MirceaKitsune Date: Sun, 29 Jan 2012 21:47:25 +0000 (+0200) Subject: Cvars and code comments X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=efc20bdbfdf97b4971dc03897fb553db8442f6cf;p=voretournament%2Fvoretournament.git Cvars and code comments --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index a683bf8f..22d1a635 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1232,6 +1232,8 @@ seta sbar_ring2_scale 80 "scale of the second HUD ring" seta sbar_ring2_text_scale 10 "scale of the text on the second HUD ring" seta sbar_ring2_alpha 0.75 "alpha of the second HUD ring" seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted" +seta sbar_portrait 1 "enables portraits" +seta sbar_portrait_time 5 "how long a portrait lasts on the screen" // for menu server list (eventually make them have engine support?) seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join" diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index 18f76f8d..58c1d378 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -1682,10 +1682,15 @@ void Sbar_DrawRaceStatus(vector pos) void Sbar_Portrait() { + // draws the portrait, using the values set in Ent_ReadPortrait + vector left; left_x = 0; left_y = vid_conheight / 2; + if(!cvar("sbar_portrait")) + return; + if(portrait_time) { drawpic(left + '10 -80 0', portrait_image, '120 160 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -3570,6 +3575,8 @@ void CSQC_race_hud(void) void Ent_ReadPortrait() { + // receives portrait values, which are used in Sbar_Portrait + string pl_model, pl_name, img; float pl_skin;