diff --git a/README.md b/README.md
index a49de0fb..a4341e81 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| mp_autoteambalance | 1 | 0 | 2 | Auto balancing of teams.
`0` disabled
`1` on after next round
`2` on next round |
| mp_buytime | 1.5 | 0.0 | - | Designate the desired amount of buy time for each round. (in minutes)
`-1` means no time limit
`0` disable buy |
| mp_maxmoney | 16000 | 0 | `999999` | The maximum allowable amount of money in the game |
-| mp_round_infinite | 0 | 0 | 1 | Flags for fine grained control (choose as many as needed)
`0` disabled
`1` enabled
or flags
`a` block round time round end check
`b` block needed players round end check
`c` block VIP assassination/success round end check
`d` block prison escape round end check
`e` block bomb round end check
`f` block team extermination round end check
`g` block hostage rescue round end check
`Example setting:` "ae" blocks round time and bomb round end checks |
+| mp_round_infinite | 0 | 0 | 1 | Flags for fine grained control (choose as many as needed)
`0` disabled
`1` enabled
or flags
`a` block round time round end check
`b` block needed players round end check
`c` block VIP assassination/success round end check
`d` block prison escape round end check
`e` block bomb round end check
`f` block team extermination round end check
`g` block hostage rescue round end check
`h` block VIP assassination/success round time end check
`i` block prison escape round time end check
`j` block bomb round time end check
`k` block hostage rescue round time end check
`Example setting:` "ae" blocks round time and bomb round end checks |
| mp_roundover | 0 | - | - | The round by expired time will be over, if on a map it does not have the scenario of the game.
`0` disabled
`1` enabled |
| mp_round_restart_delay | 5 | - | - | Number of seconds to delay before restarting a round after a win. |
| mp_hegrenade_penetration | 0 | 0 | 1 | Disable grenade damage through walls.
`0` disabled
`1` enabled |
diff --git a/dist/game.cfg b/dist/game.cfg
index 544693a6..d6890b9d 100644
--- a/dist/game.cfg
+++ b/dist/game.cfg
@@ -33,13 +33,17 @@ mp_maxmoney 16000
// 1 - enabled (never end round)
//
// Flags for fine grained control (choose as many as needed)
-// a - block round time round end check
+// a - block round time round end check, contain "h", "i", "j", "k" flags
// b - block needed players round end check
// c - block VIP assassination/success round end check
// d - block prison escape round end check
// e - block bomb round end check
// f - block team extermination round end check
// g - block hostage rescue round end check
+// h - block VIP assassination/success round time end check
+// i - block prison escape round time end check
+// j - block bomb round time end check
+// k - block hostage rescue round time end check
//
// Example setting: "ae" - blocks round time and bomb round end checks
// Default value: "0"
diff --git a/regamedll/dlls/gamerules.h b/regamedll/dlls/gamerules.h
index 80894003..ed0111a5 100644
--- a/regamedll/dlls/gamerules.h
+++ b/regamedll/dlls/gamerules.h
@@ -191,13 +191,18 @@ enum
// custom enum
enum
{
- SCENARIO_BLOCK_TIME_EXPRIRED = BIT(0), // flag "a"
- SCENARIO_BLOCK_NEED_PLAYERS = BIT(1), // flag "b"
- SCENARIO_BLOCK_VIP_ESCAPE = BIT(2), // flag "c"
- SCENARIO_BLOCK_PRISON_ESCAPE = BIT(3), // flag "d"
- SCENARIO_BLOCK_BOMB = BIT(4), // flag "e"
- SCENARIO_BLOCK_TEAM_EXTERMINATION = BIT(5), // flag "f"
- SCENARIO_BLOCK_HOSTAGE_RESCUE = BIT(6), // flag "g"
+ SCENARIO_BLOCK_TIME_EXPRIRED = BIT(0), // flag "a"
+ SCENARIO_BLOCK_NEED_PLAYERS = BIT(1), // flag "b"
+ SCENARIO_BLOCK_VIP_ESCAPE = BIT(2), // flag "c"
+ SCENARIO_BLOCK_PRISON_ESCAPE = BIT(3), // flag "d"
+ SCENARIO_BLOCK_BOMB = BIT(4), // flag "e"
+ SCENARIO_BLOCK_TEAM_EXTERMINATION = BIT(5), // flag "f"
+ SCENARIO_BLOCK_HOSTAGE_RESCUE = BIT(6), // flag "g"
+ SCENARIO_BLOCK_VIP_ESCAPE_TIME = BIT(7), // flag "h"
+ SCENARIO_BLOCK_PRISON_ESCAPE_TIME = BIT(8), // flag "i"
+ SCENARIO_BLOCK_BOMB_TIME = BIT(9), // flag "j"
+ SCENARIO_BLOCK_HOSTAGE_RESCUE_TIME = BIT(10), // flag "k"
+
};
// Player relationship return codes
diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp
index 460f5d24..9880ac0e 100644
--- a/regamedll/dlls/multiplay_gamerules.cpp
+++ b/regamedll/dlls/multiplay_gamerules.cpp
@@ -2980,23 +2980,30 @@ void CHalfLifeMultiplay::CheckRoundTimeExpired()
}
#endif
+#ifdef REGAMEDLL_ADD
+ int scenarioFlags = UTIL_ReadFlags(round_infinite.string);
+#else
+ // the icc compiler will cut out all of the code which refers to it
+ int scenarioFlags = 0;
+#endif
+
// New code to get rid of round draws!!
- if (m_bMapHasBombTarget)
+ if (!(scenarioFlags & SCENARIO_BLOCK_BOMB_TIME) && m_bMapHasBombTarget)
{
if (!OnRoundEnd_Intercept(WINSTATUS_CTS, ROUND_TARGET_SAVED, GetRoundRestartDelay()))
return;
}
- else if (UTIL_FindEntityByClassname(nullptr, "hostage_entity"))
+ else if (!(scenarioFlags & SCENARIO_BLOCK_HOSTAGE_RESCUE) && UTIL_FindEntityByClassname(nullptr, "hostage_entity"))
{
if (!OnRoundEnd_Intercept(WINSTATUS_TERRORISTS, ROUND_HOSTAGE_NOT_RESCUED, GetRoundRestartDelay()))
return;
}
- else if (m_bMapHasEscapeZone)
+ else if (!(scenarioFlags & SCENARIO_BLOCK_PRISON_ESCAPE_TIME) && m_bMapHasEscapeZone)
{
if (!OnRoundEnd_Intercept(WINSTATUS_CTS, ROUND_TERRORISTS_NOT_ESCAPED, GetRoundRestartDelay()))
return;
}
- else if (m_bMapHasVIPSafetyZone)
+ else if (!(scenarioFlags & SCENARIO_BLOCK_VIP_ESCAPE_TIME) && m_bMapHasVIPSafetyZone)
{
if (!OnRoundEnd_Intercept(WINSTATUS_TERRORISTS, ROUND_VIP_NOT_ESCAPED, GetRoundRestartDelay()))
return;