]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_world.qc
More intermission music client side, and fix an issue I introduced
[voretournament/voretournament.git] / data / qcsrc / server / g_world.qc
index 3c1fb34deda413e4a3a3518c762892c735a0d44d..9a8db612727f86ae86f9904af8c98c452bcd8a38 100644 (file)
@@ -49,13 +49,13 @@ void OtherPLReport_Think()
        WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);\r
        WriteByte(MSG_BROADCAST, TE_CSQC_OTHERPLREPORT);\r
        WriteByte(MSG_BROADCAST, self.cnt);\r
-       if(e.eater.classname == "player") // tempt hackers less by only sending the info of eaten players\r
+       if(e.predator.classname == "player") // tempt hackers less by only sending the info of eaten players\r
        {\r
-               if(cvar("g_vore_showpreyhealth"))\r
+               if(cvar("g_vore_showhealth"))\r
                        WriteByte(MSG_BROADCAST, e.health);\r
                else\r
                        WriteByte(MSG_BROADCAST, 0);\r
-               WriteByte(MSG_BROADCAST, num_for_edict(e.eater));\r
+               WriteByte(MSG_BROADCAST, num_for_edict(e.predator));\r
        }\r
        else\r
        {\r
@@ -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
@@ -720,6 +721,8 @@ void spawnfunc_worldspawn (void)
        CheatInit();\r
 \r
        localcmd("\n_sv_hook_gamestart ", GetGametype(), ";");\r
+       if(cvar("g_campaign"))\r
+               localcmd("\n_sv_hook_campaign_gamestart ", GetGametype(), ";");\r
 \r
        world_initialized = 1;\r
 }\r
@@ -1044,9 +1047,14 @@ float DoNextMapOverride()
 {\r
        if(cvar("g_campaign"))\r
        {\r
-               CampaignPostIntermission();\r
-               alreadychangedlevel = TRUE;\r
-               return TRUE;\r
+               if(cvar("g_campaign_changelevel"))\r
+               {\r
+                       CampaignPostIntermission();\r
+                       alreadychangedlevel = TRUE;\r
+                       return TRUE;\r
+               }\r
+               else\r
+                       localcmd("togglemenu 1\n");\r
        }\r
        if(cvar("quit_when_empty"))\r
        {\r
@@ -1325,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
@@ -1345,9 +1352,6 @@ void FixIntermissionClient(entity e)
                if(clienttype(e) == CLIENTTYPE_REAL)\r
                {\r
                        stuffcmd(e, "\nscr_printspeed 1000000\n");\r
-                       s = cvar_string("sv_intermission_cdtrack");\r
-                       if(s != "")\r
-                               stuffcmd(e, strcat("\ncd loop ", s, "\n"));\r
                        msg_entity = e;\r
                        WriteByte(MSG_ONE, SVC_INTERMISSION);\r
                }\r
@@ -1448,6 +1452,8 @@ void NextLevel()
                CampaignPreIntermission();\r
 \r
        localcmd("\nsv_hook_gameend;");\r
+       if(cvar("g_campaign"))\r
+               localcmd("\nsv_hook_campaign_gameend;");\r
 }\r
 \r
 /*\r
@@ -2219,6 +2225,9 @@ void MapVote_Init()
        float i;\r
        float nmax, smax;\r
 \r
+       if(cvar("g_campaign"))\r
+               return;\r
+\r
        MapVote_ClearAllVotes();\r
 \r
        mapvote_count = 0;\r