diff --git a/ext/crlib b/ext/crlib index 131abb7..721b245 160000 --- a/ext/crlib +++ b/ext/crlib @@ -1 +1 @@ -Subproject commit 131abb70839b6d8c5d359fdeb20aa90e1e8b38dd +Subproject commit 721b245b0ed971b643f64ccb9366500df6e7895b diff --git a/src/botlib.cpp b/src/botlib.cpp index 07559bd..a16e39a 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -156,10 +156,7 @@ void Bot::avoidGrenades () { } void Bot::checkBreakable (edict_t *touch) { - if (!util.isShootableBreakable (touch)) { - return; - } - m_breakableEntity = lookupBreakable (); + m_breakableEntity = touch != nullptr ? touch : lookupBreakable (); if (game.isNullEntity (m_breakableEntity)) { return; @@ -3185,6 +3182,9 @@ void Bot::logic () { if (m_checkTerrain) { doPlayerAvoidance (dirNormal); checkTerrain (movedDistance, dirNormal); + + // check for breakables around bots movement direction + checkBreakable (nullptr); } // check the darkness