From: MirceaKitsune Date: Sun, 26 Sep 2010 13:42:36 +0000 (+0300) Subject: Properly choose won or lost images X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6f4bd08da8dd1a5bca8855c8797285376a19922d;p=voretournament%2Fvoretournament.git Properly choose won or lost images --- diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 7d803a60..45e39d81 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -681,8 +681,14 @@ void CSQC_UpdateView(float w, float h) // Draw Artwork if(intermission && !isdemo()) // match has ended { - //if(getstati(STAT_WINNING)) - //localcmd("disconnect\n"); + 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")) { @@ -699,7 +705,15 @@ void CSQC_UpdateView(float w, float h) artwork_pos_y = (vid_conheight - artwork_size_y) / 2; } - drawpic(artwork_pos, "gfx/hslimage", artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL); + drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL); + } + else + { + if(artwork_image != "") + { + strunzone(artwork_image); + artwork_image = ""; + } } if(NextFrameCommand)