From: MirceaKitsune Date: Sun, 26 Sep 2010 13:49:24 +0000 (+0300) Subject: Draw artwork behind the scoreboard X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2954c18c01a7108f337a7a4b05c43489d9b657ec;p=voretournament%2Fvoretournament.git Draw artwork behind the scoreboard --- diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 45e39d81..b73e51f0 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -489,6 +489,44 @@ void CSQC_UpdateView(float w, float h) ) teamradar_view(); + // Draw Artwork + if(intermission && !isdemo()) // match has ended + { + if(artwork_image == "") + { + if(getstati(STAT_WINNING)) + artwork_image = strcat("gfx/artwork_won_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!! + else + artwork_image = strcat("gfx/artwork_lost_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!! + artwork_image = strzone(artwork_image); + } + + if(cvar("cl_artwork_stretch")) + { + artwork_size_x = vid_conwidth; + artwork_size_y = vid_conheight; + artwork_pos_x = 0; + artwork_pos_y = 0; + } + else + { + artwork_size_x = max(vid_conwidth, vid_conheight); + artwork_size_y = max(vid_conwidth, vid_conheight); + artwork_pos_x = (vid_conwidth - artwork_size_x) / 2; + artwork_pos_y = (vid_conheight - artwork_size_y) / 2; + } + + drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL); + } + else + { + if(artwork_image != "") + { + strunzone(artwork_image); + artwork_image = ""; + } + } + // draw sbar if(cvar("r_letterbox") == 0) { if (cvar("cl_showpressedkeys")) { // draw pressed keys when spectating and playing @@ -678,44 +716,6 @@ void CSQC_UpdateView(float w, float h) } } - // Draw Artwork - if(intermission && !isdemo()) // match has ended - { - if(artwork_image == "") - { - if(getstati(STAT_WINNING)) - artwork_image = strcat("gfx/artwork_won_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!! - else - artwork_image = strcat("gfx/artwork_lost_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!! - artwork_image = strzone(artwork_image); - } - - if(cvar("cl_artwork_stretch")) - { - artwork_size_x = vid_conwidth; - artwork_size_y = vid_conheight; - artwork_pos_x = 0; - artwork_pos_y = 0; - } - else - { - artwork_size_x = max(vid_conwidth, vid_conheight); - artwork_size_y = max(vid_conwidth, vid_conheight); - artwork_pos_x = (vid_conwidth - artwork_size_x) / 2; - artwork_pos_y = (vid_conheight - artwork_size_y) / 2; - } - - drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL); - } - else - { - if(artwork_image != "") - { - strunzone(artwork_image); - artwork_image = ""; - } - } - if(NextFrameCommand) { localcmd("\n", NextFrameCommand, "\n");