* simplify media and music url setting since we never get back a null land object

0.6.4-rc1
Justin Clarke Casey 2009-03-05 20:32:35 +00:00
parent 6c735e0828
commit c213a12b57
3 changed files with 22 additions and 31 deletions

View File

@ -74,19 +74,13 @@ namespace OpenSim.Region.CoreModules.World.Land
#region ILandChannel Members
/// <summary>
/// Get the land object at the specified point
/// </summary>
/// <param name="x_float">Value between 0 - 256 on the x axis of the point</param>
/// <param name="y_float">Value between 0 - 256 on the y axis of the point</param>
/// <returns>Land object at the point supplied</returns>
public ILandObject GetLandObject(float x_float, float y_float)
{
if (m_landManagementModule != null)
{
return m_landManagementModule.GetLandObject(x_float, y_float);
}
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND";
return obj;
@ -98,6 +92,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
return m_landManagementModule.GetLandObject(x, y);
}
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.landData.Name = "NO LAND";
return obj;

View File

@ -35,8 +35,23 @@ namespace OpenSim.Region.Framework.Interfaces
{
List<ILandObject> ParcelsNearPoint(Vector3 position);
List<ILandObject> AllParcels();
/// <summary>
/// Get the land object at the specified point
/// </summary>
/// <param name="x">Value between 0 - 256 on the x axis of the point</param>
/// <param name="y">Value between 0 - 256 on the y axis of the point</param>
/// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(int x, int y);
/// <summary>
/// Get the land object at the specified point
/// </summary>
/// <param name="x">Value between 0 - 256 on the x axis of the point</param>
/// <param name="y">Value between 0 - 256 on the y axis of the point</param>
/// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(float x, float y);
bool IsLandPrimCountTainted();
bool IsForcefulBansAllowed();
void UpdateLandObject(int localID, LandData data);

View File

@ -1114,7 +1114,6 @@ namespace OpenSim.Region.Framework.Scenes
{
Heightmap = new TerrainChannel(map);
}
}
catch (Exception e)
{
@ -3045,40 +3044,22 @@ namespace OpenSim.Region.Framework.Scenes
public LandData GetLandData(uint x, uint y)
{
m_log.DebugFormat("[SCENE] returning land for {0},{1}", x, y);
m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
return LandChannel.GetLandObject((int)x, (int)y).landData;
}
public void SetLandMusicURL(float x, float y, string url)
{
ILandObject land = LandChannel.GetLandObject(x, y);
if (land == null)
{
return;
}
else
{
land.landData.MusicURL = url;
land.sendLandUpdateToAvatarsOverMe();
return;
}
land.landData.MusicURL = url;
land.sendLandUpdateToAvatarsOverMe();
}
public void SetLandMediaURL(float x, float y, string url)
{
ILandObject land = LandChannel.GetLandObject(x, y);
if (land == null)
{
return;
}
else
{
land.landData.MediaURL = url;
land.sendLandUpdateToAvatarsOverMe();
return;
}
land.landData.MediaURL = url;
land.sendLandUpdateToAvatarsOverMe();
}
public RegionInfo RequestClosestRegion(string name)