fix llCollisionSound("",0.0) not disabling sounds BUT let llCollisionSound("",value [<=1.0]) play default sounds with selected volume. I really don't care if last part is not like SL

This commit is contained in:
UbitUmarov
2016-08-20 23:41:32 +01:00
parent 0517e3d439
commit 04dd2a9795
2 changed files with 50 additions and 22 deletions

View File

@@ -5118,7 +5118,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.CollisionSoundVolume = (float)impact_volume;
m_host.CollisionSound = m_host.invalidCollisionSoundUUID;
m_host.CollisionSoundType = 0;
if(impact_volume == 0.0)
m_host.CollisionSoundType = -1; // disable all sounds
else
m_host.CollisionSoundType = 2; // allow change of default sounds volume
return;
}
// TODO: Parameter check logic required.