| 265 | } |
| 266 | |
| 267 | void CEnemyManager::process_wounded(bool& only_wounded) |
| 268 | { |
| 269 | only_wounded = true; |
| 270 | ENEMIES::const_iterator I = m_objects.begin(); |
| 271 | ENEMIES::const_iterator E = m_objects.end(); |
| 272 | for (; I != E; ++I) |
| 273 | { |
| 274 | const CAI_Stalker* stalker = smart_cast<const CAI_Stalker*>(*I); |
| 275 | if (stalker && stalker->wounded()) |
| 276 | continue; |
| 277 | |
| 278 | only_wounded = false; |
| 279 | break; |
| 280 | } |
| 281 | |
| 282 | if (only_wounded) |
| 283 | { |
| 284 | #if 0 // def DEBUG |
| 285 | if (g_enemy_manager_second_update) |
| 286 | Msg ("%6d ONLY WOUNDED LEFT %s",Device.dwTimeGlobal,*m_object->cName()); |
| 287 | #endif // DEBUG |
| 288 | return; |
| 289 | } |
| 290 | |
| 291 | remove_wounded(); |
| 292 | } |
| 293 | |
| 294 | bool CEnemyManager::need_update(const bool& only_wounded) const |
| 295 | { |