nav: destroy breakables not only when touching them (ref #541)

build: use symbol versioning only with glibc (ref #540)
This commit is contained in:
jeefo 2024-03-25 14:25:44 +03:00
commit 4128b27cf4
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 131abb70839b6d8c5d359fdeb20aa90e1e8b38dd Subproject commit 721b245b0ed971b643f64ccb9366500df6e7895b

View file

@ -156,10 +156,7 @@ void Bot::avoidGrenades () {
} }
void Bot::checkBreakable (edict_t *touch) { void Bot::checkBreakable (edict_t *touch) {
if (!util.isShootableBreakable (touch)) { m_breakableEntity = touch != nullptr ? touch : lookupBreakable ();
return;
}
m_breakableEntity = lookupBreakable ();
if (game.isNullEntity (m_breakableEntity)) { if (game.isNullEntity (m_breakableEntity)) {
return; return;
@ -3185,6 +3182,9 @@ void Bot::logic () {
if (m_checkTerrain) { if (m_checkTerrain) {
doPlayerAvoidance (dirNormal); doPlayerAvoidance (dirNormal);
checkTerrain (movedDistance, dirNormal); checkTerrain (movedDistance, dirNormal);
// check for breakables around bots movement direction
checkBreakable (nullptr);
} }
// check the darkness // check the darkness