From 6f4bd08da8dd1a5bca8855c8797285376a19922d Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 26 Sep 2010 16:42:36 +0300 Subject: [PATCH] Properly choose won or lost images --- data/qcsrc/client/View.qc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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) -- 2.39.2