bot: stop shoot breakable task in case enemy exists
manager: fix crash due miss-swap of max and min difficulty levels on bot adding (thx @stalin_alex)
This commit is contained in:
parent
cd02ca3a23
commit
113cb5e916
5 changed files with 123 additions and 20 deletions
|
|
@ -1472,7 +1472,7 @@ bool Game::isBreakableEntity (edict_t *ent, bool initialSeed) const {
|
|||
const auto limit = cv_breakable_health_limit.as <float> ();
|
||||
|
||||
// not shoot-able
|
||||
if (ent->v.health >= limit) {
|
||||
if (ent->v.health < 5 || ent->v.health >= limit) {
|
||||
return false;
|
||||
}
|
||||
constexpr auto kFuncBreakable = StringRef::fnv1a32 ("func_breakable");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue