fix: crash bug introduced in pr #707

bot: do not apply bullet spread if in hardcore mode
This commit is contained in:
jeefo 2025-08-07 17:50:22 +03:00
commit e37cbb89a5
No known key found for this signature in database
GPG key ID: D696786B81B667C8
2 changed files with 2 additions and 2 deletions

View file

@ -1124,7 +1124,7 @@ void Bot::selectWeapons (float distance, int, int id, int choosen) {
else if (isShieldDrawn ()
|| m_isReloading
|| (hasEnemy && (m_enemy->v.button & IN_RELOAD))
|| (!hasEnemy && !seesEntity (m_enemy->v.origin))) {
|| (hasEnemy && !seesEntity (m_enemy->v.origin))) {
pev->button |= IN_ATTACK2; // draw out the shield
}

View file

@ -446,7 +446,7 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int interfaceVersion) {
// It has been adapted for usage to HLTV spectators, who don't send ClientCommands, but send
// all their update information to the server using usercmd's instead, it seems.
if (bots[const_cast <edict_t *> (player)]) {
if (!cv_whose_your_daddy && bots[const_cast <edict_t *> (player)]) {
random_seed = rg (0, 0x7fffffff);
}
dllapi.pfnCmdStart (player, cmd, random_seed);