* refactor: move media and music url setting from scene into LandObject

0.6.4-rc1
Justin Clarke Casey 2009-03-05 20:53:23 +00:00
parent c213a12b57
commit 3d70dbd01d
5 changed files with 38 additions and 20 deletions

View File

@ -116,7 +116,6 @@ namespace OpenSim.Region.CoreModules.World.Land
return newLand;
}
static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
@ -926,5 +925,25 @@ namespace OpenSim.Region.CoreModules.World.Land
#endregion
#endregion
/// <summary>
/// Set the media url for this land parcel
/// </summary>
/// <param name="url"></param>
public void SetMediaUrl(string url)
{
landData.MediaURL = url;
sendLandUpdateToAvatarsOverMe();
}
/// <summary>
/// Set the music url for this land parcel
/// </summary>
/// <param name="url"></param>
public void SetMusicUrl(string url)
{
landData.MusicURL = url;
sendLandUpdateToAvatarsOverMe();
}
}
}

View File

@ -63,7 +63,6 @@ namespace OpenSim.Region.Framework.Interfaces
void forceUpdateLandInfo();
void setLandBitmap(bool[,] bitmap);
bool[,] basicFullRegionLandBitmap();
bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y);
bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
@ -79,5 +78,17 @@ namespace OpenSim.Region.Framework.Interfaces
void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
/// <summary>
/// Set the media url for this land parcel
/// </summary>
/// <param name="url"></param>
void SetMediaUrl(string url);
/// <summary>
/// Set the music url for this land parcel
/// </summary>
/// <param name="url"></param>
void SetMusicUrl(string url);
}
}

View File

@ -3048,20 +3048,6 @@ namespace OpenSim.Region.Framework.Scenes
return LandChannel.GetLandObject((int)x, (int)y).landData;
}
public void SetLandMusicURL(float x, float y, string url)
{
ILandObject land = LandChannel.GetLandObject(x, y);
land.landData.MusicURL = url;
land.sendLandUpdateToAvatarsOverMe();
}
public void SetLandMediaURL(float x, float y, string url)
{
ILandObject land = LandChannel.GetLandObject(x, y);
land.landData.MediaURL = url;
land.sendLandUpdateToAvatarsOverMe();
}
public RegionInfo RequestClosestRegion(string name)
{
return m_sceneGridService.RequestClosestRegion(name);

View File

@ -6824,7 +6824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
return;
}
World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).SetMusicUrl(url);
// ScriptSleep(2000);
}
@ -8204,11 +8206,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (presence == null)
{
// we send to all
landData.MediaID = new UUID(texture);
landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0;
// do that one last, it will cause a ParcelPropertiesUpdate
World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
landObject.SetMediaUrl(url);
// now send to all (non-child) agents
List<ScenePresence> agents = World.GetAvatars();

View File

@ -789,7 +789,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).SetMediaUrl(url);
}
public string osGetScriptEngineName()