Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov committed Aug 27, 2021
1 parent d85b030 commit 162508b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ This means that plugins that do binary code analysis (Orpheu for example) probab
| mp_free_armor | 0 | 0 | 2 | Give free armor on player spawn.<br/>`0` disabled <br/>`1` Give Kevlar <br/>`2` Give Kevlar + Helmet |
| mp_fadetoblack | 0 | 0 | 2 | Observer's screen will fade to black on kill event or permanent.<br/> `0` No fade.<br/>`1` Fade to black and won't be able to watch anybody.<br/>`2` fade to black only on kill moment. |
| mp_falldamage | 1 | 0 | 1 | Damage from falling.<br/>`0` disabled <br/>`1` enabled |
| sv_allchat | 1 | 0 | 1 | Players can receive all other players text chat, team restrictions apply<br/>`0` disabled <br/>`1` enabled |
</details>

## How to install zBot for CS 1.6?
Expand Down
7 changes: 7 additions & 0 deletions dist/game.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,10 @@ mp_ct_default_weapons_secondary "usp"
//
// Default value: "0"
mp_free_armor 0
// Players can receive all other players text chat, team restrictions apply.
// 0 - disabled (default behaviour)
// 1 - enabled
//
// Default value: "0"
sv_allchat 0
6 changes: 5 additions & 1 deletion regamedll/dlls/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,11 @@ void Host_Say(edict_t *pEntity, BOOL teamonly)
if (teamonly && pReceiver->m_iTeam != pPlayer->m_iTeam)
continue;

if ((pReceiver->pev->deadflag != DEAD_NO && !bSenderDead) || (pReceiver->pev->deadflag == DEAD_NO && bSenderDead))
if (
#ifdef REGAMEDLL_ADD
!(bool)sv_allchat.value &&
#endif
((pReceiver->pev->deadflag != DEAD_NO && !bSenderDead) || (pReceiver->pev->deadflag == DEAD_NO && bSenderDead)))
{
if (!(pPlayer->pev->flags & FL_PROXY))
continue;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ cvar_t t_give_player_knife = { "mp_t_give_player_knife", "1", 0, 1
cvar_t t_default_weapons_secondary = { "mp_t_default_weapons_secondary", "glock18", 0, 0.0f, nullptr };
cvar_t t_default_weapons_primary = { "mp_t_default_weapons_primary", "", 0, 0.0f, nullptr };
cvar_t free_armor = { "mp_free_armor", "0", 0, 0.0f, nullptr };
cvar_t allchat = { "sv_allchat", "0", 0, 0.0f, nullptr };

void GameDLL_Version_f()
{
Expand Down Expand Up @@ -385,6 +386,7 @@ void EXT_FUNC GameDLLInit()
CVAR_REGISTER(&t_default_weapons_secondary);
CVAR_REGISTER(&t_default_weapons_primary);
CVAR_REGISTER(&free_armor);
CVAR_REGISTER(&allchat);

// print version
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");
Expand Down
1 change: 1 addition & 0 deletions regamedll/dlls/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ extern cvar_t t_give_player_knife;
extern cvar_t t_default_weapons_secondary;
extern cvar_t t_default_weapons_primary;
extern cvar_t free_armor;
extern cvar_t allchat;

#endif

Expand Down

0 comments on commit 162508b

Please sign in to comment.