*Moved LandManagement into its own region module (spiffy!)

0.6.0-stable
mingchen 2008-03-22 23:10:22 +00:00
parent 5ebef6410e
commit 71ca162821
21 changed files with 2031 additions and 1890 deletions

View File

@ -35,7 +35,6 @@ using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework.Data.MSSQL;
@ -429,7 +428,7 @@ namespace OpenSim.Framework.Data.MSSQL
}
}
public void StoreLandObject(Land parcel, LLUUID regionUUID)
public void StoreLandObject(ILandObject parcel)
{
// Instance.StoreLandObject(parcel, regionUUID);
@ -446,12 +445,12 @@ namespace OpenSim.Framework.Data.MSSQL
if (landRow == null)
{
landRow = land.NewRow();
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
land.Rows.Add(landRow);
}
else
{
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
}
using (

View File

@ -34,7 +34,6 @@ using libsecondlife;
using MySql.Data.MySqlClient;
using OpenSim.Framework.Console;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Framework.Data.MySQL
@ -416,7 +415,7 @@ namespace OpenSim.Framework.Data.MySQL
}
}
public void StoreLandObject(Land parcel, LLUUID regionUUID)
public void StoreLandObject(ILandObject parcel)
{
lock (m_dataSet)
{
@ -427,12 +426,12 @@ namespace OpenSim.Framework.Data.MySQL
if (landRow == null)
{
landRow = land.NewRow();
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
land.Rows.Add(landRow);
}
else
{
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
}
using (

View File

@ -34,7 +34,6 @@ using Mono.Data.SqliteClient;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Framework.Data.SQLite
@ -477,7 +476,7 @@ namespace OpenSim.Framework.Data.SQLite
}
}
public void StoreLandObject(Land parcel, LLUUID regionUUID)
public void StoreLandObject(ILandObject parcel)
{
lock (ds)
{
@ -488,12 +487,12 @@ namespace OpenSim.Framework.Data.SQLite
if (landRow == null)
{
landRow = land.NewRow();
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
land.Rows.Add(landRow);
}
else
{
fillLandRow(landRow, parcel.landData, regionUUID);
fillLandRow(landRow, parcel.landData, parcel.regionUUID);
}
// I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around

View File

@ -502,7 +502,10 @@ namespace OpenSim
scene.PermissionsMngr.BypassPermissions = !m_permissions;
// We need to do this after we've initialized the scripting engines.
scene.StartScripts();
scene.StartScripts();
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.LandChannel.performParcelPrimCountUpdate();
m_sceneManager.Add(scene);

View File

@ -155,8 +155,6 @@ namespace OpenSim.Region.ClientStack
}
scene.LoadPrimsFromStorage(m_permissions, regionInfo.originRegionID);
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.performParcelPrimCountUpdate();
scene.StartTimer();
return scene;
}

View File

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
namespace OpenSim.Region.Environment.Interfaces
{
public interface ILandChannel
{
bool allowedForcefulBans { get; set; }
void IncomingLandObjectsFromStorage(List<LandData> data);
void IncomingLandObjectFromStorage(LandData data);
void NoLandDataFromStorage();
ILandObject getLandObject(int x, int y);
ILandObject getLandObject(float x, float y);
void setPrimsTainted();
bool isLandPrimCountTainted();
void sendLandUpdate(ScenePresence avatar, bool force);
void sendLandUpdate(ScenePresence avatar);
void resetAllLandPrimCounts();
void addPrimToLandPrimCounts(SceneObjectGroup obj);
void removePrimFromLandPrimCounts(SceneObjectGroup obj);
void finalizeLandPrimCountUpdate();
void updateLandPrimCounts();
void performParcelPrimCountUpdate();
void updateLandObject(int local_id, LandData newData);
void sendParcelOverlay(IClientAPI remote_client);
void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
void handleParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client);
void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client);
void resetSimLandObjects();
List<ILandObject> parcelsNearPoint(LLVector3 position);
void sendYouAreBannedNotice(ScenePresence avatar);
void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID);
void sendOutNearestBanLine(IClientAPI avatar);
void handleSignificantClientMovement(IClientAPI remote_client);
void handleAnyClientMovement(ScenePresence avatar);
void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
}
}

