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:
parent
5a2d0748c0
commit
a49a4000c9
16 changed files with 269 additions and 133 deletions
|
|
@ -204,7 +204,7 @@ bool BotSupport::isMonster (edict_t *ent) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ent->v.classname.str ().startsWith ("hostage")) {
|
||||
if (isHostageEntity (ent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -226,6 +226,18 @@ bool BotSupport::isPlayerVIP (edict_t *ent) {
|
|||
return *(engfuncs.pfnInfoKeyValue (engfuncs.pfnGetInfoKeyBuffer (ent), "model")) == 'v';
|
||||
}
|
||||
|
||||
bool BotSupport::isHostageEntity (edict_t *ent) {
|
||||
if (game.isNullEntity (ent)) {
|
||||
return false;
|
||||
}
|
||||
auto classHash = ent->v.classname.str ().hash ();
|
||||
|
||||
constexpr auto kHostageEntity = StringRef::fnv1a32 ("hostage_entity");
|
||||
constexpr auto kMonsterScientist = StringRef::fnv1a32 ("monster_scientist");
|
||||
|
||||
return classHash == kHostageEntity || classHash == kMonsterScientist;
|
||||
}
|
||||
|
||||
bool BotSupport::isFakeClient (edict_t *ent) {
|
||||
if (bots[ent] != nullptr || (!game.isNullEntity (ent) && (ent->v.flags & FL_FAKECLIENT))) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue