aim: do not add aim error for normal bots

combat: do not trigger seek cover task with csdm mode
This commit is contained in:
jeefo 2024-01-08 18:11:58 +03:00
commit 01046f7c9a
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -547,7 +547,7 @@ Vector Bot::getBodyOffsetError (float distance) {
m_lastEnemyOrigin = spot;
// add some error to unskilled bots
if (m_difficulty < Difficulty::Hard) {
if (m_difficulty < Difficulty::Normal) {
spot += getBodyOffsetError (distance);
}
return spot;
@ -1151,7 +1151,7 @@ void Bot::attackMovement () {
}
// only take cover when bomb is not planted and enemy can see the bot or the bot is VIP
if ((m_states & Sense::SeeingEnemy) && approach < 30 && !bots.isBombPlanted () && (isInViewCone (m_enemy->v.origin) || m_isVIP)) {
if (!game.is (GameFlags::CSDM) && (m_states & Sense::SeeingEnemy) && approach < 30 && !bots.isBombPlanted () && (isInViewCone (m_enemy->v.origin) || m_isVIP)) {
m_moveSpeed = -pev->maxspeed;
startTask (Task::SeekCover, TaskPri::SeekCover, kInvalidNodeIndex, 0.0f, true);
}