]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
First step toward implementing an artwork system; Draw a picture on the screen and...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 13:20:02 +0000 (16:20 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 13:20:02 +0000 (16:20 +0300)
data/qcsrc/client/View.qc
data/qcsrc/common/constants.qh
data/qcsrc/server/g_world.qc

index 3da6dccdb0caec1d91bdc46bc72be629eae221c4..7d803a60737cc8f4030221bbd7a0acf4d542fc4e 100644 (file)
@@ -251,6 +251,7 @@ float Sbar_WouldDrawScoreboard ();
 float view_set;\r
 float camera_mode;\r
 float chase_active_old;\r
+string artwork_image;\r
 string NextFrameCommand;\r
 void CSQC_UpdateView(float w, float h)\r
 {\r
@@ -259,6 +260,8 @@ void CSQC_UpdateView(float w, float h)
        float f, i, j;\r
        vector v, vo;\r
 \r
+       vector artwork_pos, artwork_size;\r
+\r
        WaypointSprite_Load();\r
 \r
        if(spectatee_status)\r
@@ -675,6 +678,30 @@ void CSQC_UpdateView(float w, float h)
                }\r
        }\r
 \r
+       // Draw Artwork\r
+       if(intermission && !isdemo()) // match has ended\r
+       {\r
+               //if(getstati(STAT_WINNING))\r
+                       //localcmd("disconnect\n");\r
+\r
+               if(cvar("cl_artwork_stretch"))\r
+               {\r
+                       artwork_size_x = vid_conwidth;\r
+                       artwork_size_y = vid_conheight;\r
+                       artwork_pos_x = 0;\r
+                       artwork_pos_y = 0;\r
+               }\r
+               else\r
+               {\r
+                       artwork_size_x = max(vid_conwidth, vid_conheight);\r
+                       artwork_size_y = max(vid_conwidth, vid_conheight);\r
+                       artwork_pos_x = (vid_conwidth - artwork_size_x) / 2;\r
+                       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
+       }\r
+\r
        if(NextFrameCommand)\r
        {\r
                localcmd("\n", NextFrameCommand, "\n");\r
index ff54fb862ac73be76ca39ab575be2d2683cbe020..2f0d2ecec95170e06bf958d0f6c255c888e54291 100644 (file)
@@ -276,10 +276,11 @@ const float STAT_FUEL = 44;
 const float STAT_NB_METERSTART = 45;\r
 const float STAT_SHOTORG = 46; // compressShotOrigin\r
 const float STAT_LEADLIMIT = 47;\r
-const float STAT_VORE_LOAD = 48;\r
-const float STAT_VORE_DIGESTING = 49;\r
-const float STAT_VORE_EATEN = 50;\r
-const float STAT_VORE_CANLEAVE = 51;\r
+const float STAT_WINNING = 48;\r
+const float STAT_VORE_LOAD = 49;\r
+const float STAT_VORE_DIGESTING = 50;\r
+const float STAT_VORE_EATEN = 51;\r
+const float STAT_VORE_CANLEAVE = 52;\r
 const float CTF_STATE_ATTACK = 1;\r
 const float CTF_STATE_DEFEND = 2;\r
 const float CTF_STATE_COMMANDER = 3;\r
index e7df6cab3c1a6149a99ab3ec1d228a9008c560f5..29d56e8e4430b93d9f92e58b972194a6386c5983 100644 (file)
@@ -654,6 +654,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_DAMAGE_FIRED, AS_INT, stat_fired);\r
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);\r
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);\r
+       addstat(STAT_WINNING, AS_FLOAT, winning);\r
        addstat(STAT_VORE_LOAD, AS_INT, stat_stomachload);\r
        addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting);\r
        addstat(STAT_VORE_EATEN, AS_INT, stat_eaten);\r