mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 14:45:38 +03:00
Added mp_allow_point_servercommand to disable point_servercommand entities.
Due to a high risk of abuse, it is gated by the mp_allow_point_servercommand console variable.
This commit is contained in:
parent
1722f883a1
commit
a31be1d18e
@ -50,6 +50,8 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
|
||||
| mp_item_staytime | 300 | - | - | Time to remove item that have been dropped from the players. |
|
||||
| mp_legacy_bombtarget_touch | 1 | 0 | 1 | Legacy func_bomb_target touch. New one is more strict. <br/>`0` New behavior<br/>`1` Legacy behavior|
|
||||
| mp_respawn_immunitytime | 0 | 0 | - | Specifies the players defense time after respawn. (in seconds).<br/>`0` disabled<br/>`>0.00001` time delay to remove protection |
|
||||
| mp_kill_filled_spawn | 1 | 0 | 1 | Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).<br />Only disable this if you have semiclip or other plugins that prevents stucking.<br/>`0` disabled<br/>`1` enabled |
|
||||
| mp_allow_point_servercommand | 0 | 0 | 1 | Allow use of point_servercommand entities in map.<br/>`0` disallow<br/>`1` allow<br/>`NOTE`: Potentially dangerous for untrusted maps.|
|
||||
|
||||
## How to install zBot for CS 1.6?
|
||||
* Extract all the files from an [archive](regamedll/extra/zBot/bot_profiles.zip?raw=true)
|
||||
|
8
dist/game.cfg
vendored
8
dist/game.cfg
vendored
@ -201,3 +201,11 @@ mp_respawn_immunitytime "0"
|
||||
//
|
||||
// Default value: "1"
|
||||
mp_kill_filled_spawn "1"
|
||||
|
||||
// Allow use of point_servercommand entities in map.
|
||||
// NOTE: Potentially dangerous for untrusted maps.
|
||||
// 0 - disallow
|
||||
// 1 - allow
|
||||
//
|
||||
// Default value: "0"
|
||||
mp_allow_point_servercommand "0"
|
||||
|
@ -71,6 +71,13 @@ LINK_ENTITY_TO_CLASS(point_servercommand, CPointServerCommand, CCSPointServerCom
|
||||
|
||||
void CPointServerCommand::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||
{
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (!allow_point_servercommand.value) {
|
||||
ALERT(at_warning, "point_servercommand usage blocked by mp_allow_point_servercommand setting\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (size_t cmd = 0; cmd < m_uiCommandsCount; cmd++) {
|
||||
Execute(m_iszCommands[cmd]);
|
||||
}
|
||||
|
@ -119,6 +119,8 @@ cvar_t legacy_bombtarget_touch = { "mp_legacy_bombtarget_touch", "1", FCVAR_SERV
|
||||
cvar_t respawn_immunitytime = { "mp_respawn_immunitytime", "0", FCVAR_SERVER, 0.0f, nullptr };
|
||||
cvar_t kill_filled_spawn = { "mp_kill_filled_spawn", "1", FCVAR_SERVER, 0.0f, nullptr };
|
||||
|
||||
cvar_t allow_point_servercommand = { "mp_allow_point_servercommand", "0", 0, 0.0f, nullptr };
|
||||
|
||||
void GameDLL_Version_f()
|
||||
{
|
||||
if (Q_stricmp(CMD_ARGV(1), "version") != 0)
|
||||
@ -288,6 +290,7 @@ void EXT_FUNC GameDLLInit()
|
||||
CVAR_REGISTER(&legacy_bombtarget_touch);
|
||||
CVAR_REGISTER(&respawn_immunitytime);
|
||||
CVAR_REGISTER(&kill_filled_spawn);
|
||||
CVAR_REGISTER(&allow_point_servercommand);
|
||||
|
||||
// print version
|
||||
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");
|
||||
|
@ -155,6 +155,7 @@ extern cvar_t item_staytime;
|
||||
extern cvar_t legacy_bombtarget_touch;
|
||||
extern cvar_t respawn_immunitytime;
|
||||
extern cvar_t kill_filled_spawn;
|
||||
extern cvar_t allow_point_servercommand;
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user