//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ! Change the velocity of a sound @param nID ID of the sound @param v3d Three component vector containing the velocity for each axis */
| 828 | @param v3d Three component vector containing the velocity for each axis |
| 829 | */ |
| 830 | int CScriptObjectSound::SetSoundSpeed(IFunctionHandler *pH) |
| 831 | { |
| 832 | CHECK_PARAMETERS(2); |
| 833 | int nCookie=0; |
| 834 | ISound *pSound; |
| 835 | CScriptObjectVector oVec(m_pScriptSystem,true); |
| 836 | Vec3 v3d; |
| 837 | pH->GetParamUDVal(1,(INT_PTR &)pSound,nCookie); //AMD Port |
| 838 | pH->GetParam(2,*oVec); |
| 839 | v3d=oVec.Get(); |
| 840 | |
| 841 | |
| 842 | if (pSound && (nCookie==USER_DATA_SOUND)) |
| 843 | { |
| 844 | pSound->SetVelocity(v3d); |
| 845 | } |
| 846 | |
| 847 | return pH->EndFunction(); |
| 848 | } |
| 849 | |
| 850 | /*! Set distance attenuation of a sound |
| 851 | @param iSoundID ID of the sound |
nothing calls this directly
no test coverage detected