diff options
4 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d81054e..06f4fd1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -4965,6 +4965,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4965 | m_SoundModule.SendSound(sop.UUID, soundID, volume, true, 0, 0, false, false); | 4965 | m_SoundModule.SendSound(sop.UUID, soundID, volume, true, 0, 0, false, false); |
4966 | } | 4966 | } |
4967 | 4967 | ||
4968 | public void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, | ||
4969 | LSL_Vector top_north_east, LSL_Vector bottom_south_west) | ||
4970 | { | ||
4971 | m_host.AddScriptLPS(1); | ||
4972 | |||
4973 | if (m_SoundModule == null) | ||
4974 | return; | ||
4975 | |||
4976 | SceneObjectPart sop = GetSingleLinkPart(linknum); | ||
4977 | if(sop == null) | ||
4978 | return; | ||
4979 | |||
4980 | UUID soundID = ScriptUtils.GetAssetIdFromKeyOrItemName(sop, sound, AssetType.Sound); | ||
4981 | if(soundID == UUID.Zero) | ||
4982 | return; | ||
4983 | |||
4984 | m_SoundModule.TriggerSoundLimited(sop.UUID, soundID, volume, | ||
4985 | bottom_south_west, top_north_east); | ||
4986 | } | ||
4987 | |||
4968 | public void osStopSound(LSL_Integer linknum) | 4988 | public void osStopSound(LSL_Integer linknum) |
4969 | { | 4989 | { |
4970 | m_host.AddScriptLPS(1); | 4990 | m_host.AddScriptLPS(1); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 818c1c4..4c12bd9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -523,5 +523,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
523 | void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius); | 523 | void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius); |
524 | void osStopSound(LSL_Integer linknum); | 524 | void osStopSound(LSL_Integer linknum); |
525 | void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume); | 525 | void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume); |
526 | void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, | ||
527 | vector top_north_east, vector bottom_south_west); | ||
526 | } | 528 | } |
527 | } | 529 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index aa37159..dd0fa6e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -1256,6 +1256,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1256 | m_OSSL_Functions.osTriggerSound(linknum, sound, volume); | 1256 | m_OSSL_Functions.osTriggerSound(linknum, sound, volume); |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | public void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, | ||
1260 | vector top_north_east, vector bottom_south_west) | ||
1261 | { | ||
1262 | m_OSSL_Functions.osTriggerSoundLimited(linknum, sound, volume, | ||
1263 | top_north_east, bottom_south_west); | ||
1264 | } | ||
1265 | |||
1259 | public void osStopSound(LSL_Integer linknum) | 1266 | public void osStopSound(LSL_Integer linknum) |
1260 | { | 1267 | { |
1261 | m_OSSL_Functions.osStopSound(linknum); | 1268 | m_OSSL_Functions.osStopSound(linknum); |
diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index b776035..71b39b0 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini | |||
@@ -276,6 +276,7 @@ | |||
276 | ; Allow_osSetSoundRadius = true | 276 | ; Allow_osSetSoundRadius = true |
277 | ; Allow_osStopSound = true | 277 | ; Allow_osStopSound = true |
278 | ; Allow_osTriggerSound = true | 278 | ; Allow_osTriggerSound = true |
279 | ; Allow_osTriggerSoundLimited = true | ||
279 | ; Allow_osVecDistSquare = true | 280 | ; Allow_osVecDistSquare = true |
280 | ; Allow_osVecMagSquare = true | 281 | ; Allow_osVecMagSquare = true |
281 | ; Allow_osVolumeDetect = true | 282 | ; Allow_osVolumeDetect = true |