bot: some tweaks for zombie mode (ref #664)

This commit is contained in:
jeefo 2025-02-17 15:03:38 +03:00
commit d965d7677f
No known key found for this signature in database
GPG key ID: D696786B81B667C8
6 changed files with 45 additions and 5 deletions

View file

@ -581,8 +581,14 @@ void Bot::checkTerrain (float movedDistance, const Vector &dirNormal) {
&& m_lastCollTime < game.time ()
&& tid != Task::Attack
&& tid != Task::Camp) {
// special case for creatures
if (m_lastDamageTimestamp >= game.time () && m_isCreature) {
m_lastCollTime = m_lastDamageTimestamp + 0.2f;
m_firstCollideTime = 0.0f;
}
// didn't we move enough previously?
if (movedDistance < kMinMovedDistance && m_prevSpeed > 20.0f) {
else if (movedDistance < kMinMovedDistance && m_prevSpeed > 20.0f) {
m_prevTime = game.time (); // then consider being stuck
m_isStuck = true;