View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
namespace OpenSim.Region.Environment.Interfaces
{
public interface ILandObject
{
LandData landData { get; set; }
bool[,] landBitmap { get; set; }
LLUUID regionUUID { get; }
bool containsPoint(int x, int y);
ILandObject Copy();
void sendLandUpdateToAvatarsOverMe();
void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
void updateLandProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
bool isEitherBannedOrRestricted(LLUUID avatar);
bool isBannedFromLand(LLUUID avatar);
bool isRestrictedFromLand(LLUUID avatar);
void sendLandUpdateToClient(IClientAPI remote_client);
ParcelAccessListReplyPacket.ListBlock[] createAccessListArrayByFlag(ParcelManager.AccessList flag);
void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
void updateLandBitmapByteArray();
void setLandBitmapFromByteArray();
bool[,] getLandBitmap();
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);
bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client);
void sendLandObjectOwners(IClientAPI remote_client);
void returnObject(SceneObjectGroup obj);
void returnLandObjects(int type, LLUUID owner);
void resetLandPrimCounts();
void addPrimToCount(SceneObjectGroup obj);
void removePrimFromCount(SceneObjectGroup obj);
}
}

View File

@ -28,7 +28,6 @@
using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Interfaces
@ -69,7 +68,7 @@ namespace OpenSim.Region.Environment.Interfaces
void StoreTerrain(double[,] terrain, LLUUID regionID);
double[,] LoadTerrain(LLUUID regionID);
void StoreLandObject(Land Parcel, LLUUID regionUUID);
void StoreLandObject(ILandObject Parcel);
void RemoveLandObject(LLUUID globalID);
List<LandData> LoadLandObjects(LLUUID regionUUID);

View File

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Interfaces;
using Nini.Config;
namespace OpenSim.Region.Environment.Modules.LandManagement
{
public class LandManagementModule : IRegionModule
{
private LandChannel landChannel;
private Scene m_scene;
#region IRegionModule Members
public void Initialise(Scene scene, IConfigSource source)
{
m_scene = scene;
landChannel = new LandChannel(scene);
m_scene.EventManager.OnParcelPrimCountAdd += landChannel.addPrimToLandPrimCounts;
m_scene.EventManager.OnParcelPrimCountUpdate += landChannel.updateLandPrimCounts;
m_scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(landChannel.handleAvatarChangingParcel);
m_scene.EventManager.OnClientMovement += new EventManager.ClientMovement(landChannel.handleAnyClientMovement);
lock (m_scene)
{
m_scene.LandChannel = (ILandChannel)landChannel;
}
}
public void PostInitialise()
{
}
public void Close()
{
}
public string Name
{
get { return "LandManagementModule"; }
}
public bool IsSharedModule
{
get { return false; }
}
#endregion
}
}

View File

