! Set distance attenuation of a sound @param iSoundID ID of the sound @param fMinDist Minimum distance, normally 0 @param fMaxDist Maximum distance at which the sound can be heared */
| 853 | @param fMaxDist Maximum distance at which the sound can be heared |
| 854 | */ |
| 855 | int CScriptObjectSound::SetMinMaxDistance(IFunctionHandler *pH) |
| 856 | { |
| 857 | int nCookie=0; |
| 858 | float fMinDist; |
| 859 | float fMaxDist; |
| 860 | ISound *pISound = NULL; |
| 861 | |
| 862 | CHECK_PARAMETERS(3); |
| 863 | |
| 864 | |
| 865 | pH->GetParamUDVal(1,(INT_PTR &)pISound,nCookie); //AMD Port |
| 866 | |
| 867 | pH->GetParam(2, fMinDist); |
| 868 | pH->GetParam(3, fMaxDist); |
| 869 | |
| 870 | if(fMinDist<1) |
| 871 | fMinDist=1; |
| 872 | |
| 873 | if (pISound && (nCookie==USER_DATA_SOUND)) |
| 874 | pISound->SetMinMaxDistance(fMinDist, fMaxDist); |
| 875 | |
| 876 | return pH->EndFunction(); |
| 877 | } |
| 878 | |
| 879 | /*! |
| 880 | */ |
no test coverage detected