]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
More intermission music client side, and fix an issue I introduced
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 27 Sep 2010 13:37:19 +0000 (16:37 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 27 Sep 2010 13:37:19 +0000 (16:37 +0300)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c
data/qcsrc/server/g_world.qc

index a32c3e77ad2d9e2a0bd29006c280e6354c040c1a..3da052d0c947128fddbb8e555015bf86133aff36 100644 (file)
@@ -1226,9 +1226,9 @@ set sv_foginterval 0
 set g_cdtracks_remaplist "feeding_frenzy digital-pursuit brokenlight ninesix sixtyfour_revisited infiltrator stone_fortress high_tech_lab space_walk meltdown inner-peace out-there variable quiet boss_theme ghost-town" "list used by mapinfo system to automatically assign cdtracks - must match the cd remap command"\r
 set g_cdtracks_dontusebydefault "" "list used by mapinfo system to automatically assign cdtracks - must be a subset of g_cdtracks_remaplist"\r
 cd remap $g_cdtracks_remaplist\r
-seta sv_intermission 1 "play intermission music"\r
-seta sv_intermission_cdtrack_win "win_music"\r
-seta sv_intermission_cdtrack_lose "lose_music"\r
+seta cl_intermission 1 "play intermission music"\r
+seta cl_intermission_cdtrack_win "win_music"\r
+seta cl_intermission_cdtrack_lose "lose_music"\r
 seta menu_cdtrack feeding_frenzy\r
 \r
 // maxidle (in seconds): kick players idle for more than that amount of time\r
index c9b1c7c65f03044e73713998b5b04cec212b97e9..a0e9db92bc153ceea52169bd9e3325b42ed832ec 100644 (file)
@@ -490,57 +490,70 @@ void CSQC_UpdateView(float w, float h)
          )\r
                teamradar_view();\r
 \r
-       // Draw Artwork\r
+       // Draw artwork and play intermission music\r
        if(intermission && !isdemo()) // the match has ended\r
-       if(cvar("cl_artwork"))\r
        if(!spectatee_status && gametype != GAME_RPG) // no one wins or loses in RPG\r
        {\r
-               if(artwork_image == "")\r
+               if(cvar("cl_artwork"))\r
                {\r
-                       if(getstati(STAT_WINNING)) // we are the winner\r
+                       if(artwork_image == "")\r
                        {\r
-                               if(cvar("cl_artwork_win"))\r
-                                       artwork_image = strcat("gfx/artwork_won_", ftos(floor(1 + (random() * cvar("cl_artwork_win")))));\r
+                               if(getstati(STAT_WINNING)) // we are the winner\r
+                               {\r
+                                       if(cvar("cl_artwork_win"))\r
+                                               artwork_image = strcat("gfx/artwork_won_", ftos(floor(1 + (random() * cvar("cl_artwork_win")))));\r
+                               }\r
+                               else // we have lost\r
+                               {\r
+                                       if(cvar("cl_artwork_lose"))\r
+                                               artwork_image = strcat("gfx/artwork_lost_", ftos(floor(1 + (random() * cvar("cl_artwork_lose")))));\r
+                               }\r
+                               artwork_image = strzone(artwork_image);\r
+                       }\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 // we have lost\r
+                       else\r
                        {\r
-                               if(cvar("cl_artwork_lose"))\r
-                                       artwork_image = strcat("gfx/artwork_lost_", ftos(floor(1 + (random() * cvar("cl_artwork_lose")))));\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
-                       artwork_image = strzone(artwork_image);\r
-               }\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
+                       if(artwork_fade < cvar("cl_artwork_alpha") && cvar("cl_artwork_fade"))\r
+                               artwork_fade += frametime * cvar("cl_artwork_fade");\r
+                       else\r
+                               artwork_fade = cvar("cl_artwork_alpha");\r
+\r
+                       if(artwork_image != "")\r
+                               drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', artwork_fade, DRAWFLAG_NORMAL);\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
+                       if(artwork_image != "")\r
+                       {\r
+                               strunzone(artwork_image);\r
+                               artwork_image = "";\r
+                       }\r
+                       artwork_fade = 0;\r
                }\r
 \r
-               if(artwork_fade < cvar("cl_artwork_alpha") && cvar("cl_artwork_fade"))\r
-                       artwork_fade += frametime * cvar("cl_artwork_fade");\r
-               else\r
-                       artwork_fade = cvar("cl_artwork_alpha");\r
-\r
-               if(artwork_image != "")\r
-                       drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', artwork_fade, DRAWFLAG_NORMAL);\r
-       }\r
-       else\r
-       {\r
-               if(artwork_image != "")\r
+               if(cvar("cl_intermission"))\r
                {\r
-                       strunzone(artwork_image);\r
-                       artwork_image = "";\r
+                       string s;\r
+                       if(getstati(STAT_WINNING))\r
+                               s = cvar_string("cl_intermission_cdtrack_win");\r
+                       else\r
+                               s = cvar_string("cl_intermission_cdtrack_lose");\r
+                       if(s != "")\r
+                               localcmd(strcat("\ncd play ", s, "\n"));\r
                }\r
-               artwork_fade = 0;\r
        }\r
 \r
        // draw sbar\r
index c88136f0f798e1a7d54c03aaf7f7196303276965..95033997842abd540b82bd6f6780711967ef5653 100644 (file)
@@ -108,7 +108,7 @@ void fillVoretPlayerSettingsTab(entity me)
        me.TR(me);\r
        me.TR(me);\r
                me.TD(me, 1, 2.8, e = makeVoretCheckBox(0, "cl_artwork", "Intermission art & music"));\r
-               makeMulti(e, "sv_intermission");\r
+               makeMulti(e, "cl_intermission");\r
        me.TR(me);\r
        me.TR(me);\r
                me.TDempty(me, 0.4);\r
index cd85cdea5b1611b0947c4c296f7162099cced67b..9a8db612727f86ae86f9904af8c98c452bcd8a38 100644 (file)
@@ -1333,7 +1333,6 @@ void DumpStats(float final)
 \r
 void FixIntermissionClient(entity e)\r
 {\r
-       string s;\r
        if(!e.autoscreenshot) // initial call\r
        {\r
                e.angles = e.v_angle;\r
@@ -1351,16 +1350,8 @@ void FixIntermissionClient(entity e)
                                e.weaponentity.weaponentity.effects = EF_NODRAW;\r
                }\r
                if(clienttype(e) == CLIENTTYPE_REAL)\r
-               if(cvar("sv_intermission"))\r
-               if(!e.spectatee_status && !cvar("g_rpg")) // no one wins or loses in RPG\r
                {\r
                        stuffcmd(e, "\nscr_printspeed 1000000\n");\r
-                       if(e.winning)\r
-                               s = cvar_string("sv_intermission_cdtrack_win");\r
-                       else\r
-                               s = cvar_string("sv_intermission_cdtrack_lose");\r
-                       if(s != "")\r
-                               stuffcmd(e, strcat("\ncd play ", s, "\n"));\r
                        msg_entity = e;\r
                        WriteByte(MSG_ONE, SVC_INTERMISSION);\r
                }\r