]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Properly choose won or lost images
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 13:42:36 +0000 (16:42 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 13:42:36 +0000 (16:42 +0300)
data/qcsrc/client/View.qc

index 7d803a60737cc8f4030221bbd7a0acf4d542fc4e..45e39d8190b49b37be0911069b8d728c6578efb1 100644 (file)
@@ -681,8 +681,14 @@ void CSQC_UpdateView(float w, float h)
        // Draw Artwork\r
        if(intermission && !isdemo()) // match has ended\r
        {\r
-               //if(getstati(STAT_WINNING))\r
-                       //localcmd("disconnect\n");\r
+               if(artwork_image == "")\r
+               {\r
+                       if(getstati(STAT_WINNING))\r
+                               artwork_image = strcat("gfx/artwork_won_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!!\r
+                       else\r
+                               artwork_image = strcat("gfx/artwork_lost_", ftos(floor(1 + (random() * 2)))); // CCCCVVVVVAAAAAAAAARRRRRRRRRRRRRRR!!!!!!\r
+                       artwork_image = strzone(artwork_image);\r
+               }\r
 \r
                if(cvar("cl_artwork_stretch"))\r
                {\r
@@ -699,7 +705,15 @@ void CSQC_UpdateView(float w, float h)
                        artwork_pos_y = (vid_conheight - artwork_size_y) / 2;\r
                }\r
 \r
-               drawpic(artwork_pos, "gfx/hslimage", artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL);\r
+               drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL);\r
+       }\r
+       else\r
+       {\r
+               if(artwork_image != "")\r
+               {\r
+                       strunzone(artwork_image);\r
+                       artwork_image = "";\r
+               }\r
        }\r
 \r
        if(NextFrameCommand)\r