Fix llParcelMediaCommandList() so that it applies commands only to the parcel that the script is in, not all parcels.

Patch from http://opensimulator.org/mantis/view.php?id=2738
Thanks snoopy and fineman.
viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-10-22 21:28:10 +01:00
parent 1064e743be
commit cfbaad3669
1 changed files with 4 additions and 4 deletions

View File

@ -9101,10 +9101,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// do that one last, it will cause a ParcelPropertiesUpdate // do that one last, it will cause a ParcelPropertiesUpdate
landObject.SetMediaUrl(url); landObject.SetMediaUrl(url);
// now send to all (non-child) agents // now send to all (non-child) agents in the parcel
World.ForEachScenePresence(delegate(ScenePresence sp) World.ForEachScenePresence(delegate(ScenePresence sp)
{ {
if (!sp.IsChildAgent) if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID))
{ {
sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, sp.ControllingClient.SendParcelMediaUpdate(landData.MediaURL,
landData.MediaID, landData.MediaID,
@ -9134,10 +9134,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the commandList contained a start/stop/... command, too // the commandList contained a start/stop/... command, too
if (presence == null) if (presence == null)
{ {
// send to all (non-child) agents // send to all (non-child) agents in the parcel
World.ForEachScenePresence(delegate(ScenePresence sp) World.ForEachScenePresence(delegate(ScenePresence sp)
{ {
if (!sp.IsChildAgent) if (!sp.IsChildAgent && (sp.currentParcelUUID == landData.GlobalID))
{ {
sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this? sp.ControllingClient.SendParcelMediaCommand(0x4, // TODO what is this?
(ParcelMediaCommandEnum)commandToSend, (ParcelMediaCommandEnum)commandToSend,