enhance CVar "mp_roundover" (#595)

enhance CVar "mp_roundover"
This commit is contained in:
Vaqtincha 2021-04-12 17:45:49 +05:00 committed by GitHub
parent 4918e1fb5e
commit 913bfc6609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 5 deletions

View File

@ -40,7 +40,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| mp_buytime | 1.5 | 0.0 | - | Designate the desired amount of buy time for each round. (in minutes)<br />`-1` means no time limit<br />`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)<br/>`0` disabled<br/>`1` enabled<br/><br/>or flags<br/>`a` block round time round end check<br/>`b` block needed players round end check<br/>`c` block VIP assassination/success round end check<br/>`d` block prison escape round end check<br/>`e` block bomb round end check<br/>`f` block team extermination round end check<br/>`g` block hostage rescue round end check<br/>`h` block VIP assassination/success round time end check<br/>`i` block prison escape round time end check<br/>`j` block bomb round time end check<br/>`k` block hostage rescue round time end check<br/><br/>`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.<br/>`0` disabled<br/>`1` enabled |
| mp_roundover | 0 | 0 | 3 | The round by expired time will be over, if on a map it does not have the scenario of the game.<br/>`0` disabled<br/>`1` end of the round with a draw<br/>`2` round end with Terrorists win<br/>`3` round end with Counter-Terrorists win |
| 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.<br/>`0` disabled<br/>`1` enabled |
| mp_nadedrops | 0 | 0 | 2 | Drop a grenade after player death.<br/>`0` disabled<br/>`1` drop first available grenade<br/>`2` drop all grenades |

4
dist/game.cfg vendored
View File

@ -51,7 +51,9 @@ mp_round_infinite 0
// The round by expired time will be over, if on a map it does not have the scenario of the game.
// 0 - disabled (default behaviour)
// 1 - enabled
// 1 - end of the round with a draw
// 2 - round end with Terrorists win
// 3 - round end with Counter-Terrorists win
//
// Default value: "0"
mp_roundover 0

View File

@ -3017,9 +3017,31 @@ void CHalfLifeMultiplay::CheckRoundTimeExpired()
#ifdef REGAMEDLL_ADD
else if (roundover.value)
{
// round is over
if (!OnRoundEnd_Intercept(WINSTATUS_DRAW, ROUND_GAME_OVER, GetRoundRestartDelay()))
return;
switch ((int)roundover.value)
{
case 1:
default:
{
if (!OnRoundEnd_Intercept(WINSTATUS_DRAW, ROUND_GAME_OVER, GetRoundRestartDelay()))
return;
break;
}
case 2:
{
if (!OnRoundEnd_Intercept(WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, GetRoundRestartDelay()))
return;
break;
}
case 3:
{
if (!OnRoundEnd_Intercept(WINSTATUS_CTS, ROUND_CTS_WIN, GetRoundRestartDelay()))
return;
break;
}
}
}
#endif