Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sv_alltalk enhancement #643

Closed
wopox1337 opened this issue Jun 15, 2021 · 5 comments · Fixed by #644
Closed

sv_alltalk enhancement #643

wopox1337 opened this issue Jun 15, 2021 · 5 comments · Fixed by #644

Comments

@wopox1337
Copy link
Collaborator

Need to add new type sv_alltalk 5
https://github.com/s1lentq/ReGameDLL_CS/wiki/sv_alltalk

sv_alltalk "5"

Team Alive CT 🗣️ Alive T 🗣️ Dead CT 🗣️ Dead T 🗣️ Spectator 🗣️
Alive CT 👂
Alive T 👂
Dead CT 👂
Dead T 👂
Spectator 👂
@Vaqtincha
Copy link
Contributor

Confused feature with 1k vars 😃

@fred0r
Copy link

fred0r commented Jun 17, 2021

#645

@wopox1337
Copy link
Collaborator Author

@fred0r In my opinion, it is better to transfer all the settings from CS:GO. Otherwise, sv_alltalk will expand into 999 values 🤔

// Set game rules to allow all clients to talk to each other.
// Muted players still can't talk to each other.
ConVar sv_alltalk( "sv_alltalk", "0", FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE, "Deprecated. Replaced with sv_talk_enemy_dead and sv_talk_enemy_living." );

// [jason] Can the dead speak to the living?
ConVar sv_deadtalk( "sv_deadtalk", "0",	FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE, "Dead players can speak (voice, text) to the living" );

// [jason] Override that removes all chat restrictions, including those for spectators
ConVar sv_full_alltalk( "sv_full_alltalk", "0", FCVAR_REPLICATED | FCVAR_RELEASE, "Any player (including Spectator team) can speak to any other player" );

ConVar sv_talk_enemy_dead( "sv_talk_enemy_dead", "0", FCVAR_REPLICATED | FCVAR_RELEASE, "Dead players can hear all dead enemy communication (voice, chat)" );
ConVar sv_talk_enemy_living( "sv_talk_enemy_living", "0", FCVAR_REPLICATED | FCVAR_RELEASE, "Living players can hear all living enemy communication (voice, chat)" );

#ifdef GAME_DLL
ConVar sv_auto_full_alltalk_during_warmup_half_end( "sv_auto_full_alltalk_during_warmup_half_end", "1", FCVAR_RELEASE, "When enabled will automatically turn on full all talk mode in warmup, at halftime and at the end of the match" );
#endif

ConVar sv_spec_hear( "sv_spec_hear", "1", FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_RELEASE, "Determines who spectators can hear: 0: only spectators; 1: all players; 2: spectated team; 3: self only; 4: nobody" );

@afwn90cj93201nixr2e1re
Copy link
Contributor

afwn90cj93201nixr2e1re commented Jun 18, 2021

I would recommend use bitmasks to let people configure things as they want to.
Because these things are confusable as well.
Like look at the cvars count, how i should remember and combine them?
Add new command.
sv_add_talkmode which is going to put some values into vector or array.

1 - dead ct
2 - alive ct
4 - dead t
8 - alive t
16 - alive spec
32 - dead spec
64 - dead spec always
128 - dead ct always
256 - enemy dead
512 - enemy alive
...

etc.

keep old value from original sv_all_talk, 1, 2, 3, 4.

sv_add_talkmode "63" // add new row, for example if we already have 4 rows it will add new row with index 4
sv_add_talkmode "1023" // add new row, for example if we already have 4 rows it will add new row with index 5

which is going to add new value to vector and later you can set this mode as the main one.

sv_alltalk "index"
sv_alltalk "5"

Non specified args will show list:
sv_add_talkmode
List:
0: Alive Cts, Alive T
1: Dead Ct, Dead Specs

etc.

New cvar which can identify index by bitsum.

server_cmd("sv_add_talkmode 832");
server_exec();
get_pcvar_num(g_pLastTalkMode);
server_cmd("sv_add_talkmode 123123 ^"My new value^"");
server_exec();
server_cmd("sv_add_talkmode ^"My new value^"");
server_exec();
get_pcvar_num(g_pLastRequestedMode); // might be -1 or 0 if key doesn't exist

В общем придумать можно много чего и реализовать это все можно максимально правильно.
Не знаю что за ... решил начать изначально пихать всякие новые значения кваров вместо имплементации подобных систем которые по своей сути вообще ничего не меняют.

Соответственно игра должна проверять есть ли данный индекс и т.п., в случае чего переключаться на стандартные. Соответственно нужен еще один квар, sv_alltalk_fallback "0" который будет принимать лишь стандартные значения.

Повторюсь, реализовать можно много чего подобным образом, но сначала нужно продумать саму идею, вместо добавления не понятных значений кваров.

@fred0r
Copy link

fred0r commented Jun 24, 2021

Why do you call these possible Options 'weird/obscure'?
A Option like sv_add_talkmode would be a nice addition, but i think someone doesnt event need any more beside #645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants