nav: fall controls are not good. (#656)
nav: fall controls are not good. nav: increased behavior rate in finding the best goal. nav: avoiding the door after hitting it. combat: if the enemy is using a sniper rifle, move. combat: enemy group functionality has been improved. combat: if we are doing a camping task, do not switch to a knife at close range. aim: slight changes to enemy prediction. --------- Co-authored-by: jeefo <dmitry@jeefo.net>
This commit is contained in:
parent
6152a2d2ce
commit
e717710bd1
9 changed files with 245 additions and 211 deletions
|
|
@ -222,7 +222,12 @@ bool BotSupport::isDoorEntity (edict_t *ent) {
|
|||
if (game.isNullEntity (ent)) {
|
||||
return false;
|
||||
}
|
||||
return ent->v.classname.str ().startsWith ("func_door");
|
||||
const auto classHash = ent->v.classname.str ().hash ();
|
||||
|
||||
constexpr auto kFuncDoor = StringRef::fnv1a32 ("func_door");
|
||||
constexpr auto kFuncDoorRotating = StringRef::fnv1a32 ("func_door_rotating");
|
||||
|
||||
return classHash == kFuncDoor || classHash == kFuncDoorRotating;
|
||||
}
|
||||
|
||||
bool BotSupport::isHostageEntity (edict_t *ent) {
|
||||
|
|
@ -241,6 +246,14 @@ bool BotSupport::isShootableBreakable (edict_t *ent) {
|
|||
if (game.isNullEntity (ent) || ent == game.getStartEntity ()) {
|
||||
return false;
|
||||
}
|
||||
// todo: move the breakables list into own array, and refresh them every round, since next thing is very expensive
|
||||
#if 0
|
||||
StringRef material = engfuncs.pfnInfoKeyValue (engfuncs.pfnGetInfoKeyBuffer (ent), "material");
|
||||
|
||||
if (material == "7") {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
const auto limit = cv_breakable_health_limit.as <float> ();
|
||||
|
||||
// not shootable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue