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

Method SetMinMaxDistance

CrySystem/ScriptObjectSound.cpp:855–877  ·  view source on GitHub ↗

! 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 */

Source from the content-addressed store, hash-verified

853 @param fMaxDist Maximum distance at which the sound can be heared
854*/
855int 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*/

Callers 1

Load3DSoundMethod · 0.45

Calls 3

EndFunctionMethod · 0.80
GetParamUDValMethod · 0.45
GetParamMethod · 0.45

Tested by

no test coverage detected