From 86d48b73e1375ab37a2fcdab23a862bbecfe53d5 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 17 Mar 2009 18:18:24 +0000 Subject: Fixed the looping on llParcelMediaCommandList, now PARCEL_MEDIA_COMMAND_PLAY will make the media play only once like its meant to, and PARCEL_MEDIA_COMMAND_LOOP can be used to make it loop. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f809ef2..e6cc798 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8058,6 +8058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return; bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? + byte loop = 0; LandData landData = landObject.landData; string url = landData.MediaURL; @@ -8096,7 +8097,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case ParcelMediaCommandEnum.Loop: + loop = 1; + commandToSend = command; + update = true; //need to send the media update packet to set looping + break; + case ParcelMediaCommandEnum.Play: + loop = 0; + commandToSend = command; + update = true; //need to send the media update packet to make sure it doesn't loop + break; + case ParcelMediaCommandEnum.Pause: case ParcelMediaCommandEnum.Stop: case ParcelMediaCommandEnum.Unload: @@ -8230,7 +8241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api mediaType, description, width, height, - 1); // TODO do some LOOP logic here + loop); } } else if (!presence.IsChildAgent) @@ -8242,7 +8253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api mediaType, description, width, height, - 1); // TODO do some LOOP logic here + loop); } } -- cgit v1.1