diff --git a/README.md b/README.md index 526307ff..940f8032 100644 --- a/README.md +++ b/README.md @@ -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).
`0` disabled
`>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).
Only disable this if you have semiclip or other plugins that prevents stucking.
`0` disabled
`1` enabled | | mp_allow_point_servercommand | 0 | 0 | 1 | Allow use of point_servercommand entities in map.
`0` disallow
`1` allow
`NOTE`: Potentially dangerous for untrusted maps.| +| mp_hullbounds_sets | 1 | 0 | 1 | Sets mins/maxs hull bounds for the player.
`0` disabled
`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) diff --git a/dist/game.cfg b/dist/game.cfg index cc0711d7..d82c71f1 100644 --- a/dist/game.cfg +++ b/dist/game.cfg @@ -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" diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 23fd52f0..23ddcd62 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -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) { diff --git a/regamedll/dlls/client.h b/regamedll/dlls/client.h index d00252e8..0851f53a 100644 --- a/regamedll/dlls/client.h +++ b/regamedll/dlls/client.h @@ -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(); diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 6065242f..74c4d74e 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -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 + } diff --git a/regamedll/dlls/game.h b/regamedll/dlls/game.h index 6bda9f9f..e089cce7 100644 --- a/regamedll/dlls/game.h +++ b/regamedll/dlls/game.h @@ -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 diff --git a/regamedll/dlls/gamerules.cpp b/regamedll/dlls/gamerules.cpp index f3e562ad..654d6b4a 100644 --- a/regamedll/dlls/gamerules.cpp +++ b/regamedll/dlls/gamerules.cpp @@ -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();