1010
1111IC u32 CScriptSound ::Length ()
1212{
13- VERIFY (m_sound ._handle ());
13+ VERIFY (m_sound ._handle () || m_bIsNoSound );
1414 return iFloor (m_sound .get_length_sec () * 1000.0f );
1515}
1616
@@ -28,37 +28,37 @@ IC void CScriptSound::PlayAtPos(CScriptGameObject* object, const Fvector& positi
2828
2929IC void CScriptSound ::SetMinDistance (const float fMinDistance )
3030{
31- VERIFY (m_sound ._handle ());
31+ VERIFY (m_sound ._handle () || m_bIsNoSound );
3232 m_sound .set_range (fMinDistance , GetMaxDistance ());
3333}
3434
3535IC void CScriptSound ::SetMaxDistance (const float fMaxDistance )
3636{
37- VERIFY (m_sound ._handle ());
37+ VERIFY (m_sound ._handle () || m_bIsNoSound );
3838 m_sound .set_range (GetMinDistance (), fMaxDistance );
3939}
4040
4141IC const float CScriptSound ::GetFrequency () const
4242{
43- VERIFY (m_sound ._handle ());
43+ VERIFY (m_sound ._handle () || m_bIsNoSound );
4444 return (m_sound .get_params ()-> freq );
4545}
4646
4747IC const float CScriptSound ::GetMinDistance () const
4848{
49- VERIFY (m_sound ._handle ());
49+ VERIFY (m_sound ._handle () || m_bIsNoSound );
5050 return (m_sound .get_params ()-> min_distance );
5151}
5252
5353IC const float CScriptSound ::GetMaxDistance () const
5454{
55- VERIFY (m_sound ._handle ());
55+ VERIFY (m_sound ._handle () || m_bIsNoSound );
5656 return (m_sound .get_params ()-> max_distance );
5757}
5858
5959IC const float CScriptSound ::GetVolume () const
6060{
61- VERIFY (m_sound ._handle ());
61+ VERIFY (m_sound ._handle () || m_bIsNoSound );
6262 return (m_sound .get_params ()-> volume );
6363}
6464
@@ -72,42 +72,42 @@ IC bool CScriptSound::IsPlaying() const
7272IC void CScriptSound ::AttachTail (LPCSTR caSoundName ) { m_sound .attach_tail (caSoundName ); }
7373IC void CScriptSound ::Stop ()
7474{
75- VERIFY (m_sound ._handle ());
75+ VERIFY (m_sound ._handle () || m_bIsNoSound );
7676 m_sound .stop ();
7777}
7878
7979IC void CScriptSound ::StopDeferred ()
8080{
81- VERIFY (m_sound ._handle ());
81+ VERIFY (m_sound ._handle () || m_bIsNoSound );
8282 m_sound .stop_deferred ();
8383}
8484
8585IC void CScriptSound ::SetPosition (const Fvector & position )
8686{
87- VERIFY (m_sound ._handle ());
87+ VERIFY (m_sound ._handle () || m_bIsNoSound );
8888 m_sound .set_position (position );
8989}
9090
9191IC void CScriptSound ::SetFrequency (float frequency )
9292{
93- VERIFY (m_sound ._handle ());
93+ VERIFY (m_sound ._handle () || m_bIsNoSound );
9494 m_sound .set_frequency (frequency );
9595}
9696
9797IC void CScriptSound ::SetVolume (float volume )
9898{
99- VERIFY (m_sound ._handle ());
99+ VERIFY (m_sound ._handle () || m_bIsNoSound );
100100 m_sound .set_volume (volume );
101101}
102102
103103IC const CSound_params * CScriptSound ::GetParams ()
104104{
105- VERIFY (m_sound ._handle ());
105+ VERIFY (m_sound ._handle () || m_bIsNoSound );
106106 return (m_sound .get_params ());
107107}
108108
109109IC void CScriptSound ::SetParams (CSound_params * sound_params )
110110{
111- VERIFY (m_sound ._handle ());
111+ VERIFY (m_sound ._handle () || m_bIsNoSound );
112112 m_sound .set_params (sound_params );
113113}
0 commit comments