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

Method on_requested_spawn

ogsr_engine/xrGame/sound_memory_manager.cpp:515–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515void CSoundMemoryManager::on_requested_spawn(CObject* object)
516{
517 DELAYED_SOUND_OBJECTS::iterator I = m_delayed_objects.begin();
518 DELAYED_SOUND_OBJECTS::iterator E = m_delayed_objects.end();
519 for (; I != E; ++I)
520 {
521 if ((*I).m_object_id != object->ID())
522 continue;
523
524 if (m_object->g_Alive())
525 {
526 (*I).m_sound_object.m_object = smart_cast<CGameObject*>(object);
527 VERIFY((*I).m_sound_object.m_object);
528 add((*I).m_sound_object, true);
529 }
530
531 m_delayed_objects.erase(I);
532 return;
533 }
534}

Callers

nothing calls this directly

Calls 5

addFunction · 0.85
g_AliveMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected