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

Method need_update

ogsr_engine/xrGame/enemy_manager.cpp:294–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294bool 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
315void CEnemyManager::try_change_enemy()
316{

Callers 4

try_switch_onlineMethod · 0.45
addMethod · 0.45
removeMethod · 0.45

Calls 5

g_AliveMethod · 0.80
visible_nowMethod · 0.80
visualMethod · 0.45
memoryMethod · 0.45
woundedMethod · 0.45

Tested by

no test coverage detected