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

Method SetSoundSpeed

CrySystem/ScriptObjectSound.cpp:830–848  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ! Change the velocity of a sound @param nID ID of the sound @param v3d Three component vector containing the velocity for each axis */

Source from the content-addressed store, hash-verified

828 @param v3d Three component vector containing the velocity for each axis
829*/
830int 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

Callers

nothing calls this directly

Calls 5

EndFunctionMethod · 0.80
GetParamUDValMethod · 0.45
GetParamMethod · 0.45
GetMethod · 0.45
SetVelocityMethod · 0.45

Tested by

no test coverage detected