diff --git a/README.md b/README.md index 93cd795d..2654bcf7 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ This means that plugins that do binary code analysis (Orpheu for example) probab | mp_freezetime_duck | 1 | 0 | 1 | Allow players to duck during freezetime.
`0` disabled
`1` enabled | | mp_freezetime_jump | 1 | 0 | 1 | Allow players to jump during freezetime.
`0` disabled
`1` enabled | | mp_defuser_allocation | 0 | 0 | 2 | Give defuser on player spawn.
`0` disabled
`1` Random players.
`2` All players. | +| mp_location_area_info | 0 | 0 | 1 | Enable location area info.
`0` disabled
`1` enabled.
Usually displayed in HUDs below radar or in radio chat as a prefix.
`NOTE`: Navigation `maps/.nav` file required and should contain place names | ## How to install zBot for CS 1.6? diff --git a/dist/game.cfg b/dist/game.cfg index 91009dd0..f426c00b 100644 --- a/dist/game.cfg +++ b/dist/game.cfg @@ -575,3 +575,13 @@ mp_freezetime_jump "1" // // Default value: "0" mp_defuser_allocation "0" + +// Enable location area info +// Usually displayed in HUDs below radar or in radio chat as a prefix +// 0 - disabled (default behavior) +// 1 - enabled +// +// NOTE: Navigation maps/.nav file required and should contain place names +// +// Default value: "0" +mp_location_area_info "0" diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 2a58443d..0564bedd 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -3723,6 +3723,9 @@ void EXT_FUNC ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) #ifdef REGAMEDLL_ADD CSGameRules()->ServerActivate(); + + if (location_area_info.value) + LoadNavigationMap(); #endif } diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 4ab375d8..d9d75677 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -178,6 +178,7 @@ cvar_t legacy_vehicle_block = { "mp_legacy_vehicle_block", "1", 0, cvar_t dying_time = { "mp_dying_time", "3.0", 0, 3.0f, nullptr }; cvar_t defuser_allocation = { "mp_defuser_allocation", "0", 0, 0.0f, nullptr }; +cvar_t location_area_info = { "mp_location_area_info", "0", 0, 0.0f, nullptr }; void GameDLL_Version_f() { @@ -441,6 +442,7 @@ void EXT_FUNC GameDLLInit() CVAR_REGISTER(&freezetime_duck); CVAR_REGISTER(&freezetime_jump); CVAR_REGISTER(&defuser_allocation); + CVAR_REGISTER(&location_area_info); // print version CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n"); diff --git a/regamedll/dlls/game.h b/regamedll/dlls/game.h index 706e1c2a..73cb77dd 100644 --- a/regamedll/dlls/game.h +++ b/regamedll/dlls/game.h @@ -201,6 +201,7 @@ extern cvar_t assist_damage_threshold; extern cvar_t freezetime_duck; extern cvar_t freezetime_jump; extern cvar_t defuser_allocation; +extern cvar_t location_area_info; #endif diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 3638f261..b5134ea8 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -10083,7 +10083,11 @@ void CBasePlayer::UpdateLocation(bool forceUpdate) const char *placeName = ""; - if (pev->deadflag == DEAD_NO && AreBotsAllowed()) + if (pev->deadflag == DEAD_NO && ( +#ifdef REGAMEDLL_ADD + location_area_info.value || +#endif + AreBotsAllowed())) { // search the place name where is located the player Place playerPlace = TheNavAreaGrid.GetPlace(&pev->origin);