Added cvar mp_hullbounds_sets 0/1

1: hull bounds that sets by gamedll, 0: otherwise by engine (as default behavior)
This commit is contained in:
s1lent 2019-04-17 17:47:52 +07:00
parent b5a0fa4736
commit 8c85aeebbc
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
7 changed files with 31 additions and 3 deletions

View File

@ -52,6 +52,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| 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.|
| mp_hullbounds_sets | 1 | 0 | 1 | Sets mins/maxs hull bounds for the player.<br/>`0` disabled<br/>`1` enabled |
## How to install zBot for CS 1.6?
* Extract all the files from an [archive](regamedll/extra/zBot/bot_profiles.zip?raw=true)

6
dist/game.cfg vendored
View File

@ -209,3 +209,9 @@ mp_kill_filled_spawn "1"
//
// Default value: "0"
mp_allow_point_servercommand "0"
// Sets mins/maxs hull bounds for the player.
// 0 - disabled (default behaviour, sets engine)
// 1 - enabled (sets gamedll)
// Default value: "1"
mp_hullbounds_sets "1"

View File

@ -4817,9 +4817,15 @@ int EXT_FUNC ConnectionlessPacket(const struct netadr_s *net_from, const char *a
return 0;
}
// TODO: int -> qboolean or enum
int EXT_FUNC GetHullBounds(int hullnumber, float *mins, float *maxs)
BOOL EXT_FUNC GetHullBounds(int hullnumber, float *mins, float *maxs)
{
#ifdef REGAMEDLL_ADD
if (hullbounds_sets.value == 0.0f)
{
return (hullnumber < 3) ? TRUE : FALSE;
}
#endif
#ifdef REGAMEDLL_FIXES
switch (hullnumber)
{

View File

@ -191,7 +191,7 @@ void UpdateClientData(const edict_t *ent, int sendweapons, struct clientdata_s *
void CmdStart(const edict_t *pEdict, const struct usercmd_s *cmd, unsigned int random_seed);
void CmdEnd(const edict_t *pEdict);
int ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size);
int GetHullBounds(int hullnumber, float *mins, float *maxs);
BOOL GetHullBounds(int hullnumber, float *mins, float *maxs);
void CreateInstancedBaselines();
int InconsistentFile(const edict_t *pEdict, const char *filename, char *disconnect_message);
int AllowLagCompensation();

View File

@ -120,6 +120,7 @@ cvar_t respawn_immunitytime = { "mp_respawn_immunitytime", "0", FCVAR_SERVER,
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 };
cvar_t hullbounds_sets = { "mp_hullbounds_sets", "1", 0, 0.0f, nullptr };
void GameDLL_Version_f()
{
@ -291,6 +292,7 @@ void EXT_FUNC GameDLLInit()
CVAR_REGISTER(&respawn_immunitytime);
CVAR_REGISTER(&kill_filled_spawn);
CVAR_REGISTER(&allow_point_servercommand);
CVAR_REGISTER(&hullbounds_sets);
// print version
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");
@ -304,4 +306,11 @@ void EXT_FUNC GameDLLInit()
#ifdef REGAMEDLL_FIXES
VoiceGameMgr_RegisterCVars();
#endif
#ifdef REGAMEDLL_ADD
// execute initial pre-configurations
SERVER_COMMAND("exec game.cfg\n");
SERVER_EXECUTE();
#endif
}

View File

@ -156,6 +156,7 @@ extern cvar_t legacy_bombtarget_touch;
extern cvar_t respawn_immunitytime;
extern cvar_t kill_filled_spawn;
extern cvar_t allow_point_servercommand;
extern cvar_t hullbounds_sets;
#endif

View File

@ -133,6 +133,11 @@ LINK_HOOK_CHAIN2(CGameRules *, InstallGameRules)
CGameRules *EXT_FUNC __API_HOOK(InstallGameRules)()
{
#ifdef REGAMEDLL_ADD
// execute post-configurations
SERVER_PRINT("Executing ReGameDLL Configuration File\n");
#endif
SERVER_COMMAND("exec game.cfg\n");
SERVER_EXECUTE();