MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / UpdateSounds

Method UpdateSounds

CryEntitySystem/Entity.cpp:1568–1595  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1566
1567//////////////////////////////////////////////////////////////////////////
1568void CEntity::UpdateSounds( SEntityUpdateContext &ctx )
1569{
1570 if (!m_lstAttachedSounds.empty())
1571 {
1572 ENTITY_PROFILER
1573
1574 SoundsListItor itor = m_lstAttachedSounds.begin();
1575 Vec3d vPos= GetSoundPos();
1576 while(itor!=m_lstAttachedSounds.end())
1577 {
1578 SAttachedSound &Sound=(*itor);
1579#if !defined(LINUX64)
1580 if((Sound.pSound!=NULL) && (Sound.pSound->IsPlaying() || Sound.pSound->IsPlayingVirtual()))
1581#else
1582 if((Sound.pSound!=0) && (Sound.pSound->IsPlaying() || Sound.pSound->IsPlayingVirtual()))
1583#endif
1584 {
1585 Sound.pSound->SetPosition(vPos+Sound.Offset);
1586 ++itor;
1587 }
1588 else
1589 {
1590 itor=m_lstAttachedSounds.erase(itor);
1591 }
1592 }
1593 }
1594 m_bUpdateSounds = !m_lstAttachedSounds.empty();
1595}
1596
1597//////////////////////////////////////////////////////////////////////////
1598void CEntity::UpdatePhysics( SEntityUpdateContext &ctx )

Callers

nothing calls this directly

Calls 7

emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
IsPlayingMethod · 0.45
IsPlayingVirtualMethod · 0.45
SetPositionMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected