2016-03-05 21:04:46 +03:00
//
2020-06-12 18:52:38 +03:00
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
2014-09-09 18:30:40 +04:00
//
2020-06-12 18:52:38 +03:00
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
2014-09-09 18:30:40 +04:00
//
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
# include <yapb.h>
2014-09-09 18:30:40 +04:00
2020-06-12 20:05:07 +03:00
ConVar cv_autovacate ( " yb_autovacate " , " 1 " , " Kick bots to automatically make room for human players. " ) ;
2014-09-09 18:30:40 +04:00
2020-06-12 20:05:07 +03:00
ConVar cv_quota ( " yb_quota " , " 0 " , " Specifies the number bots to be added to the game. " , true , 0.0f , static_cast < float > ( kGameMaxPlayers ) ) ;
ConVar cv_quota_mode ( " yb_quota_mode " , " normal " , " Specifies the type of quota. \n Allowed values: 'normal', 'fill', and 'match'. \n If 'fill', the server will adjust bots to keep N players in the game, where N is yb_quota. \n If 'match', the server will maintain a 1:N ratio of humans to bots, where N is yb_quota_match. " , false ) ;
ConVar cv_quota_match ( " yb_quota_match " , " 0 " , " Number of players to match if yb_quota_mode set to 'match' " , true , 0.0f , static_cast < float > ( kGameMaxPlayers ) ) ;
ConVar cv_think_fps ( " yb_think_fps " , " 30.0 " , " Specifies how many times per second bot code will run. " , true , 30.0f , 90.0f ) ;
ConVar cv_autokill_delay ( " yb_autokill_delay " , " 0.0 " , " Specifies amount of time in seconds when bots will be killed if no humans left alive. " , true , 0.0f , 90.0f ) ;
2014-09-09 18:30:40 +04:00
2020-06-12 20:05:07 +03:00
ConVar cv_join_after_player ( " yb_join_after_player " , " 0 " , " Specifies whether bots should join server, only when at least one human player in game. " ) ;
ConVar cv_join_team ( " yb_join_team " , " any " , " Forces all bots to join team specified here. " , false ) ;
ConVar cv_join_delay ( " yb_join_delay " , " 5.0 " , " Specifies after how many seconds bots should start to join the game after the changelevel. " , true , 0.0f , 30.0f ) ;
ConVar cv_name_prefix ( " yb_name_prefix " , " " , " All the bot names will be prefixed with string specified with this cvar. " , false ) ;
2020-09-16 13:07:47 +03:00
2020-06-12 20:05:07 +03:00
ConVar cv_difficulty ( " yb_difficulty " , " 4 " , " All bots difficulty level. Changing at runtime will affect already created bots. " , true , 0.0f , 4.0f ) ;
2014-09-09 18:30:40 +04:00
2020-09-16 13:07:47 +03:00
ConVar cv_difficulty_min ( " yb_difficulty_min " , " -1 " , " Lower bound of random difficulty on bot creation. Only affects newly created bots. -1 means yb_difficulty only used. " , true , - 1.0f , 4.0f ) ;
ConVar cv_difficulty_max ( " yb_difficulty_max " , " -1 " , " Upper bound of random difficulty on bot creation. Only affects newly created bots. -1 means yb_difficulty only used. " , true , - 1.0f , 4.0f ) ;
ConVar cv_difficulty_auto ( " yb_difficulty_auto " , " 0 " , " Enables each bot balances own difficulty based kd-ratio of team. " , true , 0.0f , 1.0f ) ;
2020-06-12 20:05:07 +03:00
ConVar cv_show_avatars ( " yb_show_avatars " , " 1 " , " Enables or disabels displaying bot avatars in front of their names in scoreboard. Note, that is currently you can see only avatars of your steam friends. " ) ;
ConVar cv_show_latency ( " yb_show_latency " , " 2 " , " Enables latency display in scoreboard. \n Allowed values: '0', '1', '2'. \n If '0', there is nothing displayed. \n If '1', there is a 'BOT' is displayed. \n If '2' fake ping is displayed. " , true , 0.0f , 2.0f ) ;
2019-08-24 12:43:42 +03:00
2020-10-01 11:42:51 +03:00
ConVar cv_botskin_t ( " yb_botskin_t " , " 0 " , " Specifies the bots wanted skin for Terrorist team " , true , 0.0f , 5.0f ) ;
ConVar cv_botskin_ct ( " yb_botskin_ct " , " 0 " , " Specifies the bots wanted skin for CT team " , true , 0.0f , 5.0f ) ;
ConVar cv_ping_base_min ( " yb_ping_base_min " , " 7 " , " Lower bound for base bot ping shown in scoreboard upon creation. " , true , 0.0f , 100.0f ) ;
ConVar cv_ping_base_max ( " yb_ping_base_max " , " 34 " , " Upper bound for base bot ping shown in scoreboard upon creation. " , true , 0.0f , 100.0f ) ;
2020-06-12 20:05:07 +03:00
ConVar cv_language ( " yb_language " , " en " , " Specifies the language for bot messages and menus. " , false ) ;
2019-07-01 21:10:00 +03:00
2020-06-12 18:52:38 +03:00
ConVar mp_limitteams ( " mp_limitteams " , nullptr , Var : : GameRef ) ;
ConVar mp_autoteambalance ( " mp_autoteambalance " , nullptr , Var : : GameRef ) ;
ConVar mp_roundtime ( " mp_roundtime " , nullptr , Var : : GameRef ) ;
ConVar mp_timelimit ( " mp_timelimit " , nullptr , Var : : GameRef ) ;
ConVar mp_freezetime ( " mp_freezetime " , nullptr , Var : : GameRef , true , " 0 " ) ;
2016-10-18 20:34:02 +03:00
2019-07-27 17:36:24 +03:00
BotManager : : BotManager ( ) {
2014-09-09 18:30:40 +04:00
// this is a bot manager class constructor
2019-05-13 21:41:14 +03:00
m_lastDifficulty = 0 ;
2014-09-09 18:30:40 +04:00
m_lastWinner = - 1 ;
2019-07-28 15:47:46 +03:00
m_timeRoundStart = 0.0f ;
m_timeRoundMid = 0.0f ;
m_timeRoundEnd = 0.0f ;
2020-02-08 00:03:52 +03:00
m_autoKillCheckTime = 0.0f ;
2019-07-28 15:47:46 +03:00
m_bombPlanted = false ;
m_botsCanPause = false ;
2020-02-08 00:03:52 +03:00
m_roundOver = false ;
2019-07-28 15:47:46 +03:00
m_bombSayStatus = BombPlantedSay : : ChatSay | BombPlantedSay : : Chatter ;
2019-07-27 17:36:24 +03:00
for ( int i = 0 ; i < kGameTeamNum ; + + i ) {
2016-09-13 22:40:06 +03:00
m_leaderChoosen [ i ] = false ;
m_economicsGood [ i ] = true ;
2019-09-14 23:13:55 +03:00
m_lastRadioTime [ i ] = 0.0f ;
m_lastRadio [ i ] = - 1 ;
2016-09-13 22:40:06 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
reset ( ) ;
2014-09-09 18:30:40 +04:00
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ;
2016-09-11 21:01:06 +03:00
m_killerEntity = nullptr ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2019-07-01 21:10:00 +03:00
initFilters ( ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : createKillerEntity ( ) {
2020-02-08 00:03:52 +03:00
// this function creates single trigger_hurt for using in Bot::kill, to reduce lags, when killing all the bots
2015-07-26 21:47:29 +03:00
2019-07-01 21:10:00 +03:00
m_killerEntity = engfuncs . pfnCreateNamedEntity ( MAKE_STRING ( " trigger_hurt " ) ) ;
2015-07-26 21:47:29 +03:00
2019-08-04 18:22:01 +03:00
m_killerEntity - > v . dmg = kInfiniteDistance ;
2015-07-26 21:47:29 +03:00
m_killerEntity - > v . dmg_take = 1.0f ;
m_killerEntity - > v . dmgtime = 2.0f ;
m_killerEntity - > v . effects | = EF_NODRAW ;
2019-08-04 18:22:01 +03:00
engfuncs . pfnSetOrigin ( m_killerEntity , Vector ( - kInfiniteDistance , - kInfiniteDistance , - kInfiniteDistance ) ) ;
2015-07-26 21:47:29 +03:00
MDLL_Spawn ( m_killerEntity ) ;
}
2019-07-27 17:36:24 +03:00
void BotManager : : destroyKillerEntity ( ) {
2019-07-01 21:10:00 +03:00
if ( ! game . isNullEntity ( m_killerEntity ) ) {
engfuncs . pfnRemoveEntity ( m_killerEntity ) ;
2020-07-15 21:58:57 +03:00
m_killerEntity = nullptr ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2015-07-26 21:47:29 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : touchKillerEntity ( Bot * bot ) {
// bot is already dead.
if ( ! bot - > m_notKilled ) {
2015-07-26 21:47:29 +03:00
return ;
}
2016-01-03 22:03:02 +03:00
2019-07-01 21:10:00 +03:00
if ( game . isNullEntity ( m_killerEntity ) ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
createKillerEntity ( ) ;
2019-07-01 21:10:00 +03:00
if ( game . isNullEntity ( m_killerEntity ) ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
MDLL_ClientKill ( bot - > ent ( ) ) ;
return ;
}
}
2019-07-01 21:10:00 +03:00
const auto & prop = conf . getWeaponProp ( bot - > m_currentWeapon ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2019-08-12 14:16:28 +03:00
m_killerEntity - > v . classname = MAKE_STRING ( prop . classname . chars ( ) ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_killerEntity - > v . dmg_inflictor = bot - > ent ( ) ;
2015-07-26 21:47:29 +03:00
KeyValueData kv ;
2019-08-12 14:16:28 +03:00
kv . szClassName = const_cast < char * > ( prop . classname . chars ( ) ) ;
2015-07-26 21:47:29 +03:00
kv . szKeyName = " damagetype " ;
2019-07-27 17:36:24 +03:00
kv . szValue = const_cast < char * > ( strings . format ( " %d " , cr : : bit ( 4 ) ) ) ;
2020-06-12 18:52:38 +03:00
kv . fHandled = HLFalse ;
2015-07-26 21:47:29 +03:00
MDLL_KeyValue ( m_killerEntity , & kv ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
MDLL_Touch ( m_killerEntity , bot - > ent ( ) ) ;
2015-07-26 21:47:29 +03:00
}
2020-06-12 18:52:38 +03:00
void BotManager : : execGameEntity ( edict_t * ent ) {
2014-09-09 18:30:40 +04:00
// this function calls gamedll player() function, in case to create player entity in game
2019-07-27 17:36:24 +03:00
if ( game . is ( GameFlags : : Metamod ) ) {
2020-06-12 18:52:38 +03:00
CALL_GAME_ENTITY ( PLID , " player " , & ent - > v ) ;
2014-09-09 18:30:40 +04:00
return ;
}
2020-06-12 18:52:38 +03:00
ents . callPlayerFunction ( ent ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : forEach ( ForEachBot handler ) {
for ( const auto & bot : m_bots ) {
if ( handler ( bot . get ( ) ) ) {
return ;
}
}
}
2020-10-01 11:42:51 +03:00
BotCreateResult BotManager : : create ( StringRef name , int difficulty , int personality , int team , int skin ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// this function completely prepares bot entity (edict) for creation, creates team, difficulty, sets named etc, and
2014-09-09 18:30:40 +04:00
// then sends result to bot constructor
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2016-09-11 21:01:06 +03:00
edict_t * bot = nullptr ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
String resultName ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
// do not allow create bots when there is no graph
if ( ! graph . length ( ) ) {
2019-08-07 15:25:14 +03:00
ctrl . msg ( " There is no graph found. Cannot create bot. " ) ;
2019-07-27 17:36:24 +03:00
return BotCreateResult : : GraphError ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2019-07-27 17:36:24 +03:00
// don't allow creating bots with changed graph (distance tables are messed up)
else if ( graph . hasChanged ( ) ) {
ctrl . msg ( " Graph has been changed. Load graph again... " ) ;
return BotCreateResult : : GraphError ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
else if ( team ! = - 1 & & isTeamStacked ( team - 1 ) ) {
2019-07-27 17:36:24 +03:00
ctrl . msg ( " Desired team is stacked. Unable to proceed with bot creation. " ) ;
return BotCreateResult : : TeamStacked ;
2016-10-18 20:34:02 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( difficulty < 0 | | difficulty > 4 ) {
2020-06-12 18:52:38 +03:00
difficulty = cv_difficulty . int_ ( ) ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( difficulty < 0 | | difficulty > 4 ) {
2020-09-29 19:23:26 +03:00
difficulty = rg . get ( 3 , 4 ) ;
2020-06-12 18:52:38 +03:00
cv_difficulty . set ( difficulty ) ;
2016-10-18 20:34:02 +03:00
}
2015-06-04 11:52:48 +03:00
}
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
if ( personality < Personality : : Normal | | personality > Personality : : Careful ) {
if ( rg . chance ( 50 ) ) {
personality = Personality : : Normal ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
else {
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 50 ) ) {
personality = Personality : : Rusher ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
else {
2019-07-27 17:36:24 +03:00
personality = Personality : : Careful ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
}
2016-09-15 13:26:13 +03:00
BotName * botName = nullptr ;
2015-06-20 13:38:13 +03:00
2014-09-09 18:30:40 +04:00
// setup name
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( name . empty ( ) ) {
2019-07-01 21:10:00 +03:00
botName = conf . pickBotName ( ) ;
2014-09-09 18:30:40 +04:00
2019-07-01 21:10:00 +03:00
if ( botName ) {
resultName = botName - > name ;
}
else {
2020-09-29 19:23:26 +03:00
resultName . assignf ( " %s_%d.%d " , product . folder , rg . get ( 100 , 10000 ) , rg . get ( 100 , 10000 ) ) ; // just pick ugly random name
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
else {
resultName = name ;
2014-09-09 18:30:40 +04:00
}
2020-06-12 18:52:38 +03:00
if ( ! strings . isEmpty ( cv_name_prefix . str ( ) ) ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
String prefixed ; // temp buffer for storing modified name
2020-06-12 18:52:38 +03:00
prefixed . assignf ( " %s %s " , cv_name_prefix . str ( ) , resultName ) ;
2014-09-09 18:30:40 +04:00
// buffer has been modified, copy to real name
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
resultName = cr : : move ( prefixed ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-01 21:10:00 +03:00
bot = engfuncs . pfnCreateFakeClient ( resultName . chars ( ) ) ;
2014-09-09 18:30:40 +04:00
2019-07-01 21:10:00 +03:00
if ( game . isNullEntity ( bot ) ) {
ctrl . msg ( " Maximum players reached (%d/%d). Unable to create Bot. " , game . maxClients ( ) , game . maxClients ( ) ) ;
2019-07-27 17:36:24 +03:00
return BotCreateResult : : MaxPlayersReached ;
2014-09-09 18:30:40 +04:00
}
2020-10-01 11:42:51 +03:00
auto object = cr : : makeUnique < Bot > ( bot , difficulty , personality , team , skin ) ;
2019-07-27 17:36:24 +03:00
auto index = object - > index ( ) ;
2014-09-09 18:30:40 +04:00
2016-09-15 13:26:13 +03:00
// assign owner of bot name
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( botName ! = nullptr ) {
2019-07-27 17:36:24 +03:00
botName - > usedBy = index ; // save by who name is used
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-07-27 17:36:24 +03:00
m_bots . push ( cr : : move ( object ) ) ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
ctrl . msg ( " Connecting Bot... " ) ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
return BotCreateResult : : Success ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
Bot * BotManager : : findBotByIndex ( int index ) {
2014-09-09 18:30:40 +04:00
// this function finds a bot specified by index, and then returns pointer to it (using own bot array)
2019-07-27 17:36:24 +03:00
if ( index < 0 | | index > = kGameMaxPlayers ) {
2016-09-11 21:01:06 +03:00
return nullptr ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-04 18:22:01 +03:00
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( bot - > m_index = = index ) {
return bot . get ( ) ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-08-22 17:01:16 +03:00
return nullptr ; // no bot
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
Bot * BotManager : : findBotByEntity ( edict_t * ent ) {
2014-09-09 18:30:40 +04:00
// same as above, but using bot entity
2019-07-27 17:36:24 +03:00
return findBotByIndex ( game . indexOfPlayer ( ent ) ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
Bot * BotManager : : findAliveBot ( ) {
2014-09-09 18:30:40 +04:00
// this function finds one bot, alive bot :)
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( bot - > m_notKilled ) {
return bot . get ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
2016-09-11 21:01:06 +03:00
return nullptr ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : frame ( ) {
2019-08-18 21:00:00 +03:00
// this function calls showframe function for all available at call moment bots
2015-07-12 17:18:20 +03:00
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
bot - > frame ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2015-07-12 17:18:20 +03:00
}
2020-10-01 11:42:51 +03:00
void BotManager : : addbot ( StringRef name , int difficulty , int personality , int team , int skin , bool manual ) {
2014-09-09 18:30:40 +04:00
// this function putting bot creation process to queue to prevent engine crashes
2019-09-22 00:39:24 +03:00
BotRequest request { } ;
2014-09-09 18:30:40 +04:00
// fill the holder
2019-09-22 00:39:24 +03:00
request . name = name ;
request . difficulty = difficulty ;
request . personality = personality ;
request . team = team ;
2020-10-01 11:42:51 +03:00
request . skin = skin ;
2019-09-22 00:39:24 +03:00
request . manual = manual ;
2014-09-09 18:30:40 +04:00
// put to queue
2019-09-22 00:39:24 +03:00
m_addRequests . push ( cr : : move ( request ) ) ;
2014-09-09 18:30:40 +04:00
}
2020-10-01 11:42:51 +03:00
void BotManager : : addbot ( StringRef name , StringRef difficulty , StringRef personality , StringRef team , StringRef skin , bool manual ) {
2014-09-09 18:30:40 +04:00
// this function is same as the function above, but accept as parameters string instead of integers
2019-09-22 00:39:24 +03:00
BotRequest request { } ;
2020-06-12 18:52:38 +03:00
StringRef any = " * " ;
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
request . name = ( name . empty ( ) | | name = = any ) ? StringRef ( " \0 " ) : name ;
2019-09-22 00:39:24 +03:00
request . difficulty = ( difficulty . empty ( ) | | difficulty = = any ) ? - 1 : difficulty . int_ ( ) ;
request . team = ( team . empty ( ) | | team = = any ) ? - 1 : team . int_ ( ) ;
2020-10-01 11:42:51 +03:00
request . skin = ( skin . empty ( ) | | skin = = any ) ? - 1 : skin . int_ ( ) ;
2019-09-22 00:39:24 +03:00
request . personality = ( personality . empty ( ) | | personality = = any ) ? - 1 : personality . int_ ( ) ;
request . manual = manual ;
2014-09-09 18:30:40 +04:00
2019-09-22 00:39:24 +03:00
m_addRequests . push ( cr : : move ( request ) ) ;
2016-01-12 23:57:02 +03:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : maintainQuota ( ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// this function keeps number of bots up to date, and don't allow to maintain bot creation
// while creation process in process.
2016-01-12 23:57:02 +03:00
2019-07-27 17:36:24 +03:00
if ( graph . length ( ) < 1 | | graph . hasChanged ( ) ) {
2020-06-12 18:52:38 +03:00
if ( cv_quota . int_ ( ) > 0 ) {
2019-07-28 15:47:46 +03:00
ctrl . msg ( " There is no graph found. Cannot create bot. " ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
cv_quota . set ( 0 ) ;
2016-01-12 23:57:02 +03:00
return ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-01-12 23:57:02 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// bot's creation update
2019-09-22 00:39:24 +03:00
if ( ! m_addRequests . empty ( ) & & m_maintainTime < game . time ( ) ) {
const BotRequest & last = m_addRequests . pop ( ) ;
2020-10-01 11:42:51 +03:00
const BotCreateResult callResult = create ( last . name , last . difficulty , last . personality , last . team , last . skin ) ;
2016-11-02 18:36:05 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( last . manual ) {
2020-06-12 18:52:38 +03:00
cv_quota . set ( cv_quota . int_ ( ) + 1 ) ;
2016-01-30 14:02:28 +03:00
}
2016-01-16 21:08:22 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// check the result of creation
2019-07-27 17:36:24 +03:00
if ( callResult = = BotCreateResult : : GraphError ) {
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ; // something wrong with graph, reset tab of creation
2020-06-12 18:52:38 +03:00
cv_quota . set ( 0 ) ; // reset quota
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( callResult = = BotCreateResult : : MaxPlayersReached ) {
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ; // maximum players reached, so set quota to maximum players
2020-06-12 18:52:38 +03:00
cv_quota . set ( getBotCount ( ) ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( callResult = = BotCreateResult : : TeamStacked ) {
2019-07-01 21:10:00 +03:00
ctrl . msg ( " Could not add bot to the game: Team is stacked (to disable this check, set mp_limitteams and mp_autoteambalance to zero and restart the round) " ) ;
2016-01-16 21:08:22 +03:00
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ;
2020-06-12 18:52:38 +03:00
cv_quota . set ( getBotCount ( ) ) ;
2016-01-16 21:08:22 +03:00
}
2019-08-18 21:00:00 +03:00
m_maintainTime = game . time ( ) + 0.10f ;
2016-01-16 21:08:22 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// now keep bot number up to date
2019-08-18 21:00:00 +03:00
if ( m_quotaMaintainTime > game . time ( ) ) {
2016-11-02 18:36:05 +03:00
return ;
2016-01-16 21:08:22 +03:00
}
2020-06-12 18:52:38 +03:00
cv_quota . set ( cr : : clamp < int > ( cv_quota . int_ ( ) , 0 , game . maxClients ( ) ) ) ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
int totalHumansInGame = getHumansCount ( ) ;
int humanPlayersInGame = getHumansCount ( true ) ;
2014-09-09 18:30:40 +04:00
2019-07-01 21:10:00 +03:00
if ( ! game . isDedicated ( ) & & ! totalHumansInGame ) {
2015-12-26 01:31:46 +03:00
return ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-05-05 01:01:12 +03:00
2020-06-12 18:52:38 +03:00
int desiredBotCount = cv_quota . int_ ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
int botsInGame = getBotCount ( ) ;
2015-12-26 01:31:46 +03:00
2020-06-12 18:52:38 +03:00
if ( strings . matches ( cv_quota_mode . str ( ) , " fill " ) ) {
2019-05-05 01:01:12 +03:00
botsInGame + = humanPlayersInGame ;
2014-09-09 18:30:40 +04:00
}
2020-06-12 18:52:38 +03:00
else if ( strings . matches ( cv_quota_mode . str ( ) , " match " ) ) {
int detectQuotaMatch = cv_quota_match . int_ ( ) = = 0 ? cv_quota . int_ ( ) : cv_quota_match . int_ ( ) ;
2019-05-05 01:01:12 +03:00
desiredBotCount = cr : : max < int > ( 0 , detectQuotaMatch * humanPlayersInGame ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-01-12 23:57:02 +03:00
2020-06-12 18:52:38 +03:00
if ( cv_join_after_player . bool_ ( ) & & humanPlayersInGame = = 0 ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
desiredBotCount = 0 ;
}
2019-07-01 21:10:00 +03:00
int maxClients = game . maxClients ( ) ;
2018-06-23 21:28:40 +06:00
2020-06-12 18:52:38 +03:00
if ( cv_autovacate . bool_ ( ) ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
desiredBotCount = cr : : min < int > ( desiredBotCount , maxClients - ( humanPlayersInGame + 1 ) ) ;
}
else {
desiredBotCount = cr : : min < int > ( desiredBotCount , maxClients - humanPlayersInGame ) ;
}
2019-07-27 17:36:24 +03:00
int maxSpawnCount = game . getSpawnCount ( Team : : Terrorist ) + game . getSpawnCount ( Team : : CT ) - humanPlayersInGame ;
2019-07-01 21:10:00 +03:00
// sent message only to console from here
ctrl . setFromConsole ( true ) ;
2016-01-12 23:57:02 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// add bots if necessary
2019-05-13 21:41:14 +03:00
if ( desiredBotCount > botsInGame & & botsInGame < maxSpawnCount ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
createRandom ( ) ;
}
else if ( desiredBotCount < botsInGame ) {
2019-07-27 17:36:24 +03:00
auto tp = countTeamPlayers ( ) ;
2019-05-05 18:52:28 +03:00
2019-05-11 23:55:33 +03:00
bool isKicked = false ;
2019-07-27 17:36:24 +03:00
if ( tp . first > tp . second ) {
isKicked = kickRandom ( false , Team : : Terrorist ) ;
2019-05-05 18:52:28 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( tp . first < tp . second ) {
isKicked = kickRandom ( false , Team : : CT ) ;
2019-05-05 18:52:28 +03:00
}
else {
2019-07-27 17:36:24 +03:00
isKicked = kickRandom ( false , Team : : Unassigned ) ;
2019-05-11 23:55:33 +03:00
}
// if we can't kick player from correct team, just kick any random to keep quota control work
if ( ! isKicked ) {
2019-07-27 17:36:24 +03:00
kickRandom ( false , Team : : Unassigned ) ;
2019-05-05 18:52:28 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-18 21:00:00 +03:00
m_quotaMaintainTime = game . time ( ) + 0.40f ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-01-12 23:57:02 +03:00
2020-06-12 18:52:38 +03:00
void BotManager : : maintainLeaders ( ) {
// select leader each team somewhere in round start
if ( m_timeRoundStart + 5.0f > game . time ( ) & & m_timeRoundStart + 10.0f < game . time ( ) ) {
for ( int team = 0 ; team < kGameTeamNum ; + + team ) {
selectLeaders ( team , false ) ;
}
}
}
2020-02-08 00:03:52 +03:00
void BotManager : : maintainAutoKill ( ) {
2020-06-12 18:52:38 +03:00
const float killDelay = cv_autokill_delay . float_ ( ) ;
2020-02-08 00:03:52 +03:00
if ( killDelay < 1.0f | | m_roundOver ) {
return ;
}
// check if we're reached the delay, so kill out bots
if ( ! cr : : fzero ( m_autoKillCheckTime ) & & m_autoKillCheckTime < game . time ( ) ) {
killAllBots ( ) ;
m_autoKillCheckTime = 0.0f ;
return ;
}
int aliveBots = 0 ;
// do not interrupt bomb-defuse scenario
if ( game . mapIs ( MapFlags : : Demolition ) & & isBombPlanted ( ) ) {
return ;
}
int totalHumans = getHumansCount ( true ) ; // we're ignore spectators intentionally
// if we're have no humans in teams do not bother to proceed
if ( ! totalHumans ) {
return ;
}
for ( const auto & bot : m_bots ) {
if ( bot - > m_notKilled ) {
+ + aliveBots ;
// do not interrupt assassination scenario, if vip is a bot
if ( game . is ( MapFlags : : Assassination ) & & util . isPlayerVIP ( bot - > ent ( ) ) ) {
return ;
}
}
}
int aliveHumans = getAliveHumansCount ( ) ;
// check if we're have no alive players and some alive bots, and start autokill timer
if ( ! aliveHumans & & aliveBots > 0 & & cr : : fzero ( m_autoKillCheckTime ) ) {
m_autoKillCheckTime = game . time ( ) + killDelay ;
}
}
2019-07-27 17:36:24 +03:00
void BotManager : : reset ( ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_maintainTime = 0.0f ;
m_quotaMaintainTime = 0.0f ;
m_grenadeUpdateTime = 0.0f ;
m_entityUpdateTime = 0.0f ;
2019-07-02 09:33:39 +03:00
m_plantSearchUpdateTime = 0.0f ;
m_lastChatTime = 0.0f ;
m_timeBombPlanted = 0.0f ;
2019-07-28 15:47:46 +03:00
m_bombSayStatus = BombPlantedSay : : ChatSay | BombPlantedSay : : Chatter ;
2016-01-12 23:57:02 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_intrestingEntities . clear ( ) ;
m_activeGrenades . clear ( ) ;
}
2016-01-12 23:57:02 +03:00
2019-07-27 17:36:24 +03:00
void BotManager : : initFilters ( ) {
2019-07-01 21:10:00 +03:00
// table with all available actions for the bots (filtered in & out in bot::setconditions) some of them have subactions included
2019-09-21 23:20:33 +03:00
m_filters . emplace ( & Bot : : normal_ , Task : : Normal , 0.0f , kInvalidNodeIndex , 0.0f , true ) ;
m_filters . emplace ( & Bot : : pause_ , Task : : Pause , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : moveToPos_ , Task : : MoveToPosition , 0.0f , kInvalidNodeIndex , 0.0f , true ) ;
m_filters . emplace ( & Bot : : followUser_ , Task : : FollowUser , 0.0f , kInvalidNodeIndex , 0.0f , true ) ;
m_filters . emplace ( & Bot : : pickupItem_ , Task : : PickupItem , 0.0f , kInvalidNodeIndex , 0.0f , true ) ;
m_filters . emplace ( & Bot : : camp_ , Task : : Camp , 0.0f , kInvalidNodeIndex , 0.0f , true ) ;
m_filters . emplace ( & Bot : : plantBomb_ , Task : : PlantBomb , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : defuseBomb_ , Task : : DefuseBomb , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : attackEnemy_ , Task : : Attack , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : huntEnemy_ , Task : : Hunt , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : seekCover_ , Task : : SeekCover , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : throwExplosive_ , Task : : ThrowExplosive , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : throwFlashbang_ , Task : : ThrowFlashbang , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : throwSmoke_ , Task : : ThrowSmoke , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : doublejump_ , Task : : DoubleJump , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : escapeFromBomb_ , Task : : EscapeFromBomb , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : shootBreakable_ , Task : : ShootBreakable , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : hide_ , Task : : Hide , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : blind_ , Task : : Blind , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
m_filters . emplace ( & Bot : : spraypaint_ , Task : : Spraypaint , 0.0f , kInvalidNodeIndex , 0.0f , false ) ;
2019-07-27 17:36:24 +03:00
}
void BotManager : : resetFilters ( ) {
2019-07-01 21:10:00 +03:00
for ( auto & task : m_filters ) {
task . time = 0.0f ;
}
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : decrementQuota ( int by ) {
if ( by ! = 0 ) {
2020-06-12 18:52:38 +03:00
cv_quota . set ( cr : : clamp < int > ( cv_quota . int_ ( ) - by , 0 , cv_quota . int_ ( ) ) ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
return ;
2014-09-09 18:30:40 +04:00
}
2020-06-12 18:52:38 +03:00
cv_quota . set ( 0 ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : initQuota ( ) {
2020-06-12 18:52:38 +03:00
m_maintainTime = game . time ( ) + cv_join_delay . float_ ( ) ;
m_quotaMaintainTime = game . time ( ) + cv_join_delay . float_ ( ) ;
2016-01-30 13:15:50 +03:00
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : serverFill ( int selection , int personality , int difficulty , int numToAdd ) {
2014-09-09 18:30:40 +04:00
// this function fill server with bots, with specified team & personality
2016-09-13 19:09:20 +03:00
// always keep one slot
2020-06-12 18:52:38 +03:00
int maxClients = cv_autovacate . bool_ ( ) ? game . maxClients ( ) - 1 - ( game . isDedicated ( ) ? 0 : getHumansCount ( ) ) : game . maxClients ( ) ;
2016-09-13 19:09:20 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( getBotCount ( ) > = maxClients - getHumansCount ( ) ) {
2014-09-09 18:30:40 +04:00
return ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( selection = = 1 | | selection = = 2 ) {
mp_limitteams . set ( 0 ) ;
mp_autoteambalance . set ( 0 ) ;
}
else {
2014-09-09 18:30:40 +04:00
selection = 5 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
char teams [ 6 ] [ 12 ] = { " " , { " Terrorists " } , { " CTs " } , " " , " " , { " Random " } , } ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
int toAdd = numToAdd = = - 1 ? maxClients - ( getHumansCount ( ) + getBotCount ( ) ) : numToAdd ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
for ( int i = 0 ; i < = toAdd ; + + i ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
addbot ( " " , difficulty , personality , selection , - 1 , true ) ;
}
2019-11-30 23:18:37 +03:00
ctrl . msg ( " Fill server with %s bots... " , & teams [ selection ] [ 0 ] ) ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : kickEveryone ( bool instant , bool zeroQuota ) {
2020-06-12 18:52:38 +03:00
// this function drops all bot clients from server (this function removes only yapb's)
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
if ( cv_quota . bool_ ( ) ) {
2019-08-04 18:22:01 +03:00
ctrl . msg ( " Bots are removed from server. " ) ;
2019-07-27 17:36:24 +03:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( zeroQuota ) {
decrementQuota ( 0 ) ;
}
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( instant ) {
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
bot - > kick ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
}
2019-09-22 00:39:24 +03:00
m_addRequests . clear ( ) ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : kickFromTeam ( Team team , bool removeAll ) {
2014-09-09 18:30:40 +04:00
// this function remove random bot from specified team (if removeAll value = 1 then removes all players from team)
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( team = = bot - > m_team ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
decrementQuota ( ) ;
bot - > kick ( ) ;
if ( ! removeAll ) {
2014-09-09 18:30:40 +04:00
break ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
}
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : killAllBots ( int team ) {
2014-09-09 18:30:40 +04:00
// this function kills all bots on server (only this dll controlled bots)
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( team ! = - 1 & & team ! = bot - > m_team ) {
continue ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
bot - > kill ( ) ;
2014-09-09 18:30:40 +04:00
}
2019-11-30 23:18:37 +03:00
ctrl . msg ( " All bots died... " ) ;
2014-09-09 18:30:40 +04:00
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : kickBot ( int index ) {
2019-07-27 17:36:24 +03:00
auto bot = findBotByIndex ( index ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( bot ) {
decrementQuota ( ) ;
bot - > kick ( ) ;
}
}
2019-05-11 23:55:33 +03:00
bool BotManager : : kickRandom ( bool decQuota , Team fromTeam ) {
2014-09-09 18:30:40 +04:00
// this function removes random bot from server (only yapb's)
2019-05-05 18:52:28 +03:00
// if forTeam is unassigned, that means random team
2016-01-16 21:08:22 +03:00
bool deadBotFound = false ;
2019-07-27 17:36:24 +03:00
auto updateQuota = [ & ] ( ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( decQuota ) {
decrementQuota ( ) ;
}
} ;
2019-05-05 18:52:28 +03:00
auto belongsTeam = [ & ] ( Bot * bot ) {
2019-07-27 17:36:24 +03:00
if ( fromTeam = = Team : : Unassigned ) {
2019-05-05 18:52:28 +03:00
return true ;
}
return bot - > m_team = = fromTeam ;
} ;
2016-01-16 21:08:22 +03:00
// first try to kick the bot that is currently dead
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( ! bot - > m_notKilled & & belongsTeam ( bot . get ( ) ) ) // is this slot used?
2016-01-16 21:08:22 +03:00
{
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
updateQuota ( ) ;
bot - > kick ( ) ;
2016-01-16 21:08:22 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
deadBotFound = true ;
2016-01-16 21:08:22 +03:00
break ;
}
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( deadBotFound ) {
2019-05-11 23:55:33 +03:00
return true ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-01-16 21:08:22 +03:00
// if no dead bots found try to find one with lowest amount of frags
2019-07-27 17:36:24 +03:00
Bot * selected = nullptr ;
2019-08-04 18:22:01 +03:00
float score = kInfiniteDistance ;
2016-01-16 21:08:22 +03:00
// search bots in this team
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( bot - > pev - > frags < score & & belongsTeam ( bot . get ( ) ) ) {
selected = bot . get ( ) ;
2016-01-16 21:08:22 +03:00
score = bot - > pev - > frags ;
}
}
// if found some bots
2019-07-27 17:36:24 +03:00
if ( selected ! = nullptr ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
updateQuota ( ) ;
2019-07-27 17:36:24 +03:00
selected - > kick ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2019-05-11 23:55:33 +03:00
return true ;
2016-01-16 21:08:22 +03:00
}
// worst case, just kick some random bot
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( belongsTeam ( bot . get ( ) ) ) // is this slot used?
2014-09-09 18:30:40 +04:00
{
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
updateQuota ( ) ;
2019-05-05 18:52:28 +03:00
bot - > kick ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2019-05-11 23:55:33 +03:00
return true ;
2014-09-09 18:30:40 +04:00
}
}
2019-05-11 23:55:33 +03:00
return false ;
2014-09-09 18:30:40 +04:00
}
2019-09-21 23:20:33 +03:00
void BotManager : : setLastWinner ( int winner ) {
m_lastWinner = winner ;
2020-02-08 00:03:52 +03:00
m_roundOver = true ;
2019-09-21 23:20:33 +03:00
2020-06-12 18:52:38 +03:00
if ( cv_radio_mode . int_ ( ) ! = 2 ) {
2019-09-21 23:20:33 +03:00
return ;
}
auto notify = findAliveBot ( ) ;
if ( notify ) {
if ( notify - > m_team = = winner ) {
if ( getRoundMidTime ( ) > game . time ( ) ) {
notify - > pushChatterMessage ( Chatter : : QuickWonRound ) ;
}
else {
notify - > pushChatterMessage ( Chatter : : WonTheRound ) ;
}
}
}
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : setWeaponMode ( int selection ) {
2014-09-09 18:30:40 +04:00
// this function sets bots weapon mode
2019-07-01 21:10:00 +03:00
selection - - ;
2019-07-27 17:36:24 +03:00
constexpr int std [ 7 ] [ kNumWeapons ] = {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Knife only
{ - 1 , - 1 , - 1 , 2 , 2 , 0 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Pistols only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 2 , 2 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Shotgun only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 2 , 1 , 2 , 0 , 2 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 2 , - 1 } , // Machine Guns only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , 0 , 1 , 0 , 1 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Rifles only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 2 , 2 , 0 , 1 , - 1 , - 1 } , // Snipers only
{ - 1 , - 1 , - 1 , 2 , 2 , 0 , 1 , 2 , 2 , 2 , 1 , 2 , 0 , 2 , 0 , 0 , 1 , 0 , 1 , 1 , 2 , 2 , 0 , 1 , 2 , 1 } // Standard
2014-09-09 18:30:40 +04:00
} ;
2019-07-27 17:36:24 +03:00
constexpr int as [ 7 ] [ kNumWeapons ] = {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Knife only
{ - 1 , - 1 , - 1 , 2 , 2 , 0 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Pistols only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 1 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Shotgun only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 1 , 1 , 1 , 0 , 2 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 1 , - 1 } , // Machine Guns only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , - 1 , 1 , 0 , 1 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 } , // Rifles only
{ - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , 0 , - 1 , 1 , - 1 , - 1 } , // Snipers only
{ - 1 , - 1 , - 1 , 2 , 2 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 2 , 0 , - 1 , 1 , 0 , 1 , 1 , 0 , 0 , - 1 , 1 , 1 , 1 } // Standard
2014-09-09 18:30:40 +04:00
} ;
2019-07-01 21:10:00 +03:00
constexpr char modes [ 7 ] [ 12 ] = { { " Knife " } , { " Pistol " } , { " Shotgun " } , { " Machine Gun " } , { " Rifle " } , { " Sniper " } , { " Standard " } } ;
// get the raw weapons array
auto tab = conf . getRawWeapons ( ) ;
2014-09-09 18:30:40 +04:00
2019-07-01 21:10:00 +03:00
// set the correct weapon mode
2019-07-27 17:36:24 +03:00
for ( int i = 0 ; i < kNumWeapons ; + + i ) {
2019-07-01 21:10:00 +03:00
tab [ i ] . teamStandard = std [ selection ] [ i ] ;
tab [ i ] . teamAS = as [ selection ] [ i ] ;
2014-09-09 18:30:40 +04:00
}
2020-06-12 18:52:38 +03:00
cv_jasonmode . set ( selection = = 0 ? 1 : 0 ) ;
2014-09-09 18:30:40 +04:00
2019-11-30 23:18:37 +03:00
ctrl . msg ( " %s weapon mode selected. " , & modes [ selection ] [ 0 ] ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : listBots ( ) {
2014-09-09 18:30:40 +04:00
// this function list's bots currently playing on the server
2019-08-12 14:16:28 +03:00
ctrl . msg ( " %-3.5s \t %-19.16s \t %-10.12s \t %-3.4s \t %-3.4s \t %-3.4s \t %-3.5s " , " index " , " name " , " personality " , " team " , " difficulty " , " frags " , " alive " ) ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
for ( const auto & bot : bots ) { ;
2019-09-14 23:13:55 +03:00
ctrl . msg ( " [%-3.1d] \t %-19.16s \t %-10.12s \t %-3.4s \t %-3.1d \t %-3.1d \t %-3.4s " , bot - > index ( ) , bot - > pev - > netname . chars ( ) , bot - > m_personality = = Personality : : Rusher ? " rusher " : bot - > m_personality = = Personality : : Normal ? " normal " : " careful " , bot - > m_team = = Team : : CT ? " CT " : " T " , bot - > m_difficulty , static_cast < int > ( bot - > pev - > frags ) , bot - > m_notKilled ? " yes " : " no " ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
ctrl . msg ( " %d bots " , m_bots . length ( ) ) ;
2014-09-09 18:30:40 +04:00
}
2020-06-12 18:52:38 +03:00
float BotManager : : getConnectTime ( int botId , float original ) {
2019-07-31 14:05:36 +03:00
// this function get's fake bot player time.
for ( const auto & bot : m_bots ) {
2020-06-12 18:52:38 +03:00
if ( bot - > entindex ( ) = = botId ) {
2020-09-29 19:23:26 +03:00
return bot - > getConnectionTime ( ) ;
2019-07-31 14:05:36 +03:00
}
}
2020-06-12 18:52:38 +03:00
return original ;
2019-07-31 14:05:36 +03:00
}
2020-09-16 13:07:47 +03:00
float BotManager : : getAverageTeamKPD ( bool calcForBots ) {
Twin < float , int32 > calc { } ;
for ( const auto & client : util . getClients ( ) ) {
if ( ! ( client . flags & ClientFlags : : Used ) ) {
continue ;
}
auto bot = bots [ client . ent ] ;
if ( ( calcForBots & & bot ) | | ( ! calcForBots & & ! bot ) ) {
calc . first + = client . ent - > v . frags ;
calc . second + + ;
}
}
if ( calc . second > 0 ) {
return calc . first / calc . second ;
}
return 0.0f ;
}
2019-07-27 17:36:24 +03:00
Twin < int , int > BotManager : : countTeamPlayers ( ) {
int ts = 0 , cts = 0 ;
2019-07-01 21:10:00 +03:00
for ( const auto & client : util . getClients ( ) ) {
2019-07-27 17:36:24 +03:00
if ( client . flags & ClientFlags : : Used ) {
if ( client . team2 = = Team : : Terrorist ) {
2019-08-04 18:22:01 +03:00
+ + ts ;
2019-05-05 18:52:28 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( client . team2 = = Team : : CT ) {
2019-08-04 18:22:01 +03:00
+ + cts ;
2019-05-05 18:52:28 +03:00
}
}
}
2019-07-27 17:36:24 +03:00
return { ts , cts } ;
2019-05-05 18:52:28 +03:00
}
2019-07-27 17:36:24 +03:00
Bot * BotManager : : findHighestFragBot ( int team ) {
2014-09-09 18:30:40 +04:00
int bestIndex = 0 ;
float bestScore = - 1 ;
// search bots in this team
2019-07-27 17:36:24 +03:00
for ( const auto & bot : bots ) {
if ( bot - > m_notKilled & & bot - > m_team = = team ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( bot - > pev - > frags > bestScore ) {
2019-07-27 17:36:24 +03:00
bestIndex = bot - > index ( ) ;
2016-01-16 21:08:22 +03:00
bestScore = bot - > pev - > frags ;
2014-09-09 18:30:40 +04:00
}
}
}
2019-07-27 17:36:24 +03:00
return findBotByIndex ( bestIndex ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-01 21:10:00 +03:00
void BotManager : : updateTeamEconomics ( int team , bool setTrue ) {
2014-09-09 18:30:40 +04:00
// this function decides is players on specified team is able to buy primary weapons by calculating players
// that have not enough money to buy primary (with economics), and if this result higher 80%, player is can't
// buy primary weapons.
2020-06-12 18:52:38 +03:00
extern ConVar cv_economics_rounds ;
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
if ( setTrue | | ! cv_economics_rounds . bool_ ( ) ) {
2014-09-09 18:30:40 +04:00
m_economicsGood [ team ] = true ;
return ; // don't check economics while economics disable
}
2019-07-01 21:10:00 +03:00
const int * econLimit = conf . getEconLimit ( ) ;
2014-09-09 18:30:40 +04:00
int numPoorPlayers = 0 ;
int numTeamPlayers = 0 ;
// start calculating
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
if ( bot - > m_team = = team ) {
if ( bot - > m_moneyAmount < = econLimit [ EcoLimit : : PrimaryGreater ] ) {
2019-08-04 18:22:01 +03:00
+ + numPoorPlayers ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-04 18:22:01 +03:00
+ + numTeamPlayers ; // update count of team
2014-09-09 18:30:40 +04:00
}
}
m_economicsGood [ team ] = true ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( numTeamPlayers < = 1 ) {
2014-09-09 18:30:40 +04:00
return ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
// if 80 percent of team have no enough money to purchase primary weapon
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( ( numTeamPlayers * 80 ) / 100 < = numPoorPlayers ) {
2014-09-09 18:30:40 +04:00
m_economicsGood [ team ] = false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
// winner must buy something!
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( m_lastWinner = = team ) {
2014-09-09 18:30:40 +04:00
m_economicsGood [ team ] = true ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : updateBotDifficulties ( ) {
2020-09-16 13:07:47 +03:00
// if min/max difficulty is specified this should not have effect
if ( cv_difficulty_min . int_ ( ) ! = Difficulty : : Invalid | | cv_difficulty_max . int_ ( ) ! = Difficulty : : Invalid | | cv_difficulty_auto . bool_ ( ) ) {
return ;
}
auto difficulty = cv_difficulty . int_ ( ) ;
2019-05-13 21:41:14 +03:00
if ( difficulty ! = m_lastDifficulty ) {
// sets new difficulty for all bots
2019-07-27 17:36:24 +03:00
for ( const auto & bot : m_bots ) {
bot - > m_difficulty = difficulty ;
2019-05-13 21:41:14 +03:00
}
m_lastDifficulty = difficulty ;
}
}
2020-09-16 13:07:47 +03:00
void BotManager : : balanceBotDifficulties ( ) {
extern ConVar cv_whose_your_daddy ;
// with nightmare difficulty, there is no balance
if ( cv_whose_your_daddy . bool_ ( ) ) {
return ;
}
// difficulty chaning once per round (time)
auto updateDifficulty = [ ] ( Bot * bot , int32 offset ) {
bot - > m_difficulty = cr : : clamp ( static_cast < Difficulty > ( bot - > m_difficulty + offset ) , Difficulty : : Noob , Difficulty : : Expert ) ;
} ;
auto ratioPlayer = getAverageTeamKPD ( false ) ;
auto ratioBots = getAverageTeamKPD ( true ) ;
// calculate for each the bot
for ( auto & bot : m_bots ) {
float score = bot - > m_kpdRatio ;
// if kd ratio is going to go to low, we need to try to set higher difficulty
if ( score < 0.8 | | ( score < = 1.2 & & ratioBots < ratioPlayer ) ) {
updateDifficulty ( bot . get ( ) , + 1 ) ;
}
else if ( score > 4.0f | | ( score > = 2.5 & & ratioBots > ratioPlayer ) ) {
updateDifficulty ( bot . get ( ) , - 1 ) ;
}
}
}
2019-07-27 17:36:24 +03:00
void BotManager : : destroy ( ) {
2014-09-09 18:30:40 +04:00
// this function free all bots slots (used on server shutdown)
2019-07-27 17:36:24 +03:00
m_bots . clear ( ) ;
2014-09-09 18:30:40 +04:00
}
2020-10-01 11:42:51 +03:00
Bot : : Bot ( edict_t * bot , int difficulty , int personality , int team , int skin ) {
2019-09-21 23:20:33 +03:00
// this function does core operation of creating bot, it's called by addbot (),
2014-09-09 18:30:40 +04:00
// when bot setup completed, (this is a bot class constructor)
2019-09-21 23:20:33 +03:00
// we're not initializing all the variables in bot class, so do an ugly thing... memset this
plat . bzero ( this , sizeof ( * this ) ) ;
2014-09-09 18:30:40 +04:00
2019-09-21 23:20:33 +03:00
int clientIndex = game . indexOfEntity ( bot ) ;
2015-06-04 11:52:48 +03:00
pev = & bot - > v ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( bot - > pvPrivateData ! = nullptr ) {
2019-07-01 21:10:00 +03:00
engfuncs . pfnFreeEntPrivateData ( bot ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
bot - > pvPrivateData = nullptr ;
2014-09-09 18:30:40 +04:00
bot - > v . frags = 0 ;
// create the player entity by calling MOD's player function
2020-06-12 18:52:38 +03:00
bots . execGameEntity ( bot ) ;
2014-09-09 18:30:40 +04:00
// set all info buffer keys for this bot
2019-07-27 17:36:24 +03:00
auto buffer = engfuncs . pfnGetInfoKeyBuffer ( bot ) ;
2019-07-01 21:10:00 +03:00
engfuncs . pfnSetClientKeyValue ( clientIndex , buffer , " _vgui_menus " , " 0 " ) ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
if ( ! game . is ( GameFlags : : Legacy ) ) {
2020-06-12 18:52:38 +03:00
if ( cv_show_latency . int_ ( ) = = 1 ) {
2019-07-27 17:36:24 +03:00
engfuncs . pfnSetClientKeyValue ( clientIndex , buffer , " *bot " , " 1 " ) ;
}
auto avatar = conf . getRandomAvatar ( ) ;
2020-06-12 18:52:38 +03:00
if ( cv_show_avatars . bool_ ( ) & & ! avatar . empty ( ) ) {
2019-07-27 17:36:24 +03:00
engfuncs . pfnSetClientKeyValue ( clientIndex , buffer , " *sid " , avatar . chars ( ) ) ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
char reject [ 256 ] = { 0 , } ;
2019-09-14 23:13:55 +03:00
MDLL_ClientConnect ( bot , bot - > v . netname . chars ( ) , strings . format ( " 127.0.0.%d " , clientIndex + 100 ) , reject ) ;
2014-09-09 18:30:40 +04:00
2019-08-12 14:16:28 +03:00
if ( ! strings . isEmpty ( reject ) ) {
2019-09-14 23:13:55 +03:00
logger . error ( " Server refused '%s' connection (%s) " , bot - > v . netname . chars ( ) , reject ) ;
game . serverCommand ( " kick \" %s \" " , bot - > v . netname . chars ( ) ) ; // kick the bot player if the server refused it
2014-09-09 18:30:40 +04:00
bot - > v . flags | = FL_KILLME ;
2016-06-23 15:30:19 +03:00
return ;
2014-09-09 18:30:40 +04:00
}
MDLL_ClientPutInServer ( bot ) ;
bot - > v . flags | = FL_FAKECLIENT ; // set this player as fakeclient
// initialize all the variables for this bot...
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_notStarted = true ; // hasn't joined game yet
2016-09-10 19:31:38 +03:00
m_forceRadio = false ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
m_index = clientIndex - 1 ;
m_startAction = BotMsg : : None ;
2016-10-18 20:34:02 +03:00
m_retryJoin = 0 ;
2014-09-09 18:30:40 +04:00
m_moneyAmount = 0 ;
2019-07-27 17:36:24 +03:00
m_logotypeIndex = conf . getRandomLogoIndex ( ) ;
2014-09-09 18:30:40 +04:00
// assign how talkative this bot will be
2020-09-29 19:23:26 +03:00
m_sayTextBuffer . chatDelay = rg . get ( 3.8f , 10.0f ) ;
m_sayTextBuffer . chatProbability = rg . get ( 10 , 100 ) ;
2014-09-09 18:30:40 +04:00
m_notKilled = false ;
2019-07-27 17:36:24 +03:00
m_weaponBurstMode = BurstMode : : Off ;
2020-09-16 13:07:47 +03:00
m_difficulty = cr : : clamp ( static_cast < Difficulty > ( difficulty ) , Difficulty : : Noob , Difficulty : : Expert ) ;
auto minDifficulty = cv_difficulty_min . int_ ( ) ;
auto maxDifficulty = cv_difficulty_max . int_ ( ) ;
// if we're have min/max difficulty specified, choose value from they
if ( minDifficulty ! = Difficulty : : Invalid & & maxDifficulty ! = Difficulty : : Invalid ) {
if ( maxDifficulty > minDifficulty ) {
cr : : swap ( maxDifficulty , minDifficulty ) ;
}
2020-09-29 19:23:26 +03:00
m_difficulty = rg . get ( minDifficulty , maxDifficulty ) ;
2020-09-16 13:07:47 +03:00
}
2020-10-01 11:42:51 +03:00
m_basePing = rg . get ( cv_ping_base_min . int_ ( ) , cv_ping_base_max . int_ ( ) ) ;
2014-09-09 18:30:40 +04:00
2019-08-18 21:00:00 +03:00
m_lastCommandTime = game . time ( ) - 0.1f ;
m_frameInterval = game . time ( ) ;
2019-09-15 21:07:49 +03:00
m_heavyTimestamp = game . time ( ) ;
2019-07-01 21:10:00 +03:00
m_slowFrameTimestamp = 0.0f ;
2020-09-16 13:07:47 +03:00
m_kpdRatio = 0.0f ;
2014-09-09 18:30:40 +04:00
2019-07-31 14:05:36 +03:00
// stuff from jk_botti
2020-09-29 19:23:26 +03:00
m_playServerTime = 60.0f * rg . get ( 30.0f , 240.0f ) ;
m_joinServerTime = plat . seconds ( ) - m_playServerTime * rg . get ( 0.2f , 0.8f ) ;
2019-07-31 14:05:36 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
switch ( personality ) {
2014-09-09 18:30:40 +04:00
case 1 :
2019-07-27 17:36:24 +03:00
m_personality = Personality : : Rusher ;
2020-09-29 19:23:26 +03:00
m_baseAgressionLevel = rg . get ( 0.7f , 1.0f ) ;
m_baseFearLevel = rg . get ( 0.0f , 0.4f ) ;
2014-09-09 18:30:40 +04:00
break ;
case 2 :
2019-07-27 17:36:24 +03:00
m_personality = Personality : : Careful ;
2020-09-29 19:23:26 +03:00
m_baseAgressionLevel = rg . get ( 0.2f , 0.5f ) ;
m_baseFearLevel = rg . get ( 0.7f , 1.0f ) ;
2014-09-09 18:30:40 +04:00
break ;
default :
2019-07-27 17:36:24 +03:00
m_personality = Personality : : Normal ;
2020-09-29 19:23:26 +03:00
m_baseAgressionLevel = rg . get ( 0.4f , 0.7f ) ;
m_baseFearLevel = rg . get ( 0.4f , 0.7f ) ;
2014-09-09 18:30:40 +04:00
break ;
}
2019-09-21 23:20:33 +03:00
plat . bzero ( & m_ammoInClip , sizeof ( m_ammoInClip ) ) ;
plat . bzero ( & m_ammo , sizeof ( m_ammo ) ) ;
2014-09-09 18:30:40 +04:00
m_currentWeapon = 0 ; // current weapon is not assigned at start
2020-09-13 02:21:15 +03:00
m_weaponType = WeaponType : : None ; // current weapon type is not assigned at start
2020-09-29 19:23:26 +03:00
m_voicePitch = rg . get ( 80 , 115 ) ; // assign voice pitch
2014-09-09 18:30:40 +04:00
// copy them over to the temp level variables
m_agressionLevel = m_baseAgressionLevel ;
m_fearLevel = m_baseFearLevel ;
2019-08-18 21:00:00 +03:00
m_nextEmotionUpdate = game . time ( ) + 0.5f ;
2020-09-26 18:41:53 +03:00
m_healthValue = bot - > v . health ;
2014-09-09 18:30:40 +04:00
// just to be sure
2020-09-16 13:07:47 +03:00
m_msgQueue . clear ( ) ;
2014-09-09 18:30:40 +04:00
// assign team and class
m_wantedTeam = team ;
2020-10-01 11:42:51 +03:00
m_wantedSkin = skin ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
newRound ( ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
float Bot : : getFrameInterval ( ) {
2019-08-18 21:00:00 +03:00
return m_frameInterval ;
2017-02-06 22:31:54 +03:00
}
2020-09-29 19:23:26 +03:00
float Bot : : getConnectionTime ( ) {
auto current = plat . seconds ( ) ;
if ( current - m_joinServerTime > m_playServerTime | | current - m_joinServerTime < = 0.0f ) {
m_playServerTime = 60.0f * rg . get ( 30.0f , 240.0f ) ;
m_joinServerTime = current - m_playServerTime * rg . get ( 0.2f , 0.8f ) ;
}
return current - m_joinServerTime ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
int BotManager : : getHumansCount ( bool ignoreSpectators ) {
2014-09-09 18:30:40 +04:00
// this function returns number of humans playing on the server
int count = 0 ;
2019-07-01 21:10:00 +03:00
for ( const auto & client : util . getClients ( ) ) {
2019-07-27 17:36:24 +03:00
if ( ( client . flags & ClientFlags : : Used ) & & ! bots [ client . ent ] & & ! ( client . ent - > v . flags & FL_FAKECLIENT ) ) {
if ( ignoreSpectators & & client . team2 ! = Team : : Terrorist & & client . team2 ! = Team : : CT ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
continue ;
}
2019-08-04 18:22:01 +03:00
+ + count ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
return count ;
}
2019-07-27 17:36:24 +03:00
int BotManager : : getAliveHumansCount ( ) {
2014-09-09 18:30:40 +04:00
// this function returns number of humans playing on the server
int count = 0 ;
2019-07-01 21:10:00 +03:00
for ( const auto & client : util . getClients ( ) ) {
2020-02-08 00:03:52 +03:00
if ( ( client . flags & ClientFlags : : Alive ) & & bots [ client . ent ] = = nullptr & & ! ( client . ent - > v . flags & FL_FAKECLIENT ) ) {
2019-08-04 18:22:01 +03:00
+ + count ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
return count ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
bool BotManager : : isTeamStacked ( int team ) {
2019-07-27 17:36:24 +03:00
if ( team ! = Team : : CT & & team ! = Team : : Terrorist ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
return false ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
int limitTeams = mp_limitteams . int_ ( ) ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( ! limitTeams ) {
2016-10-18 20:34:02 +03:00
return false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-07-27 17:36:24 +03:00
int teamCount [ kGameTeamNum ] = { 0 , } ;
2016-10-18 20:34:02 +03:00
2019-07-01 21:10:00 +03:00
for ( const auto & client : util . getClients ( ) ) {
2019-07-27 17:36:24 +03:00
if ( ( client . flags & ClientFlags : : Used ) & & client . team2 ! = Team : : Unassigned & & client . team2 ! = Team : : Spectator ) {
2019-08-04 18:22:01 +03:00
+ + teamCount [ client . team2 ] ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-10-18 20:34:02 +03:00
}
2019-07-27 17:36:24 +03:00
return teamCount [ team ] + 1 > teamCount [ team = = Team : : CT ? Team : : Terrorist : Team : : CT ] + limitTeams ;
}
void BotManager : : erase ( Bot * bot ) {
2019-08-12 14:16:28 +03:00
for ( auto & e : m_bots ) {
2019-07-27 17:36:24 +03:00
if ( e . get ( ) = = bot ) {
2019-08-12 14:16:28 +03:00
e . reset ( ) ;
2019-07-27 17:36:24 +03:00
m_bots . remove ( e ) ; // remove from bots array
2019-08-12 14:16:28 +03:00
2019-07-27 17:36:24 +03:00
break ;
}
}
2016-10-18 20:34:02 +03:00
}
2019-08-12 14:16:28 +03:00
void BotManager : : handleDeath ( edict_t * killer , edict_t * victim ) {
auto killerTeam = game . getTeam ( killer ) ;
auto victimTeam = game . getTeam ( victim ) ;
2020-06-12 18:52:38 +03:00
if ( cv_radio_mode . int_ ( ) = = 2 ) {
2019-08-12 14:16:28 +03:00
// need to send congrats on well placed shot
for ( const auto & notify : bots ) {
if ( notify - > m_notKilled & & killerTeam = = notify - > m_team & & killerTeam ! = victimTeam & & killer ! = notify - > ent ( ) & & notify - > seesEntity ( victim - > v . origin ) ) {
if ( ! ( killer - > v . flags & FL_FAKECLIENT ) ) {
2019-09-21 23:20:33 +03:00
notify - > pushChatterMessage ( Chatter : : NiceShotCommander ) ;
2019-08-12 14:16:28 +03:00
}
else {
2019-09-21 23:20:33 +03:00
notify - > pushChatterMessage ( Chatter : : NiceShotPall ) ;
2019-08-12 14:16:28 +03:00
}
break ;
}
}
}
Bot * killerBot = nullptr ;
Bot * victimBot = nullptr ;
// notice nearby to victim teammates, that attacker is near
for ( const auto & notify : bots ) {
2019-08-18 21:00:00 +03:00
if ( notify - > m_seeEnemyTime + 2.0f < game . time ( ) & & notify - > m_notKilled & & notify - > m_team = = victimTeam & & game . isNullEntity ( notify - > m_enemy ) & & killerTeam ! = victimTeam & & util . isVisible ( killer - > v . origin , notify - > ent ( ) ) ) {
2019-08-12 14:16:28 +03:00
notify - > m_actualReactionTime = 0.0f ;
2019-08-18 21:00:00 +03:00
notify - > m_seeEnemyTime = game . time ( ) ;
2019-08-12 14:16:28 +03:00
notify - > m_enemy = killer ;
notify - > m_lastEnemy = killer ;
notify - > m_lastEnemyOrigin = killer - > v . origin ;
}
if ( notify - > ent ( ) = = killer ) {
killerBot = notify . get ( ) ;
}
else if ( notify - > ent ( ) = = victim ) {
victimBot = notify . get ( ) ;
}
}
// is this message about a bot who killed somebody?
if ( killerBot ! = nullptr ) {
killerBot - > m_lastVictim = victim ;
}
// did a human kill a bot on his team?
else {
if ( victimBot ! = nullptr ) {
if ( killerTeam = = victimBot - > m_team ) {
victimBot - > m_voteKickIndex = game . indexOfEntity ( killer ) ;
}
victimBot - > m_notKilled = false ;
}
}
}
2019-07-27 17:36:24 +03:00
void Bot : : newRound ( ) {
2014-09-09 18:30:40 +04:00
// this function initializes a bot after creation & at the start of each round
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2014-09-09 18:30:40 +04:00
// delete all allocated path nodes
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
clearSearchNodes ( ) ;
clearRoute ( ) ;
2014-09-09 18:30:40 +04:00
2019-08-24 12:43:42 +03:00
m_pathOrigin = nullptr ;
m_destOrigin = nullptr ;
2019-07-27 17:36:24 +03:00
m_path = nullptr ;
2014-09-09 18:30:40 +04:00
m_currentTravelFlags = 0 ;
2019-08-18 21:00:00 +03:00
m_desiredVelocity = nullptr ;
2019-07-27 17:36:24 +03:00
m_currentNodeIndex = kInvalidNodeIndex ;
m_prevGoalIndex = kInvalidNodeIndex ;
m_chosenGoalIndex = kInvalidNodeIndex ;
2019-07-28 15:47:46 +03:00
m_loosedBombNodeIndex = kInvalidNodeIndex ;
m_plantedBombNodeIndex = kInvalidNodeIndex ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_grenadeRequested = false ;
2014-09-09 18:30:40 +04:00
m_moveToC4 = false ;
m_duckDefuse = false ;
2015-08-15 18:09:15 +03:00
m_duckDefuseCheckTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2015-07-12 17:18:20 +03:00
m_numFriendsLeft = 0 ;
m_numEnemiesLeft = 0 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_oldButtons = pev - > button ;
2015-07-12 17:18:20 +03:00
2020-06-12 18:52:38 +03:00
for ( auto & node : m_previousNodes ) {
node = kInvalidNodeIndex ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
2019-08-18 21:00:00 +03:00
m_navTimeset = game . time ( ) ;
2019-07-01 21:10:00 +03:00
m_team = game . getTeam ( ent ( ) ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_isVIP = false ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
switch ( m_personality ) {
2019-07-27 17:36:24 +03:00
default :
case Personality : : Normal :
m_pathType = rg . chance ( 50 ) ? FindPath : : Optimal : FindPath : : Safe ;
2014-09-09 18:30:40 +04:00
break ;
2019-07-27 17:36:24 +03:00
case Personality : : Rusher :
m_pathType = FindPath : : Fast ;
2014-09-09 18:30:40 +04:00
break ;
2019-07-27 17:36:24 +03:00
case Personality : : Careful :
m_pathType = FindPath : : Safe ;
2014-09-09 18:30:40 +04:00
break ;
}
// clear all states & tasks
m_states = 0 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
clearTasks ( ) ;
2014-09-09 18:30:40 +04:00
m_isVIP = false ;
m_isLeader = false ;
m_hasProgressBar = false ;
m_canChooseAimDirection = true ;
2019-07-01 21:10:00 +03:00
m_preventFlashing = 0.0f ;
2014-09-09 18:30:40 +04:00
2015-08-15 18:09:15 +03:00
m_timeTeamOrder = 0.0f ;
2020-09-29 19:23:26 +03:00
m_askCheckTime = rg . get ( 30.0f , 90.0f ) ;
2015-08-15 18:09:15 +03:00
m_minSpeed = 260.0f ;
m_prevSpeed = 0.0f ;
2019-08-04 18:22:01 +03:00
m_prevOrigin = Vector ( kInfiniteDistance , kInfiniteDistance , kInfiniteDistance ) ;
2019-08-18 21:00:00 +03:00
m_prevTime = game . time ( ) ;
m_lookUpdateTime = game . time ( ) ;
2019-09-22 17:19:13 +03:00
m_changeViewTime = game . time ( ) + ( rg . chance ( 25 ) ? mp_freezetime . float_ ( ) : 0.0f ) ;
2019-08-18 21:00:00 +03:00
m_aimErrorTime = game . time ( ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2015-08-15 18:09:15 +03:00
m_viewDistance = 4096.0f ;
m_maxViewDistance = 4096.0f ;
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
m_liftEntity = nullptr ;
m_pickupItem = nullptr ;
m_itemIgnore = nullptr ;
2015-08-15 18:09:15 +03:00
m_itemCheckTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
m_breakableEntity = nullptr ;
2019-08-24 12:43:42 +03:00
m_breakableOrigin = nullptr ;
2015-08-15 18:09:15 +03:00
m_timeDoorOpen = 0.0f ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
resetCollision ( ) ;
resetDoubleJump ( ) ;
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
m_enemy = nullptr ;
m_lastVictim = nullptr ;
m_lastEnemy = nullptr ;
2019-08-24 12:43:42 +03:00
m_lastEnemyOrigin = nullptr ;
2016-09-11 21:01:06 +03:00
m_trackingEdict = nullptr ;
2015-08-15 18:09:15 +03:00
m_timeNextTracking = 0.0f ;
2014-09-09 18:30:40 +04:00
2015-08-15 18:09:15 +03:00
m_buttonPushTime = 0.0f ;
m_enemyUpdateTime = 0.0f ;
2016-02-11 21:50:05 +03:00
m_enemyIgnoreTimer = 0.0f ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_retreatTime = 0.0f ;
2015-08-15 18:09:15 +03:00
m_seeEnemyTime = 0.0f ;
m_shootAtDeadTime = 0.0f ;
m_oldCombatDesire = 0.0f ;
m_liftUsageTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
m_avoidGrenade = nullptr ;
2014-09-09 18:30:40 +04:00
m_needAvoidGrenade = 0 ;
m_lastDamageType = - 1 ;
m_voteKickIndex = 0 ;
m_lastVoteKick = 0 ;
m_voteMap = 0 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_tryOpenDoor = 0 ;
2014-09-09 18:30:40 +04:00
m_aimFlags = 0 ;
m_liftState = 0 ;
2019-08-18 21:00:00 +03:00
m_aimLastError = nullptr ;
2019-08-24 12:43:42 +03:00
m_position = nullptr ;
m_liftTravelPos = nullptr ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
setIdealReactionTimers ( true ) ;
2014-09-09 18:30:40 +04:00
2016-09-11 21:01:06 +03:00
m_targetEntity = nullptr ;
2015-08-15 18:09:15 +03:00
m_followWaitTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_hostages . clear ( ) ;
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
for ( auto & timer : m_chatterTimes ) {
timer = kMaxChatterRepeatInteval ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
2014-09-09 18:30:40 +04:00
m_isReloading = false ;
2019-07-27 17:36:24 +03:00
m_reloadState = Reload : : None ;
2014-09-09 18:30:40 +04:00
2015-08-15 18:09:15 +03:00
m_reloadCheckTime = 0.0f ;
2019-08-18 21:00:00 +03:00
m_shootTime = game . time ( ) ;
m_playerTargetTime = game . time ( ) ;
2015-08-15 18:09:15 +03:00
m_firePause = 0.0f ;
m_timeLastFired = 0.0f ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_sniperStopTime = 0.0f ;
2015-08-15 18:09:15 +03:00
m_grenadeCheckTime = 0.0f ;
2014-09-09 18:30:40 +04:00
m_isUsingGrenade = false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_bombSearchOverridden = false ;
2014-09-09 18:30:40 +04:00
m_blindButton = 0 ;
2015-08-03 00:05:27 +03:00
m_blindTime = 0.0f ;
m_jumpTime = 0.0f ;
2014-09-09 18:30:40 +04:00
m_jumpFinished = false ;
m_isStuck = false ;
2019-08-18 21:00:00 +03:00
m_sayTextBuffer . timeNextChat = game . time ( ) ;
2014-09-09 18:30:40 +04:00
m_sayTextBuffer . entityIndex = - 1 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_sayTextBuffer . sayText . clear ( ) ;
2014-09-09 18:30:40 +04:00
2019-07-27 17:36:24 +03:00
m_buyState = BuyState : : PrimaryWeapon ;
2015-06-04 11:52:48 +03:00
m_lastEquipTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// if bot died, clear all weapon stuff and force buying again
if ( ! m_notKilled ) {
2019-09-21 23:20:33 +03:00
plat . bzero ( & m_ammoInClip , sizeof ( m_ammoInClip ) ) ;
plat . bzero ( & m_ammo , sizeof ( m_ammo ) ) ;
2014-09-09 18:30:40 +04:00
m_currentWeapon = 0 ;
2020-09-13 02:21:15 +03:00
m_weaponType = 0 ;
2014-09-09 18:30:40 +04:00
}
2019-05-10 21:12:12 +03:00
m_flashLevel = 100.0f ;
2019-08-18 21:00:00 +03:00
m_checkDarkTime = game . time ( ) ;
2014-09-09 18:30:40 +04:00
2020-09-29 19:23:26 +03:00
m_knifeAttackTime = game . time ( ) + rg . get ( 1.3f , 2.6f ) ;
m_nextBuyTime = game . time ( ) + rg . get ( 0.6f , 2.0f ) ;
2014-09-09 18:30:40 +04:00
m_buyPending = false ;
m_inBombZone = false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_ignoreBuyDelay = false ;
2014-09-17 20:36:42 +04:00
m_hasC4 = false ;
2014-09-09 18:30:40 +04:00
2019-05-11 00:14:49 +03:00
m_fallDownTime = 0.0f ;
2015-08-15 18:09:15 +03:00
m_shieldCheckTime = 0.0f ;
m_zoomCheckTime = 0.0f ;
m_strafeSetTime = 0.0f ;
2019-07-27 17:36:24 +03:00
m_combatStrafeDir = Dodge : : None ;
m_fightStyle = Fight : : None ;
2015-08-15 18:09:15 +03:00
m_lastFightStyleCheck = 0.0f ;
2014-09-09 18:30:40 +04:00
m_checkWeaponSwitch = true ;
m_checkKnifeSwitch = true ;
m_buyingFinished = false ;
2016-09-11 21:01:06 +03:00
m_radioEntity = nullptr ;
2014-09-09 18:30:40 +04:00
m_radioOrder = 0 ;
m_defendedBomb = false ;
2015-06-04 11:52:48 +03:00
m_defendHostage = false ;
m_headedTime = 0.0f ;
2014-09-09 18:30:40 +04:00
2020-09-29 19:23:26 +03:00
m_timeLogoSpray = game . time ( ) + rg . get ( 5.0f , 30.0f ) ;
2019-08-18 21:00:00 +03:00
m_spawnTime = game . time ( ) ;
m_lastChatTime = game . time ( ) ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
m_timeCamping = 0.0f ;
2014-09-09 18:30:40 +04:00
m_campDirection = 0 ;
m_nextCampDirTime = 0 ;
m_campButtons = 0 ;
2015-08-15 18:09:15 +03:00
m_soundUpdateTime = 0.0f ;
2019-08-18 21:00:00 +03:00
m_heardSoundTime = game . time ( ) ;
2014-09-09 18:30:40 +04:00
// clear its message queue
2020-06-12 18:52:38 +03:00
for ( auto & msg : m_messageQueue ) {
msg = BotMsg : : None ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-09-16 13:07:47 +03:00
m_msgQueue . clear ( ) ;
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
// clear last trace
for ( auto i = 0 ; i < TraceChannel : : Num ; + + i ) {
m_lastTrace [ i ] = { } ;
m_traceSkip [ i ] = 0 ;
}
2014-09-09 18:30:40 +04:00
// and put buying into its message queue
2019-07-27 17:36:24 +03:00
pushMsgQueue ( BotMsg : : Buy ) ;
startTask ( Task : : Normal , TaskPri : : Normal , kInvalidNodeIndex , 0.0f , true ) ;
2014-09-09 18:30:40 +04:00
2020-06-12 18:52:38 +03:00
// restore fake client bit, just in case
pev - > flags | = FL_FAKECLIENT ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 50 ) ) {
pushChatterMessage ( Chatter : : NewRound ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
m_updateInterval = game . is ( GameFlags : : Legacy | GameFlags : : Xash3D ) ? 0.0f : ( 1.0f / cr : : clamp ( cv_think_fps . float_ ( ) , 30.0f , 60.0f ) ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void Bot : : kill ( ) {
2014-09-09 18:30:40 +04:00
// this function kills a bot (not just using ClientKill, but like the CSBot does)
// base code courtesy of Lazy (from bots-united forums!)
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
bots . touchKillerEntity ( this ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void Bot : : kick ( ) {
2014-09-09 18:30:40 +04:00
// this function kick off one bot from the server.
2019-09-14 23:13:55 +03:00
auto username = pev - > netname . chars ( ) ;
2020-06-12 18:52:38 +03:00
if ( ! ( pev - > flags & FL_CLIENT ) | | strings . isEmpty ( username ) ) {
2016-10-29 21:01:41 +03:00
return ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// clear fakeclient bit
2016-09-22 15:47:35 +03:00
pev - > flags & = ~ FL_FAKECLIENT ;
2019-07-27 17:36:24 +03:00
game . serverCommand ( " kick \" %s \" " , username ) ;
2019-11-30 23:18:37 +03:00
ctrl . msg ( " Bot '%s' kicked. " , username ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
void Bot : : updateTeamJoin ( ) {
2014-09-09 18:30:40 +04:00
// this function handles the selection of teams & class
2020-02-08 00:03:52 +03:00
if ( ! m_notStarted ) {
return ;
}
2016-09-14 15:40:42 +03:00
// cs prior beta 7.0 uses hud-based motd, so press fire once
2019-07-27 17:36:24 +03:00
if ( game . is ( GameFlags : : Legacy ) ) {
2016-09-14 15:40:42 +03:00
pev - > button | = IN_ATTACK ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-09-14 15:40:42 +03:00
2016-10-18 20:34:02 +03:00
// check if something has assigned team to us
2019-07-27 17:36:24 +03:00
else if ( m_team = = Team : : Terrorist | | m_team = = Team : : CT ) {
2016-10-18 20:34:02 +03:00
m_notStarted = false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( m_team = = Team : : Unassigned & & m_retryJoin > 2 ) {
m_startAction = BotMsg : : TeamSelect ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-10-18 20:34:02 +03:00
// if bot was unable to join team, and no menus popups, check for stacked team
2020-02-08 00:03:52 +03:00
if ( m_startAction = = BotMsg : : None ) {
if ( + + m_retryJoin > 3 & & bots . isTeamStacked ( m_wantedTeam - 1 ) ) {
2016-10-18 20:34:02 +03:00
m_retryJoin = 0 ;
2019-07-01 21:10:00 +03:00
ctrl . msg ( " Could not add bot to the game: Team is stacked (to disable this check, set mp_limitteams and mp_autoteambalance to zero and restart the round). " ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
kick ( ) ;
2016-10-18 20:34:02 +03:00
return ;
}
}
2014-09-09 18:30:40 +04:00
// handle counter-strike stuff here...
2019-07-27 17:36:24 +03:00
if ( m_startAction = = BotMsg : : TeamSelect ) {
m_startAction = BotMsg : : None ; // switch back to idle
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2020-06-12 18:52:38 +03:00
char teamJoin = cv_join_team . str ( ) [ 0 ] ;
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( teamJoin = = ' C ' | | teamJoin = = ' c ' ) {
2014-09-09 18:30:40 +04:00
m_wantedTeam = 2 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
else if ( teamJoin = = ' T ' | | teamJoin = = ' t ' ) {
2014-09-09 18:30:40 +04:00
m_wantedTeam = 1 ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( m_wantedTeam ! = 1 & & m_wantedTeam ! = 2 ) {
2020-10-01 11:42:51 +03:00
auto players = bots . countTeamPlayers ( ) ;
// balance the team upon creation, we can't use game auto select (5) from now, as we use enforced skins belows
// due to we don't know the team bot selected, and TeamInfo messages still shows us we're spectators..
if ( players . first > players . second ) {
m_wantedTeam = 2 ;
}
else if ( players . first < players . second ) {
m_wantedTeam = 1 ;
}
else {
m_wantedTeam = rg . get ( 1 , 2 ) ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
// select the team the bot wishes to join...
2019-09-14 23:13:55 +03:00
issueCommand ( " menuselect %d " , m_wantedTeam ) ;
2014-09-09 18:30:40 +04:00
}
2019-07-27 17:36:24 +03:00
else if ( m_startAction = = BotMsg : : ClassSelect ) {
m_startAction = BotMsg : : None ; // switch back to idle
2014-09-09 18:30:40 +04:00
2016-10-18 20:34:02 +03:00
// czero has additional models
2020-10-01 11:42:51 +03:00
auto maxChoice = game . is ( GameFlags : : ConditionZero ) ? 5 : 4 ;
auto enforcedSkin = 0 ;
// setup enforced skin based on selected team
if ( m_wantedTeam = = 1 | | m_team = = Team : : Terrorist ) {
enforcedSkin = cv_botskin_t . int_ ( ) ;
}
else if ( m_wantedTeam = = 2 | | m_team = = Team : : CT ) {
enforcedSkin = cv_botskin_ct . int_ ( ) ;
}
enforcedSkin = cr : : clamp ( enforcedSkin , 0 , maxChoice ) ;
// try to choice manually
if ( m_wantedSkin < 1 | | m_wantedSkin > maxChoice ) {
m_wantedSkin = rg . get ( 1 , maxChoice ) ; // use random if invalid
}
2016-10-18 20:34:02 +03:00
2020-10-01 11:42:51 +03:00
// and set enforced if any
if ( enforcedSkin > 0 ) {
m_wantedSkin = enforcedSkin ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
// select the class the bot wishes to use...
2020-10-01 11:42:51 +03:00
issueCommand ( " menuselect %d " , m_wantedSkin ) ;
2014-09-09 18:30:40 +04:00
// bot has now joined the game (doesn't need to be started)
m_notStarted = false ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
2014-09-09 18:30:40 +04:00
// check for greeting other players, since we connected
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 20 ) ) {
pushChatMessage ( Chat : : Hello ) ;
2019-07-01 21:10:00 +03:00
}
}
}
void BotManager : : captureChatRadio ( const char * cmd , const char * arg , edict_t * ent ) {
if ( game . isBotCmd ( ) ) {
return ;
}
2019-09-21 23:20:33 +03:00
if ( strings . matches ( cmd , " say " ) | | strings . matches ( cmd , " say_team " ) ) {
2019-07-01 21:10:00 +03:00
bool alive = util . isAlive ( ent ) ;
int team = - 1 ;
if ( strcmp ( cmd , " say_team " ) = = 0 ) {
team = game . getTeam ( ent ) ;
}
for ( const auto & client : util . getClients ( ) ) {
2019-07-27 17:36:24 +03:00
if ( ! ( client . flags & ClientFlags : : Used ) | | ( team ! = - 1 & & team ! = client . team2 ) | | alive ! = util . isAlive ( client . ent ) ) {
2019-07-01 21:10:00 +03:00
continue ;
}
2019-07-27 17:36:24 +03:00
auto target = bots [ client . ent ] ;
2019-07-01 21:10:00 +03:00
if ( target ! = nullptr ) {
2019-07-27 17:36:24 +03:00
target - > m_sayTextBuffer . entityIndex = game . indexOfPlayer ( ent ) ;
2019-07-01 21:10:00 +03:00
2019-08-12 14:16:28 +03:00
if ( strings . isEmpty ( engfuncs . pfnCmd_Args ( ) ) ) {
2019-07-01 21:10:00 +03:00
continue ;
}
target - > m_sayTextBuffer . sayText = engfuncs . pfnCmd_Args ( ) ;
2019-08-18 21:00:00 +03:00
target - > m_sayTextBuffer . timeNextChat = game . time ( ) + target - > m_sayTextBuffer . chatDelay ;
2019-07-01 21:10:00 +03:00
}
}
}
2019-07-27 17:36:24 +03:00
Client & target = util . getClient ( game . indexOfPlayer ( ent ) ) ;
2019-07-01 21:10:00 +03:00
// check if this player alive, and issue something
2019-07-27 17:36:24 +03:00
if ( ( target . flags & ClientFlags : : Alive ) & & target . radio ! = 0 & & strncmp ( cmd , " menuselect " , 10 ) = = 0 ) {
2019-07-01 21:10:00 +03:00
int radioCommand = atoi ( arg ) ;
if ( radioCommand ! = 0 ) {
2019-07-27 17:36:24 +03:00
radioCommand + = 10 * ( target . radio - 1 ) ;
2019-07-01 21:10:00 +03:00
2019-07-27 17:36:24 +03:00
if ( radioCommand ! = Radio : : RogerThat & & radioCommand ! = Radio : : Negative & & radioCommand ! = Radio : : ReportingIn ) {
for ( const auto & bot : bots ) {
2019-07-01 21:10:00 +03:00
// validate bot
2019-07-27 17:36:24 +03:00
if ( bot - > m_team = = target . team & & ent ! = bot - > ent ( ) & & bot - > m_radioOrder = = 0 ) {
2019-07-01 21:10:00 +03:00
bot - > m_radioOrder = radioCommand ;
bot - > m_radioEntity = ent ;
}
}
}
2019-08-18 21:00:00 +03:00
bots . setLastRadioTimestamp ( target . team , game . time ( ) ) ;
2019-07-01 21:10:00 +03:00
}
2019-07-27 17:36:24 +03:00
target . radio = 0 ;
2019-07-01 21:10:00 +03:00
}
else if ( strncmp ( cmd , " radio " , 5 ) = = 0 ) {
2019-07-27 17:36:24 +03:00
target . radio = atoi ( & cmd [ 5 ] ) ;
2019-07-01 21:10:00 +03:00
}
}
2019-07-27 17:36:24 +03:00
void BotManager : : notifyBombDefuse ( ) {
2019-07-01 21:10:00 +03:00
// notify all terrorists that CT is starting bomb defusing
2020-02-08 00:03:52 +03:00
if ( ! isBombPlanted ( ) ) {
return ;
}
2019-07-27 17:36:24 +03:00
for ( const auto & bot : bots ) {
if ( bot - > m_team = = Team : : Terrorist & & bot - > m_notKilled & & bot - > getCurrentTaskId ( ) ! = Task : : MoveToPosition ) {
2019-07-01 21:10:00 +03:00
bot - > clearSearchNodes ( ) ;
2019-08-24 12:43:42 +03:00
bot - > m_position = graph . getBombOrigin ( ) ;
2019-07-27 17:36:24 +03:00
bot - > startTask ( Task : : MoveToPosition , TaskPri : : MoveToPosition , kInvalidNodeIndex , 0.0f , true ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2014-09-09 18:30:40 +04:00
}
2015-06-11 00:18:49 +03:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : updateActiveGrenade ( ) {
2019-08-18 21:00:00 +03:00
if ( m_grenadeUpdateTime > game . time ( ) ) {
2016-03-25 14:56:40 +03:00
return ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-18 21:00:00 +03:00
m_activeGrenades . clear ( ) ; // clear previously stored grenades
2015-06-11 00:18:49 +03:00
// search the map for any type of grenade
2019-08-18 21:00:00 +03:00
game . searchEntities ( " classname " , " grenade " , [ & ] ( edict_t * e ) {
2016-01-27 21:40:47 +03:00
// do not count c4 as a grenade
2020-06-12 18:52:38 +03:00
if ( strcmp ( e - > v . model . chars ( 9 ) , " c4.mdl " ) ! = 0 ) {
m_activeGrenades . push ( e ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2020-06-12 18:52:38 +03:00
return EntitySearchResult : : Continue ; // continue iteration
2019-08-18 21:00:00 +03:00
} ) ;
m_grenadeUpdateTime = game . time ( ) + 0.25f ;
2015-06-11 00:18:49 +03:00
}
2019-07-27 17:36:24 +03:00
void BotManager : : updateIntrestingEntities ( ) {
2019-08-18 21:00:00 +03:00
if ( m_entityUpdateTime > game . time ( ) ) {
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
return ;
}
// clear previously stored entities
m_intrestingEntities . clear ( ) ;
2019-08-18 21:00:00 +03:00
// search the map for any type of grenade
game . searchEntities ( nullptr , kInfiniteDistance , [ & ] ( edict_t * e ) {
2019-09-14 23:13:55 +03:00
auto classname = e - > v . classname . chars ( ) ;
2020-06-12 18:52:38 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// search for grenades, weaponboxes, weapons, items and armoury entities
2020-06-12 18:52:38 +03:00
if ( strncmp ( " weaponbox " , classname , 9 ) = = 0 | | strncmp ( " grenade " , classname , 7 ) = = 0 | | strncmp ( " item " , classname , 4 ) = = 0 | | strncmp ( " armoury " , classname , 7 ) = = 0 ) {
2019-08-18 21:00:00 +03:00
m_intrestingEntities . push ( e ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
// pickup some csdm stuff if we're running csdm
2019-07-27 17:36:24 +03:00
if ( game . mapIs ( MapFlags : : HostageRescue ) & & strncmp ( " hostage " , classname , 7 ) = = 0 ) {
2019-08-18 21:00:00 +03:00
m_intrestingEntities . push ( e ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-18 21:00:00 +03:00
// add buttons
if ( game . mapIs ( MapFlags : : HasButtons ) & & strncmp ( " func_button " , classname , 11 ) = = 0 ) {
m_intrestingEntities . push ( e ) ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
// pickup some csdm stuff if we're running csdm
2019-07-27 17:36:24 +03:00
if ( game . is ( GameFlags : : CSDM ) & & strncmp ( " csdm " , classname , 4 ) = = 0 ) {
2019-08-18 21:00:00 +03:00
m_intrestingEntities . push ( e ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2019-08-18 21:00:00 +03:00
// continue iteration
return EntitySearchResult : : Continue ;
} ) ;
m_entityUpdateTime = game . time ( ) + 0.5f ;
2016-02-07 02:34:06 +03:00
}
2016-09-10 19:31:38 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
void BotManager : : selectLeaders ( int team , bool reset ) {
if ( reset ) {
2016-09-10 19:31:38 +03:00
m_leaderChoosen [ team ] = false ;
return ;
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( m_leaderChoosen [ team ] ) {
return ;
}
2019-07-27 17:36:24 +03:00
if ( game . mapIs ( MapFlags : : Assassination ) ) {
if ( team = = Team : : CT & & ! m_leaderChoosen [ Team : : CT ] ) {
for ( const auto & bot : m_bots ) {
if ( bot - > m_isVIP ) {
2016-09-10 19:31:38 +03:00
// vip bot is the leader
bot - > m_isLeader = true ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 50 ) ) {
bot - > pushRadioMessage ( Radio : : FollowMe ) ;
2016-09-10 19:31:38 +03:00
bot - > m_campButtons = 0 ;
}
}
}
2019-07-27 17:36:24 +03:00
m_leaderChoosen [ Team : : CT ] = true ;
2016-09-10 19:31:38 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( team = = Team : : Terrorist & & ! m_leaderChoosen [ Team : : Terrorist ] ) {
auto bot = bots . findHighestFragBot ( team ) ;
2016-09-10 19:31:38 +03:00
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( bot ! = nullptr & & bot - > m_notKilled ) {
2016-09-10 19:31:38 +03:00
bot - > m_isLeader = true ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 45 ) ) {
bot - > pushRadioMessage ( Radio : : FollowMe ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-09-10 19:31:38 +03:00
}
2019-07-27 17:36:24 +03:00
m_leaderChoosen [ Team : : Terrorist ] = true ;
2016-09-10 19:31:38 +03:00
}
}
2019-07-27 17:36:24 +03:00
else if ( game . mapIs ( MapFlags : : Demolition ) ) {
if ( team = = Team : : Terrorist & & ! m_leaderChoosen [ Team : : Terrorist ] ) {
for ( const auto & bot : m_bots ) {
if ( bot - > m_hasC4 ) {
2016-09-10 19:31:38 +03:00
// bot carrying the bomb is the leader
bot - > m_isLeader = true ;
// terrorist carrying a bomb needs to have some company
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 75 ) ) {
2020-06-12 18:52:38 +03:00
if ( cv_radio_mode . int_ ( ) = = 2 ) {
2019-07-27 17:36:24 +03:00
bot - > pushChatterMessage ( Chatter : : GoingToPlantBomb ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
else {
2019-07-27 17:36:24 +03:00
bot - > pushChatterMessage ( Radio : : FollowMe ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-09-10 19:31:38 +03:00
bot - > m_campButtons = 0 ;
}
}
}
2019-07-27 17:36:24 +03:00
m_leaderChoosen [ Team : : Terrorist ] = true ;
2016-09-10 19:31:38 +03:00
}
2019-07-27 17:36:24 +03:00
else if ( ! m_leaderChoosen [ Team : : CT ] ) {
if ( auto bot = bots . findHighestFragBot ( team ) ) {
2016-09-10 19:31:38 +03:00
bot - > m_isLeader = true ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 30 ) ) {
bot - > pushRadioMessage ( Radio : : FollowMe ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
2016-09-10 19:31:38 +03:00
}
2019-07-27 17:36:24 +03:00
m_leaderChoosen [ Team : : CT ] = true ;
2016-09-10 19:31:38 +03:00
}
}
2019-07-27 17:36:24 +03:00
else if ( game . mapIs ( MapFlags : : Escape | MapFlags : : KnifeArena | MapFlags : : Fun ) ) {
auto bot = bots . findHighestFragBot ( team ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( ! m_leaderChoosen [ team ] & & bot ) {
2016-09-10 19:31:38 +03:00
bot - > m_isLeader = true ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( 30 ) ) {
bot - > pushRadioMessage ( Radio : : FollowMe ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
m_leaderChoosen [ team ] = true ;
2016-09-10 19:31:38 +03:00
}
}
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
else {
2019-07-27 17:36:24 +03:00
auto bot = bots . findHighestFragBot ( team ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
if ( ! m_leaderChoosen [ team ] & & bot ) {
2016-09-10 19:31:38 +03:00
bot - > m_isLeader = true ;
2019-07-27 17:36:24 +03:00
if ( rg . chance ( team = = Team : : Terrorist ? 30 : 40 ) ) {
bot - > pushRadioMessage ( Radio : : FollowMe ) ;
2.9 Update (#64)
* Fixed bots not camping in camp spots.
Fixed chatter/radio message cycling. (need feedback).
Fixed CTs unable to defuse bomb.
Fixed backward jump path generation in waypoint editor.
Fixed autoradius in waypoint editor.
Fixed autoradius menu non closeable.
Fixed bots version display on entering game.
Fixed memory leak in DLL-loader. (non metamod).
Fixed bots able to see through smoke.
Fixed team-detection on non-standard modes.
Fixed quota & autovacate management.
Fixed bunch of warnings from static analyzers.
Greatly imporoved grenade throwing.
Grealty reduced bot CPU usage.
* Fixed stack-corruption in memory-file reader.
Fixed A* pathfinder not working correctly.
Fixed 'Tried to write to uninitialized sizebuf_t error' on bot add/remove.
Minor tweaks to camping and bot enemy aiming
* Make clang happy.
* Fixed VIP-dection on some maps.
Fixed occupied waypoint checker.
Small refactoring of code with clang-format.
* Fixed clang compilation
* Fixed compilation.
* Debugging seek cover task.
Some more code cleanup.
* Fixed typos.
* Fixes to attack movement.
Revert Z component updates.
* Fixes for aiming at enemy.
Fixes for seek cover & enemy hunt tasks.
More refactoring.
* Making clang happy once again?
Tweaked grenade timers.
* Revised language comparer hasher
* Fixed build.
* Fixed build.
* Optimized headshot offsets.
Optimized aim errors and enemy searches.
Get rid of preprocessor macroses.
Added back yb_think_fps. Use with caution.
* Minor refactoring of code.
* Check if tracking entity is still alive.
Do not duck in crouch-goal waypoints.
Remove ancient hack with failed goals.
* Get rid of c++14 stuff.
Tweaked isOccupiedPoint.
* Changed pickup check radius.
* Fix compilation.
* Fixed bots ignore breakables.
Fixed A* pathfinder.
Fixed searching for optimal waypoints.
Fixed bot waypoint reachability functions.
* Get rid of new/delete calls in pathfinder.
Disallow access to yapb waypoint menu on hlds.
Minor refactoring.
* Updated linux/osx makefile
* Spaces -> Tabs in makefile.
Made G++ happy.
* Updated makefile.
* Fixed heap buffer overflow in config loader code.
* Lowered CPU usage a bit, by using "waypoint buckets" for searching closest node.
Do not traceline for doors on map, that have no doors.
Get rid stack-based containers.
* Remove win-only debug crap.
* Refactored string class.
* Fix OSX compiling.
* Minor refactoring of corelib to use cpp move-semantic.
* Use reference for active grenades searcher.
* Use system's atan2f () as it's eror rate is a bit lower.
Fixed bots continuously stays in throw smoke task.
Fixed bots reaching camp-goal jumping or stays they for some time.
Increased radius for searching targets for grenades.
Tweaked bot difficulty levels.
Improved sniper weapon handling. Trying to stand still while shooting.
Increase retreat level only if sniper weapon is low on ammo.
Fixed predict path enemy tracking timer is always true.
Allow bots to process their tasks while on freezetime, so on small maps they already aiming enemies when freezetime ends.
Fied bots endlessy trying to pickup weapons.
Reduce surpise timers when holding sniper weapons.
New aim-at-head position calculation.
Shoot delay timers are now based on bot's difficulty.
Prefer smoke grenades more than flashbangs.
Fixed kill-all bot command not killing one random bot for first time use.
Do not play with jump velocity, now using the same as in waypoints.
Tweaked shift move, so zero move speed not overriden with shift speed.
Radius waypoint searcher use waypoint bucket as well.
Increase reachability radius for dest waypoint, if it's currenlty owned by other bot.
Partially fixed bots choice to use unreachable waypoints.
* Makes OSX clang happy?
* Support for compiling on llvm-win32, makefile to be done.
Increased default reachability time.
* Fixed build.
* Move level-initialization stuff from Spawn to ServerActivate, so bot will not check init-stuff every entity spawn. This should save few CPU cycles.
* Fixed active grenades list not working after changelevel.
Reworked items pickup code, so every bot is not firing sphere search every time, but instead we maintain our own list of intresting entities, so every bot is accessing this list. This should lower CPU usage more a little.
* Precache should be done in spawn...
* Do not use engfuncs in intresting entities.
* Fixed GCC-8.2 warnings.
Minor refactoring.
* Added some safety checks to intresting entities.
Get rid of stdc++ dependency for GCC & ICC under linux.
* Remove -g from release make.
Cosmetic changes.
* Re-enabled debug overlay.
* Remove test header...
* Some static-analyzer warnings fixed.
Support for X64 build for FWGS Xash3D Engine.
* Reduced time between selecting grenade and throwing it away.
Do not try to kill bots that already dead with kill command.
Several fixes from static-analyzers.
* Update CI.
* Fixed bot's not added after the changelevel on Xash3D engine.
* Revert commit that enables movement during freezetime. Everything goes bad, when there is no freezetime....
* Bots will try to not strafe while in combat if seeing enemy only partially.
Do not use "shift" when considering stuck.
* Weapon price for Elite is 800$ since CS 1.6...
* Fixed bots at difficulty 0 can't shoot enemies.
* Cosmetic change.
* Fixed assert in ClientDisconnect when quitting game while meta unloaded yapb module.
Consider freed entities as invalid.
* Bigger distance for throwing he grenades.
* Faster version of atan2f().
* Removed accidentally left SSE header.
* Cosmetic changes to enums.
* Tweaked difficulty levels.
Bots on Android will have a difficulty level 2 by default.
Fixed LTO builds under linux.
* Do not consider Android CS as legacy.
* Get rid of system's math functions. Just for fun)
* Use SSE2 for sincos function.
* Fixed failed during load wayponts still allows to add bots, thus causing bot to crash.
Added ability to delete waypoint by number using "yb wp delete".
Enabled Link Time Optimization for Linux and OSX.
* Fixed CI Builds.
2018-10-28 19:26:36 +03:00
}
m_leaderChoosen [ team ] = true ;
2016-09-10 19:31:38 +03:00
}
}
2018-06-23 21:28:40 +06:00
}
2019-07-01 21:10:00 +03:00
2019-07-27 17:36:24 +03:00
void BotManager : : initRound ( ) {
2019-07-01 21:10:00 +03:00
// this is called at the start of each round
2020-02-08 00:03:52 +03:00
m_roundOver = false ;
2019-07-01 21:10:00 +03:00
// check team economics
2019-07-27 17:36:24 +03:00
for ( int team = 0 ; team < kGameTeamNum ; + + team ) {
2019-07-01 21:10:00 +03:00
updateTeamEconomics ( team ) ;
selectLeaders ( team , true ) ;
m_lastRadioTime [ team ] = 0.0f ;
}
reset ( ) ;
2019-07-27 17:36:24 +03:00
// notify all bots about new round arrived
for ( const auto & bot : bots ) {
bot - > newRound ( ) ;
}
2019-07-01 21:10:00 +03:00
2019-07-27 17:36:24 +03:00
// reset current radio message for all client
for ( auto & client : util . getClients ( ) ) {
client . radio = 0 ;
2019-07-01 21:10:00 +03:00
}
2019-08-24 12:43:42 +03:00
graph . setBombOrigin ( true ) ;
2019-07-27 17:36:24 +03:00
graph . clearVisited ( ) ;
m_bombSayStatus = BombPlantedSay : : ChatSay | BombPlantedSay : : Chatter ;
2019-07-01 21:10:00 +03:00
m_timeBombPlanted = 0.0f ;
m_plantSearchUpdateTime = 0.0f ;
2020-02-08 00:03:52 +03:00
m_autoKillCheckTime = 0.0f ;
2019-07-01 21:10:00 +03:00
m_botsCanPause = false ;
resetFilters ( ) ;
2019-07-27 17:36:24 +03:00
graph . updateGlobalPractice ( ) ; // update experience data on round start
2019-07-01 21:10:00 +03:00
// calculate the round mid/end in world time
2019-08-18 21:00:00 +03:00
m_timeRoundStart = game . time ( ) + mp_freezetime . float_ ( ) ;
2019-07-27 17:36:24 +03:00
m_timeRoundMid = m_timeRoundStart + mp_roundtime . float_ ( ) * 60.0f * 0.5f ;
m_timeRoundEnd = m_timeRoundStart + mp_roundtime . float_ ( ) * 60.0f ;
2020-09-16 13:07:47 +03:00
// update difficulty balance, if needed
if ( cv_difficulty_auto . bool_ ( ) ) {
balanceBotDifficulties ( ) ;
}
2019-07-01 21:10:00 +03:00
}
void BotManager : : setBombPlanted ( bool isPlanted ) {
if ( isPlanted ) {
2019-08-18 21:00:00 +03:00
m_timeBombPlanted = game . time ( ) ;
2019-07-01 21:10:00 +03:00
}
m_bombPlanted = isPlanted ;
}