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

Method update_enemies

ogsr_engine/xrGame/memory_manager.cpp:89–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87#endif // DEBUG
88
89void CMemoryManager::update_enemies(const bool& registered_in_combat)
90{
91#ifdef DEBUG
92 g_enemy_manager_second_update = false;
93#endif // DEBUG
94 enemy().update();
95
96 if (m_stalker && (!enemy().selected() || (smart_cast<const CAI_Stalker*>(enemy().selected()) && smart_cast<const CAI_Stalker*>(enemy().selected())->wounded())) &&
97 registered_in_combat)
98 {
99 m_stalker->agent_manager().enemy().distribute_enemies();
100
101 if (visual().enabled())
102 update(visual().objects(), true);
103
104 update(sound().objects(), true);
105 update(hit().objects(), true);
106
107#ifdef DEBUG
108 g_enemy_manager_second_update = true;
109#endif // DEBUG
110 enemy().update();
111 }
112}
113
114void CMemoryManager::update(float time_delta)
115{

Callers

nothing calls this directly

Calls 6

updateFunction · 0.85
distribute_enemiesMethod · 0.80
updateMethod · 0.45
selectedMethod · 0.45
woundedMethod · 0.45
enabledMethod · 0.45

Tested by

no test coverage detected