fix: make ammo pickups actually to work
fix: buy: bots never buy enough ammo for secondary weapons fix: yb_pickup_best disabling all pickups instead of weapons only add: yb_pickup_ammo_and_kits, that allows to enable ammos medkits and kevlars refactor: switched to crlib strings where possible refactor: fix some compiler warnings at high levels refactor: move constants to separate header (thx @spodlesniy)
This commit is contained in:
parent
290a74f5b3
commit
214b56f37b
23 changed files with 734 additions and 625 deletions
|
|
@ -204,7 +204,7 @@ bool BotSupport::isMonster (edict_t *ent) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (cr::strncmp ("hostage", ent->v.classname.chars (), 7) == 0) {
|
||||
if (ent->v.classname.str ().startsWith ("hostage")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ bool BotSupport::isMonster (edict_t *ent) {
|
|||
}
|
||||
|
||||
bool BotSupport::isItem (edict_t *ent) {
|
||||
return !!(strstr (ent->v.classname.chars (), "item_"));
|
||||
return ent && ent->v.classname.str ().contains ("item_");
|
||||
}
|
||||
|
||||
bool BotSupport::isPlayerVIP (edict_t *ent) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue