Add cvar for old bomb defuse sound (#242)

This commit is contained in:
In-line 2018-01-21 13:44:25 +04:00 committed by GitHub
parent 38ff7ce1fc
commit 69c274f92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View File

@ -42,6 +42,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| mp_forcerespawn | 0 | 0 | - | Players will automatically respawn when killed.<br/>`0` disabled<br/>`>0.00001` time delay to respawn |
| mp_hostage_hurtable | 1 | 0 | 1 | The hostages can take damage.<br/>`0` disabled<br/>`1` from any team<br/>`2` only from `CT`<br/>`3` only from `T` |
| mp_show_radioicon | 1 | 0 | 1 | Show radio icon.<br/>`0` disabled<br/>`1` enabled |
| mp_old_bomb_defused_sound | 0 | 0 | 1 | Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused<br/>`0` disabled<br/>`1` enabled |
| showtriggers | 0 | 0 | 1 | Debug cvar shows triggers. |
| sv_alltalk | 0 | 0 | 4 | When players can hear each other ([further explanation](../../wiki/sv_alltalk)).<br/>`0` dead don't hear alive<br/>`1` no restrictions<br/>`2` teammates hear each other<br/>`3` Same as 2, but spectators hear everybody<br/>`4` alive hear alive, dead hear dead and alive.
| bot_deathmatch | 0 | 0 | 1 | Set's the mode for the zBot.<br/>`0` disabled<br/>`1` enable mode Deathmatch and not allow to do the scenario |

5
dist/game.cfg vendored
View File

@ -136,6 +136,11 @@ mp_hostage_hurtable 1
// 1 - enabled (default behavior)
mp_show_radioicon 1
// Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused
// 0 - disabled
// 1 - enabled (default hehavior)
mp_old_bomb_defused_sound 1
// Set's the mode for the zBot
// 0 - disabled
// 1 - enable mode Deathmatch and not allow to do the scenario

View File

@ -110,11 +110,12 @@ cvar_t round_restart_delay = { "mp_round_restart_delay", "5", FCVAR_SERVER, 0.
cvar_t showtriggers = { "showtriggers", "0", 0, 0.0f, nullptr }; // debug cvar shows triggers
// TODO: Maybe it's better to register in the engine?
cvar_t hostagehurtable = { "mp_hostage_hurtable", "1", FCVAR_SERVER, 0.0f, nullptr };
cvar_t roundover = { "mp_roundover", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t forcerespawn = { "mp_forcerespawn", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t show_radioicon = { "mp_show_radioicon", "1", FCVAR_SERVER, 1.0f, nullptr };
cvar_t item_staytime = { "mp_item_staytime", "300", FCVAR_SERVER, 300.0f, nullptr };
cvar_t hostagehurtable = { "mp_hostage_hurtable", "1", FCVAR_SERVER, 0.0f, nullptr };
cvar_t roundover = { "mp_roundover", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t forcerespawn = { "mp_forcerespawn", "0", FCVAR_SERVER, 0.0f, nullptr };
cvar_t show_radioicon = { "mp_show_radioicon", "1", FCVAR_SERVER, 1.0f, nullptr };
cvar_t old_bomb_defused_sound = { "mp_old_bomb_defused_sound", "1", FCVAR_SERVER, 1.0f, nullptr };
cvar_t item_staytime = { "mp_item_staytime", "300", FCVAR_SERVER, 300.0f, nullptr };
void GameDLL_Version_f()
{
@ -266,6 +267,7 @@ void EXT_FUNC GameDLLInit()
CVAR_REGISTER(&roundover);
CVAR_REGISTER(&forcerespawn);
CVAR_REGISTER(&show_radioicon);
CVAR_REGISTER(&old_bomb_defused_sound);
CVAR_REGISTER(&item_staytime);
// print version

View File

@ -150,6 +150,7 @@ extern cvar_t hostagehurtable;
extern cvar_t roundover;
extern cvar_t forcerespawn;
extern cvar_t show_radioicon;
extern cvar_t old_bomb_defused_sound;
extern cvar_t item_staytime;
#endif

View File

@ -1304,9 +1304,12 @@ void CGrenade::C4Think()
// if the defuse process has ended, kill the c4
else if (m_pBombDefuser->pev->deadflag == DEAD_NO)
{
#ifndef REGAMEDLL_FIXES
Broadcast("BOMBDEF");
#ifdef REGAMEDLL_ADD
if (!old_bomb_defused_sound.value)
#endif
{
Broadcast("BOMBDEF");
}
if (TheBots)
{

View File

@ -1213,8 +1213,11 @@ bool CHalfLifeMultiplay::Target_Defused(float tmDelay)
{
Broadcast("ctwin");
#ifdef REGAMEDLL_FIXES
Broadcast("BOMBDEF");
#ifdef REGAMEDLL_ADD
if (old_bomb_defused_sound.value)
{
Broadcast("BOMBDEF");
}
#endif
m_iAccountCT += m_rgRewardAccountRules[RR_BOMB_DEFUSED];