/////////////////////////////////////////////////////////////////////
| 875 | |
| 876 | ////////////////////////////////////////////////////////////////////////// |
| 877 | void CEntity::PlaySound(ISound *pSound, float fSoundScale, Vec3d &Offset) |
| 878 | { |
| 879 | m_bUpdateSounds = true; |
| 880 | if (m_lstAttachedSounds.size()<15) |
| 881 | { |
| 882 | bool bWasPlaying = pSound->IsPlaying(); |
| 883 | pSound->SetPosition(GetSoundPos()); |
| 884 | pSound->Play(fSoundScale); |
| 885 | // If this sound already playing don`t add it again for playback. |
| 886 | if (!bWasPlaying && pSound->IsPlaying()) |
| 887 | { |
| 888 | m_lstAttachedSounds.push_back(SAttachedSound(pSound, Offset)); |
| 889 | } |
| 890 | } |
| 891 | else |
| 892 | { |
| 893 | m_pISystem->GetILog()->Log("\001 warning trying to attach more than 15 sounds to %s",m_name.c_str()); |
| 894 | int ddd=1; |
| 895 | for(SoundsList::iterator sItr = m_lstAttachedSounds.begin();sItr!=m_lstAttachedSounds.end(); ++sItr,++ddd) |
| 896 | { |
| 897 | ISound *pDbg = (*sItr).pSound; |
| 898 | |
| 899 | m_pISystem->GetILog()->Log("\005 %d. %s",ddd,pDbg->GetName()); |
| 900 | } |
| 901 | // let's clear it, to restore from an erroneous situation |
| 902 | m_lstAttachedSounds.clear(); |
| 903 | } |
| 904 | } |
| 905 | |
| 906 | ////////////////////////////////////////////////////////////////////////// |
| 907 | void CEntity::MoveTo(const Vec3d &pos, bool moveObjects, bool bUpdatePhysics) |
nothing calls this directly
no test coverage detected