From 402a3cbc0713d9a03093a2e98958c43460e55446 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Sat, 27 Mar 2021 00:42:24 +0100 Subject: [PATCH] Added more player stability in terms of quantity --- qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc index 14795bb2c..eb4fd3ad9 100644 --- a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc +++ b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc @@ -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))); } -- 2.39.2