MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / process_wounded

Method process_wounded

ogsr_engine/xrGame/enemy_manager.cpp:267–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void 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
294bool CEnemyManager::need_update(const bool& only_wounded) const
295{

Callers

nothing calls this directly

Calls 5

MsgFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
woundedMethod · 0.45
cNameMethod · 0.45

Tested by

no test coverage detected