@ -26,9 +26,8 @@
*/
using libsecondlife;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment
{
public class PermissionManager
@ -126,7 +125,7 @@ namespace OpenSim.Region.Environment
string reason = "Insufficient permission";
Land land = m_scene.LandManager.getLandObject(position.X, position.Y);
ILandObject land = m_scene.LandChannel.getLandObject(position.X, position.Y);
if (land == null) return false;
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
@ -230,7 +229,7 @@ namespace OpenSim.Region.Environment
}
// Users should be able to edit what is over their land.
Land parcel = m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
ILandObject parcel = m_scene.LandChannel.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
if (parcel != null && parcel.landData.ownerID == user)
return objectOwnerMask;
@ -324,7 +323,7 @@ namespace OpenSim.Region.Environment
}
// Users should be able to edit what is over their land.
Land parcel = m_scene.LandManager.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
ILandObject parcel = m_scene.LandChannel.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
if ((parcel != null) && (parcel.landData.ownerID == currentUser))
{
permission = true;
@ -551,7 +550,7 @@ namespace OpenSim.Region.Environment
Y = 0;
// Land owner can terraform too
Land parcel = m_scene.LandManager.getLandObject(X, Y);
ILandObject parcel = m_scene.LandChannel.getLandObject(X, Y);
if (parcel != null && GenericParcelPermission(user, parcel))
permission = true;
@ -596,7 +595,7 @@ namespace OpenSim.Region.Environment
#region Parcel Permissions
protected virtual bool GenericParcelPermission(LLUUID user, Land parcel)
protected virtual bool GenericParcelPermission(LLUUID user, ILandObject parcel)
{
bool permission = false;
@ -625,22 +624,22 @@ namespace OpenSim.Region.Environment
protected virtual bool GenericParcelPermission(LLUUID user, LLVector3 pos)
{
Land parcel = m_scene.LandManager.getLandObject(pos.X, pos.Y);
ILandObject parcel = m_scene.LandChannel.getLandObject(pos.X, pos.Y);
if (parcel == null) return false;
return GenericParcelPermission(user, parcel);
}
public virtual bool CanEditParcel(LLUUID user, Land parcel)
public virtual bool CanEditParcel(LLUUID user, ILandObject parcel)
{
return GenericParcelPermission(user, parcel);
}
public virtual bool CanSellParcel(LLUUID user, Land parcel)
public virtual bool CanSellParcel(LLUUID user, ILandObject parcel)
{
return GenericParcelPermission(user, parcel);
}
public virtual bool CanAbandonParcel(LLUUID user, Land parcel)
public virtual bool CanAbandonParcel(LLUUID user, ILandObject parcel)
{
return GenericParcelPermission(user, parcel);
}

View File

@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Scenes
{
((SceneObjectGroup) ent).GetProperties(remoteClient);
((SceneObjectGroup) ent).IsSelected = true;
LandManager.setPrimsTainted();
LandChannel.setPrimsTainted();
}
break;
}
@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes
if (m_permissionManager.CanEditObjectPosition(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID) || m_permissionManager.CanEditObject(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID))
{
((SceneObjectGroup) ent).IsSelected = false;
LandManager.setPrimsTainted();
LandChannel.setPrimsTainted();
break;
}
}

View File

