]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/teamplay.qc
Let's not forget the fake prey
[voretournament/voretournament.git] / data / qcsrc / server / teamplay.qc
index 4f5dbaa544029607a1ace536e04ca92657e0dc5a..b0913fd73c1bef8db2db1de91e9029d4575192ac 100644 (file)
@@ -236,10 +236,7 @@ void InitGameplayMode()
                game = GAME_CTF;\r
                gamemode_name = "Capture the Flag";\r
                ActivateTeamplay();\r
-               if(cvar("g_campaign"))\r
-                       g_ctf_win_mode = 2;\r
-               else\r
-                       g_ctf_win_mode = cvar("g_ctf_win_mode");\r
+               g_ctf_win_mode = cvar("g_ctf_win_mode");\r
                g_ctf_ignore_frags = cvar("g_ctf_ignore_frags");\r
                if(g_ctf_win_mode == 2)\r
                {\r
@@ -349,6 +346,9 @@ void InitGameplayMode()
        {\r
                game = GAME_RPG;\r
                gamemode_name = "Role Play";\r
+               fraglimit_override = 0;\r
+               leadlimit_override = 0;\r
+               ScoreRules_rpg();\r
        }\r
 \r
        if(teams_matter)\r
@@ -484,17 +484,21 @@ void PrintWelcomeMessage(entity pl)
                modifications = strcat(modifications, ", Bloodloss");\r
        if(g_jetpack)\r
                modifications = strcat(modifications, ", Jet pack");\r
-       if(cvar("g_balance_vore_weight_gravity") < 0)\r
-               modifications = strcat(modifications, ", Lighten");\r
+       if(!cvar("g_start_weapon_grabber"))\r
+               modifications = strcat(modifications, ", No start weapon");\r
+       if(!cvar("g_vore_digestion"))\r
+               modifications = strcat(modifications, ", Gentle Vore");\r
        if(cvar("g_balance_vore_digestion_damage") >= 1000)\r
                modifications = strcat(modifications, ", InstaDigestion");\r
+       if(cvar("g_balance_vore_weight_gravity") < 0)\r
+               modifications = strcat(modifications, ", Lighten");\r
        modifications = substring(modifications, 2, strlen(modifications) - 2);\r
 \r
        local string versionmessage;\r
        versionmessage = GetClientVersionMessage();\r
 \r
        s = strcat(s, NEWLINES, "This is Voretournament ", cvar_string("g_voretournamentversion"), "\n", versionmessage);\r
-       s = strcat(s, "^8\n\nmatch type is ^1", gamemode_name, "^8\n");\r
+       s = strcat(s, "^8\n\ngame type is ^1", gamemode_name, "^8\n");\r
 \r
        if(modifications != "")\r
                s = strcat(s, "^8\nactive modifications: ^3", modifications, "^8\n");\r
@@ -825,6 +829,33 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
        // find out what teams are available\r
        CheckAllowedTeams(pl);\r
 \r
+       // if we want the player in a certain team for campaign, force him there\r
+       if(cvar("g_campaign"))\r
+       if(clienttype(pl) == CLIENTTYPE_REAL) // only players, not bots\r
+       {\r
+               switch(cvar("g_campaign_forceteam"))\r
+               {\r
+                       case 1:\r
+                               SetPlayerColors(pl, COLOR_TEAM1 - 1);\r
+                               LogTeamchange(pl.playerid, pl.team, 2);\r
+                               return COLOR_TEAM1;\r
+                       case 2:\r
+                               SetPlayerColors(pl, COLOR_TEAM2 - 1);\r
+                               LogTeamchange(pl.playerid, pl.team, 2);\r
+                               return COLOR_TEAM2;\r
+                       case 3:\r
+                               SetPlayerColors(pl, COLOR_TEAM3 - 1);\r
+                               LogTeamchange(pl.playerid, pl.team, 2);\r
+                               return COLOR_TEAM3;\r
+                       case 4:\r
+                               SetPlayerColors(pl, COLOR_TEAM4 - 1);\r
+                               LogTeamchange(pl.playerid, pl.team, 2);\r
+                               return COLOR_TEAM4;\r
+                       default:\r
+                               break;\r
+               }\r
+       }\r
+\r
        // if we don't care what team he ends up on, put him on whatever team he entered as.\r
        // if he's not on a valid team, then let other code put him on the smallest team\r
        if(!forcebestteam)\r
@@ -857,7 +888,7 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
 \r
        smallest = FindSmallestTeam(pl, TRUE);\r
 \r
-       if(!only_return_best)\r
+       if(!only_return_best && !pl.bot_forced_team)\r
        {\r
                TeamchangeFrags(self);\r
                if(smallest == 1)\r