]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added more player stability in terms of quantity
authorLegendaryGuard <rootuser999@gmail.com>
Fri, 26 Mar 2021 23:42:24 +0000 (00:42 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Fri, 26 Mar 2021 23:42:24 +0000 (00:42 +0100)
qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc

index 14795bb2ced6aa639f4de2e9f2c1e220fb50e4b5..eb4fd3ad93ad2e1b1698c8f9461c01d2909aad3d 100644 (file)
@@ -271,6 +271,16 @@ void mmm_RoundStart()
                        }
                }
                else if (total_civilians == 5)
+               {
+                       if (total_murderers <= 2)
+                               break;
+                       else
+                       {
+                               total_murderers++;
+                               it.mmm_status = MMM_STATUS_MURDERER;
+                       }
+               }
+               else if (total_civilians == 6)
                {
                        if (total_sleuths >= 2)
                                break;
@@ -280,7 +290,7 @@ void mmm_RoundStart()
                                it.mmm_status = MMM_STATUS_SLEUTH;
                        }
                }
-               else if (total_civilians >= 7)
+               else if (total_civilians == 7)
                {
                        if (total_sleuths >= 3)
                                break;
@@ -295,6 +305,21 @@ void mmm_RoundStart()
                                it.mmm_status = MMM_STATUS_SLEUTH;
                        }
                }
+               else if (total_civilians >= 8)
+               {
+                       if (total_sleuths >= 4)
+                               break;
+                       else if (total_murderers == 4)
+                       {
+                               total_murderers++;
+                               it.mmm_status = MMM_STATUS_MURDERER;
+                       }
+                       else
+                       {
+                               total_sleuths++;
+                               it.mmm_status = MMM_STATUS_SLEUTH;
+                       }
+               }
                else
                {
                        total_murderers++; 
@@ -557,7 +582,7 @@ MUTATOR_HOOKFUNCTION(mmm, ClientObituary)
                                frag_target.killerrole = "\n^3Killer role: ^1Murderer";
                        }
                }
-               //if mmm_status is 1, means civilian, 2 means murderer, 3 means sleuth, TODO: the bots: frag_attacker(1) shouldn't attack to frag_target(3)
+               //if mmm_status is 1, means civilian, 2 means murderer, 3 means sleuth
                //PrintToChatAll(sprintf("^1DEBUG^7: frag_attacker.mmm_status is ^3%s^7",ftos(frag_attacker.mmm_status)));
                //PrintToChatAll(sprintf("^1DEBUG^7: frag_target.mmm_status is ^3%s^7",ftos(frag_target.mmm_status)));
        }