@ -40,7 +40,6 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Modules;
using OpenSim.Region.Environment.Scenes.Scripting;
using OpenSim.Region.Physics.Manager;
@ -154,13 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_authenticateHandler; }
}
protected readonly LandManager m_LandManager;
// LandManager object instance that manages land related things. Parcel, primcounts etc..
public LandManager LandManager
{
get { return m_LandManager; }
}
protected readonly EstateManager m_estateManager;
// an instance to the physics plugin's Scene object.
public PhysicsScene PhysicsScene
@ -256,8 +248,6 @@ namespace OpenSim.Region.Environment.Scenes
m_eventManager = new EventManager();
m_LandManager = new LandManager(this, m_regInfo);
//Bind Storage Manager functions to some land manager functions for this scene
EventManager.OnLandObjectAdded +=
new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
@ -335,8 +325,6 @@ namespace OpenSim.Region.Environment.Scenes
protected virtual void RegisterDefaultSceneEvents()
{
m_eventManager.OnParcelPrimCountAdd += m_LandManager.addPrimToLandPrimCounts;
m_eventManager.OnParcelPrimCountUpdate += addPrimsToParcelCounts;
m_eventManager.OnPermissionError += SendPermissionAlert;
}
@ -837,10 +825,12 @@ namespace OpenSim.Region.Environment.Scenes
private void UpdateLand()
{
if (m_LandManager.landPrimCountTainted)
if (LandChannel != null)
{
//Perform land update of prim count
performParcelPrimCountUpdate();
if (LandChannel.isLandPrimCountTainted())
{
LandChannel.performParcelPrimCountUpdate();
}
}
}
@ -974,12 +964,12 @@ namespace OpenSim.Region.Environment.Scenes
if (dGridSettings["allow_forceful_banlines"] != "TRUE")
{
m_log.Info("[GRID]: Grid is disabling forceful parcel banlists");
m_LandManager.allowedForcefulBans = false;
LandChannel.allowedForcefulBans = false;
}
else
{
m_log.Info("[GRID]: Grid is allowing forceful parcel banlists");
m_LandManager.allowedForcefulBans = true;
LandChannel.allowedForcefulBans = true;
}
}
}
@ -1016,11 +1006,11 @@ namespace OpenSim.Region.Environment.Scenes
if (landData.Count == 0)
{
m_LandManager.NoLandDataFromStorage();
LandChannel.NoLandDataFromStorage();
}
else
{
m_LandManager.IncomingLandObjectsFromStorage(landData);
LandChannel.IncomingLandObjectsFromStorage(landData);
}
}
@ -1196,9 +1186,9 @@ namespace OpenSim.Region.Environment.Scenes
{
if (Entities.ContainsKey(sceneObject.UUID))
{
m_LandManager.removePrimFromLandPrimCounts(sceneObject);
LandChannel.removePrimFromLandPrimCounts(sceneObject);
Entities.Remove(sceneObject.UUID);
m_LandManager.setPrimsTainted();
LandChannel.setPrimsTainted();
m_innerScene.RemoveAPrimCount();
}
}
@ -1209,7 +1199,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="prim"></param>
public void AcknowledgeNewPrim(SceneObjectGroup prim)
{
prim.OnPrimCountTainted += m_LandManager.setPrimsTainted;
prim.OnPrimCountTainted += LandChannel.setPrimsTainted;
}
public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset)
@ -1350,7 +1340,7 @@ namespace OpenSim.Region.Environment.Scenes
CreateAndAddScenePresence(client, child);
m_LandManager.sendParcelOverlay(client);
LandChannel.sendParcelOverlay(client);
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
}
}
@ -1387,17 +1377,17 @@ namespace OpenSim.Region.Environment.Scenes
client.OnObjectDuplicate += m_innerScene.DuplicateObject;
client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags;
client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily;
client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest);
client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest);
client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest);
client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(LandChannel.handleParcelPropertiesRequest);
client.OnParcelDivideRequest += new ParcelDivideRequest(LandChannel.handleParcelDivideRequest);
client.OnParcelJoinRequest += new ParcelJoinRequest(LandChannel.handleParcelJoinRequest);
client.OnParcelPropertiesUpdateRequest +=
new ParcelPropertiesUpdateRequest(m_LandManager.handleParcelPropertiesUpdateRequest);
client.OnParcelSelectObjects += new ParcelSelectObjects(m_LandManager.handleParcelSelectObjectsRequest);
new ParcelPropertiesUpdateRequest(LandChannel.handleParcelPropertiesUpdateRequest);
client.OnParcelSelectObjects += new ParcelSelectObjects(LandChannel.handleParcelSelectObjectsRequest);
client.OnParcelObjectOwnerRequest +=
new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest);
client.OnParcelAccessListRequest += new ParcelAccessListRequest(m_LandManager.handleParcelAccessRequest);
new ParcelObjectOwnerRequest(LandChannel.handleParcelObjectOwnersRequest);
client.OnParcelAccessListRequest += new ParcelAccessListRequest(LandChannel.handleParcelAccessRequest);
client.OnParcelAccessListUpdateRequest +=
new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest);
new ParcelAccessListUpdateRequest(LandChannel.handleParcelAccessUpdateRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest;
@ -1445,7 +1435,7 @@ namespace OpenSim.Region.Environment.Scenes
if (avatar.IsChildAgent)
{
avatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
avatar.OnSignificantClientMovement += LandChannel.handleSignificantClientMovement;
}
return avatar;
@ -2021,31 +2011,7 @@ namespace OpenSim.Region.Environment.Scenes
}
return LLUUID.Zero;
}
/// <summary>
///
/// </summary>
public void performParcelPrimCountUpdate()
{
m_LandManager.resetAllLandPrimCounts();
m_eventManager.TriggerParcelPrimCountUpdate();
m_LandManager.finalizeLandPrimCountUpdate();
m_LandManager.landPrimCountTainted = false;
}
/// <summary>
///
/// </summary>
public void addPrimsToParcelCounts()
{
foreach (EntityBase obj in Entities.Values)
{
if (obj is SceneObjectGroup)
{
m_eventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
}
}
}
/// <summary>
/// This method is a way for the Friends Module to create an instant
@ -2455,7 +2421,7 @@ namespace OpenSim.Region.Environment.Scenes
public LLUUID GetLandOwner(float x, float y)
{
Land land = LandManager.getLandObject(x, y);
ILandObject land = LandChannel.getLandObject(x, y);
if (land == null)
{
return LLUUID.Zero;
@ -2468,12 +2434,12 @@ namespace OpenSim.Region.Environment.Scenes
public LandData GetLandData(float x, float y)
{
return LandManager.getLandObject(x, y).landData;
return LandChannel.getLandObject(x, y).landData;
}
public void SetLandMusicURL(float x, float y, string url)
{
Land land = LandManager.getLandObject(x, y);
ILandObject land = LandChannel.getLandObject(x, y);
if (land == null)
{
return;
@ -2487,7 +2453,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetLandMediaURL(float x, float y, string url)
{
Land land = LandManager.getLandObject(x, y);
ILandObject land = LandChannel.getLandObject(x, y);
if (land == null)
{

View File

@ -62,6 +62,8 @@ namespace OpenSim.Region.Environment.Scenes
//public TerrainEngine Terrain;
public ITerrainChannel Heightmap;
public ILandChannel LandChannel;
protected EventManager m_eventManager;
public EventManager EventManager
@ -69,6 +71,7 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_eventManager; }
}
protected string m_datastore;
private uint m_nextLocalId = 8880000;

View File

@ -29,7 +29,6 @@ using libsecondlife;
using System;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
namespace OpenSim.Region.Environment.Scenes
{
@ -106,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes
public event SceneGroupGrabed OnSceneGroupGrab;
public delegate void LandObjectAdded(Land newParcel, LLUUID regionUUID);
public delegate void LandObjectAdded(ILandObject newParcel);
public event LandObjectAdded OnLandObjectAdded;
@ -352,13 +351,13 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void TriggerLandObjectAdded(Land newParcel, LLUUID regionID)
public void TriggerLandObjectAdded(ILandObject newParcel)
{
handlerLandObjectAdded = OnLandObjectAdded;
if (handlerLandObjectAdded != null)
{
handlerLandObjectAdded(newParcel, regionID);
handlerLandObjectAdded(newParcel);
}
}
@ -371,11 +370,11 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void TriggerLandObjectUpdated(uint localParcelID, Land newParcel)
public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel)
{
//triggerLandObjectRemoved(localParcelID);
TriggerLandObjectAdded(newParcel, newParcel.m_scene.RegionInfo.RegionID);
TriggerLandObjectAdded(newParcel);
}
public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID)

View File

@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Scenes
RegisterToEvents();
SetDirectionVectors();
m_scene.LandManager.sendLandUpdate(this, true);
m_scene.LandChannel.sendLandUpdate(this, true);
}
public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,
@ -549,7 +549,7 @@ namespace OpenSim.Region.Environment.Scenes
//if (!m_gotAllObjectsInScene)
//{
m_scene.SendAllSceneObjectsToClient(this);
m_scene.LandManager.sendLandUpdate(this, true);
m_scene.LandChannel.sendLandUpdate(this, true);
//m_gotAllObjectsInScene = true;
//}

View File

@ -29,7 +29,7 @@ using System;
using System.Text;
using Axiom.Math;
using OpenSim.Framework.Console;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
using Key = libsecondlife.LLUUID;
using Rotation = libsecondlife.LLQuaternion;
@ -105,7 +105,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
public void osAddToLandPassList(Key avatar, float hours)
{
Vector myPosition = Task.AbsolutePosition;
Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y);
ILandObject myParcel = Scene.LandChannel.getLandObject(myPosition.X, myPosition.Y);
if (myParcel == null)
{
//Dont do anything!

View File

@ -4311,7 +4311,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public int llGetParcelFlags(LSL_Types.Vector3 pos)
{
m_host.AddScriptLPS(1);
return (int)World.LandManager.getLandObject((float)pos.x, (float)pos.y).landData.landFlags;
return (int)World.LandChannel.getLandObject((float)pos.x, (float)pos.y).landData.landFlags;
}
public int llGetRegionFlags()

View File

@ -35,7 +35,6 @@ using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.DataStore.MSSQL
@ -304,7 +303,7 @@ namespace OpenSim.DataStore.MSSQL
{
}
public void StoreLandObject(Land parcel, LLUUID regionUUID)
public void StoreLandObject(ILandObject parcel)
{
}

View File

@ -29,7 +29,6 @@ using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.DataStore.NullStorage
@ -72,7 +71,7 @@ namespace OpenSim.DataStore.NullStorage
{
}
public void StoreLandObject(Land land, LLUUID regionUUID)
public void StoreLandObject(ILandObject land)
{
}