aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-04-10 03:58:54 +0100
committerUbitUmarov2018-04-10 03:58:54 +0100
commit5d0a1656bf8d31ef3bbfaf6c0fc1de55d11bc597 (patch)
tree13a8cd18fa17600746ea63111f53131def508255 /OpenSim/Region
parent some cleanup on ll sound functions (diff)
downloadopensim-SC-5d0a1656bf8d31ef3bbfaf6c0fc1de55d11bc597.zip
opensim-SC-5d0a1656bf8d31ef3bbfaf6c0fc1de55d11bc597.tar.gz
opensim-SC-5d0a1656bf8d31ef3bbfaf6c0fc1de55d11bc597.tar.bz2
opensim-SC-5d0a1656bf8d31ef3bbfaf6c0fc1de55d11bc597.tar.xz
mantis 8305: add osTriggerSoundLimited(..)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs7
3 files changed, 29 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);