| 292 | } |
| 293 | |
| 294 | bool CEnemyManager::need_update(const bool& only_wounded) const |
| 295 | { |
| 296 | if (!selected()) |
| 297 | return (true); |
| 298 | |
| 299 | if (!selected()->g_Alive()) |
| 300 | return (true); |
| 301 | |
| 302 | if (enable_enemy_change() && !m_object->memory().visual().visible_now(selected())) |
| 303 | return (true); |
| 304 | |
| 305 | if (only_wounded) |
| 306 | return (false); |
| 307 | |
| 308 | const CAI_Stalker* stalker = smart_cast<const CAI_Stalker*>(selected()); |
| 309 | if (stalker && stalker->wounded()) |
| 310 | return (true); |
| 311 | |
| 312 | return (false); |
| 313 | } |
| 314 | |
| 315 | void CEnemyManager::try_change_enemy() |
| 316 | { |
no test coverage detected