Fourth sv_alltalk mode (#196)

* Add new mode for sv_alltalk
This commit is contained in:
In-line 2017-11-02 19:00:21 +04:00 committed by Dmitry Novikov
parent aa7102c277
commit cc679f393f
3 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| 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 |
| showtriggers | 0 | 0 | 1 | Debug cvar shows triggers. |
| sv_alltalk | 0 | 0 | 3 | 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
| 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 |
| bot_quota_mode | normal | - | - | Determines the type of quota.<br/>`normal` default behaviour<br/>`fill` the server will adjust bots to keep `N` players in the game, where `N` is bot_quota |

1
dist/game.cfg vendored
View File

@ -163,6 +163,7 @@ showtriggers 0
// 1 - no restrictions
// 2 - teammates hear each other
// 3 - same as 2, but spectators hear everybody
// 4 - alive hear alive, dead hear dead and alive.
//
// Default value: "0"
sv_alltalk 0

View File

@ -94,6 +94,8 @@ bool CCStrikeGameMgrHelper::CanPlayerHearPlayer(CBasePlayer *pListener, CBasePla
return (pListener->m_iTeam == pSender->m_iTeam);
case 3:
return (pListener->m_iTeam == pSender->m_iTeam || pListener->IsObserver());
case 4:
return (pListener->IsAlive() == pSender->IsAlive() || pSender->IsAlive());
default: // HLDS Behavior
break;
}