-
Notifications
You must be signed in to change notification settings - Fork 126
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
Server Variable Features #195
base: master
Are you sure you want to change the base?
Conversation
…to once again have control over damage values
Do we really need any of these changes in master? I think we have this repo for the next reasons:
Your changes don't fall into any of these categories. If you want them for your server, it's ok, just keep the branch in your fork and merge with master when needed. |
I like the idea of |
That's fine. I saw them as harmless additions for, as you said, more flexibility than 'vanilla'. Do you want me to make a separate PR for |
For future:
You can just change default cvar value without implementing special function.
And even zero or negative value may be useful.
What about
Such behavior can confuse players too and you can remove longjump from map using entpatch/ripent anyway. |
I don't think so. The multiplayer code always hardcode overrides the cvar values. What my function has done is create new cvars special for that MP override section that allows those overrides to be overridden. Besides, I'm not trying to make a permanent change to the game. I wanted a config file that the server owner can freely adjust.
I'm not sure I follow this question. What does this have to do with my change?
sv_cheats auto-updating is already present in the Valve/Steam hl.dll. Launch a multiplayer game, type
It's off (longjump enabled) by default. You have to go out of your way to disable longjump with this server command. Again, for me to remove longjump from every map I play and have a second copy of a map just to decide whether or not longjump is usable is a lot more work than simply having a server variable that I can set in server.cfg. |
I'm sorry. I can try to separate them, I'm just no git wiz. Sounds like realtime sv_cheats at the very least should be its own PR. |
Ok, create separate PR then. |
Since my other two changes don't fit your master branch requirements, what would you like to do with them? If nothing, feel free to close this PR... |
Values from skill.cfg overrides default hardcoded |
Not in multiplayer on certain skills. See: https://github.com/FWGS/hlsdk-xash3d/blob/1737b8a8787f531d1063cbcdc7480d428c5b3b07/dlls/multiplay_gamerules.cpp#L140 |
So you can use GET_CVAR_VALUE directly. |
Not sure what you mean. |
cheats feature has been moved to #197. If there's desire for either of these other features somewhere, let me know. Otherwise, feel free to close this PR. |
You can just register cvar with default value and use CVAR_GET_FLOAT callback to get value;
|
I see what you mean now. We'd just want to note that the sk_mp* defaults are Valve's old override values. Makes sense. |
…romoted users can run cheats.
…and as far away as you'd like
… to do. Complete the scripted sequence.
Elevated privs
…ing left to do. Complete the scripted sequence." This reverts commit 1ef7adf.
…ated those here under different names. Promote doesn't need sv_cheats anymore.
1) Multiplayer Skill CFG
Permits the following vars in skill cfg:
sk_mp_suitcharger
sk_mp_plr_crowbar
sk_mp_plr_9mm_bullet
sk_mp_plr_357_bullet
sk_mp_plr_9mmAR_bullet
sk_mp_plr_9mmAR_grenade
sk_mp_plr_buckshot
sk_mp_plr_xbow_bolt_client
sk_mp_plr_rpg
sk_mp_plr_egon_wide
sk_mp_plr_egon_narrow
sk_mp_plr_hand_grenade
sk_mp_plr_satchel
sk_mp_plr_tripmine
sk_mp_plr_hornet
These allow you to override their respective beforehand hard-coded values for multiplayer. If left empty/0, retains the original hard-coded values.
2) sv_cheats Auto-Update
When the server emits a change in sv_cheats, this is now reflected immediately instead of at the start of the next game.
3) mp_disable_longjump
New multiplayer variable that allows you to disable longjump from being picked up.
Disclaimer
I barely comprehend C++, but thanks to the really easy waf compile process, I was able to continue bashing my head against these files until I got these working. That said, please carefully review what I've done, as I don't particularly know what I'm doing with C++.