aim: improved ladder handling view direction

aim: improved enemy prediction once again
nav: bots with hostages will try to take all hostages that are near with him instead of going directly to rescue zone
manager: fixed engine errors when removing bots with kickall with instant parameter
graph: strip http:// prefix from graph upload url, it should be always http for now
bot: improve handling of smoke grenades on ground (restored code from old yapb2 branch)
This commit is contained in:
jeefo 2023-06-23 19:52:46 +03:00
commit a49a4000c9
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
16 changed files with 269 additions and 133 deletions

View file

@ -1471,7 +1471,7 @@ void Bot::pickupItem_ () {
auto tab = conf.getRawWeapons ();
if ((tab[weaponIndex].id == Weapon::Shield || weaponIndex >= kPrimaryWeaponMinIndex || hasShield ()) && niceWeapon) {
if ((weaponIndex >= kPrimaryWeaponMinIndex || tab[weaponIndex].id == Weapon::Shield || hasShield ()) && niceWeapon) {
selectWeaponByIndex (weaponIndex);
dropCurrentWeapon ();
}
@ -1561,9 +1561,7 @@ void Bot::pickupItem_ () {
// find the nearest 'unused' hostage within the area
game.searchEntities (pev->origin, 768.0f, [&] (edict_t *ent) {
auto classname = ent->v.classname.str ();
if (!classname.startsWith ("hostage_entity") && !classname.startsWith ("monster_scientist")) {
if (!util.isHostageEntity (ent)) {
return EntitySearchResult::Continue;
}