Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
commit
8e7b385883
|
@ -66,7 +66,7 @@ namespace OpenSim.Framework.Communications.Tests
|
|||
CachedUserInfo nonExistingUserInfo;
|
||||
|
||||
TestCommunicationsManager commsManager = new TestCommunicationsManager();
|
||||
Scene myScene = SceneSetupHelpers.SetupScene(commsManager, "");
|
||||
// Scene myScene = SceneSetupHelpers.SetupScene(commsManager, "");
|
||||
|
||||
// Check we can't retrieve info before it exists by uuid
|
||||
nonExistingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
|
||||
|
|
|
@ -93,13 +93,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
string userFirstName = "Jock";
|
||||
string userLastName = "Stirrup";
|
||||
UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
|
||||
CachedUserInfo userInfo;
|
||||
// CachedUserInfo userInfo;
|
||||
|
||||
lock (this)
|
||||
{
|
||||
userInfo
|
||||
= UserProfileTestUtils.CreateUserWithInventory(
|
||||
cm, userFirstName, userLastName, userId, InventoryReceived);
|
||||
UserProfileTestUtils.CreateUserWithInventory(
|
||||
cm, userFirstName, userLastName, userId, InventoryReceived);
|
||||
Monitor.Wait(this, 60000);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</Dependencies>
|
||||
|
||||
<Extension path = "/OpenSim/RegionModules">
|
||||
<RegionModule id="LandManagementModule" type="OpenSim.Region.CoreModules.World.Land.LandManagementModule" />
|
||||
<RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" />
|
||||
<RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" />
|
||||
<RegionModule id="CapabilitiesModule" type="OpenSim.Region.CoreModules.Agent.Capabilities.CapabilitiesModule" />
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
public uint x, y;
|
||||
}
|
||||
|
||||
public class LandManagementModule : IRegionModule
|
||||
public class LandManagementModule : INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -61,7 +61,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
private Scene m_scene;
|
||||
|
||||
// Minimum for parcels to work is 64m even if we don't actually use them.
|
||||
#pragma warning disable 0429
|
||||
private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
|
||||
#pragma warning restore 0429
|
||||
|
||||
private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
|
||||
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
|
||||
|
@ -74,9 +76,18 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// caches ExtendedLandData
|
||||
private Cache parcelInfoCache;
|
||||
|
||||
#region IRegionModule Members
|
||||
#region INonSharedRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_landIDList.Initialize();
|
||||
|
@ -86,22 +97,21 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
parcelInfoCache.Size = 30; // the number of different parcel requests in this region to cache
|
||||
parcelInfoCache.DefaultTTL = new TimeSpan(0, 5, 0);
|
||||
|
||||
m_scene.EventManager.OnParcelPrimCountAdd += AddPrimToLandPrimCounts;
|
||||
m_scene.EventManager.OnParcelPrimCountUpdate += UpdateLandPrimCounts;
|
||||
m_scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel);
|
||||
m_scene.EventManager.OnClientMovement += new EventManager.ClientMovement(handleAnyClientMovement);
|
||||
m_scene.EventManager.OnValidateLandBuy += handleLandValidationRequest;
|
||||
m_scene.EventManager.OnLandBuy += handleLandBuyRequest;
|
||||
m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
|
||||
m_scene.EventManager.OnSignificantClientMovement += handleSignificantClientMovement;
|
||||
m_scene.EventManager.OnObjectBeingRemovedFromScene += RemovePrimFromLandPrimCounts;
|
||||
|
||||
m_scene.EventManager.OnNoticeNoLandDataFromStorage += this.NoLandDataFromStorage;
|
||||
m_scene.EventManager.OnIncomingLandDataFromStorage += this.IncomingLandObjectsFromStorage;
|
||||
m_scene.EventManager.OnSetAllowForcefulBan += this.SetAllowedForcefulBans;
|
||||
m_scene.EventManager.OnRequestParcelPrimCountUpdate += this.PerformParcelPrimCountUpdate;
|
||||
m_scene.EventManager.OnParcelPrimCountTainted += this.SetPrimsTainted;
|
||||
m_scene.EventManager.OnRegisterCaps += this.OnRegisterCaps;
|
||||
m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
|
||||
m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
|
||||
m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
|
||||
m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
|
||||
m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
|
||||
m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
|
||||
m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
|
||||
m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
|
||||
m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
|
||||
m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
|
||||
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
|
||||
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
|
||||
m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
|
||||
m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted;
|
||||
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
|
||||
|
||||
lock (m_scene)
|
||||
{
|
||||
|
@ -109,24 +119,31 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
void EventManager_OnNewClient(IClientAPI client)
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
void EventManagerOnNewClient(IClientAPI client)
|
||||
{
|
||||
//Register some client events
|
||||
client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(handleParcelPropertiesRequest);
|
||||
client.OnParcelDivideRequest += new ParcelDivideRequest(handleParcelDivideRequest);
|
||||
client.OnParcelJoinRequest += new ParcelJoinRequest(handleParcelJoinRequest);
|
||||
client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(handleParcelPropertiesUpdateRequest);
|
||||
client.OnParcelSelectObjects += new ParcelSelectObjects(handleParcelSelectObjectsRequest);
|
||||
client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(handleParcelObjectOwnersRequest);
|
||||
client.OnParcelAccessListRequest += new ParcelAccessListRequest(handleParcelAccessRequest);
|
||||
client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(handleParcelAccessUpdateRequest);
|
||||
client.OnParcelAbandonRequest += new ParcelAbandonRequest(handleParcelAbandonRequest);
|
||||
client.OnParcelGodForceOwner += new ParcelGodForceOwner(handleParcelGodForceOwner);
|
||||
client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim);
|
||||
client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo);
|
||||
client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell);
|
||||
|
||||
client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup);
|
||||
client.OnParcelPropertiesRequest += ClientOnParcelPropertiesRequest;
|
||||
client.OnParcelDivideRequest += ClientOnParcelDivideRequest;
|
||||
client.OnParcelJoinRequest += ClientOnParcelJoinRequest;
|
||||
client.OnParcelPropertiesUpdateRequest += ClientOnParcelPropertiesUpdateRequest;
|
||||
client.OnParcelSelectObjects += ClientOnParcelSelectObjects;
|
||||
client.OnParcelObjectOwnerRequest += ClientOnParcelObjectOwnerRequest;
|
||||
client.OnParcelAccessListRequest += ClientOnParcelAccessListRequest;
|
||||
client.OnParcelAccessListUpdateRequest += ClientOnParcelAccessUpdateListRequest;
|
||||
client.OnParcelAbandonRequest += ClientOnParcelAbandonRequest;
|
||||
client.OnParcelGodForceOwner += ClientOnParcelGodForceOwner;
|
||||
client.OnParcelReclaim += ClientOnParcelReclaim;
|
||||
client.OnParcelInfoRequest += ClientOnParcelInfoRequest;
|
||||
client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
|
||||
client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup;
|
||||
|
||||
if (m_scene.Entities.ContainsKey(client.AgentId))
|
||||
{
|
||||
|
@ -158,7 +175,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
#region Parcel Add/Remove/Get/Create
|
||||
|
||||
public void SetAllowedForcefulBans(bool forceful)
|
||||
public void EventManagerOnSetAllowedForcefulBan(bool forceful)
|
||||
{
|
||||
AllowedForcefulBans = forceful;
|
||||
}
|
||||
|
@ -256,7 +273,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||
public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||
{
|
||||
if (m_scene.RegionInfo.RegionID == regionID)
|
||||
{
|
||||
|
@ -353,7 +370,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
SendLandUpdate(avatar, false);
|
||||
}
|
||||
|
||||
public void handleSignificantClientMovement(IClientAPI remote_client)
|
||||
public void EventManagerOnSignificantClientMovement(IClientAPI remote_client)
|
||||
{
|
||||
ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId);
|
||||
|
||||
|
@ -367,8 +384,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
|
||||
{
|
||||
handleAvatarChangingParcel(clientAvatar, parcel.landData.LocalID, m_scene.RegionInfo.RegionID);
|
||||
//They are going below the safety line!
|
||||
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.landData.LocalID,
|
||||
m_scene.RegionInfo.RegionID);
|
||||
//They are going under the safety line!
|
||||
if (!parcel.isBannedFromLand(clientAvatar.UUID))
|
||||
{
|
||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
|
||||
|
@ -383,8 +401,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleAnyClientMovement(ScenePresence avatar)
|
||||
//Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
|
||||
public void EventManagerOnClientMovement(ScenePresence avatar)
|
||||
//Like handleEventManagerOnSignificantClientMovement, but called with an AgentUpdate regardless of distance.
|
||||
{
|
||||
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||
if (over != null)
|
||||
|
@ -398,8 +416,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
|
||||
|
||||
public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
|
||||
int landLocalID, IClientAPI remote_client)
|
||||
public void ClientOnParcelAccessListRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
|
||||
int landLocalID, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -413,9 +431,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
|
||||
List<ParcelManager.ParcelAccessEntry> entries,
|
||||
IClientAPI remote_client)
|
||||
public void ClientOnParcelAccessUpdateListRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
|
||||
List<ParcelManager.ParcelAccessEntry> entries,
|
||||
IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -615,7 +633,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void SetPrimsTainted()
|
||||
public void EventManagerOnParcelPrimCountTainted()
|
||||
{
|
||||
m_landPrimCountTainted = true;
|
||||
}
|
||||
|
@ -625,7 +643,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
return m_landPrimCountTainted;
|
||||
}
|
||||
|
||||
public void AddPrimToLandPrimCounts(SceneObjectGroup obj)
|
||||
public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj)
|
||||
{
|
||||
Vector3 position = obj.AbsolutePosition;
|
||||
ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
|
||||
|
@ -635,7 +653,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void RemovePrimFromLandPrimCounts(SceneObjectGroup obj)
|
||||
public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
|
||||
{
|
||||
|
||||
lock (m_landList)
|
||||
|
@ -687,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateLandPrimCounts()
|
||||
public void EventManagerOnParcelPrimCountUpdate()
|
||||
{
|
||||
ResetAllLandPrimCounts();
|
||||
foreach (EntityBase obj in m_scene.Entities)
|
||||
|
@ -704,7 +722,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
m_landPrimCountTainted = false;
|
||||
}
|
||||
|
||||
public void PerformParcelPrimCountUpdate()
|
||||
public void EventManagerOnRequestParcelPrimCountUpdate()
|
||||
{
|
||||
ResetAllLandPrimCounts();
|
||||
m_scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
|
@ -773,7 +791,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
m_landList[startLandObjectIndex].forceUpdateLandInfo();
|
||||
}
|
||||
|
||||
SetPrimsTainted();
|
||||
EventManagerOnParcelPrimCountTainted();
|
||||
|
||||
//Now add the new land object
|
||||
ILandObject result = AddLandObject(newLand);
|
||||
|
@ -841,7 +859,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
performFinalLandJoin(masterLandObject, slaveLandObject);
|
||||
}
|
||||
}
|
||||
SetPrimsTainted();
|
||||
EventManagerOnParcelPrimCountTainted();
|
||||
|
||||
masterLandObject.sendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
|
@ -942,8 +960,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id,
|
||||
bool snap_selection, IClientAPI remote_client)
|
||||
public void ClientOnParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id,
|
||||
bool snap_selection, IClientAPI remote_client)
|
||||
{
|
||||
//Get the land objects within the bounds
|
||||
List<ILandObject> temp = new List<ILandObject>();
|
||||
|
@ -982,7 +1000,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
SendParcelOverlay(remote_client);
|
||||
}
|
||||
|
||||
public void handleParcelPropertiesUpdateRequest(LandUpdateArgs args, int localID, IClientAPI remote_client)
|
||||
public void ClientOnParcelPropertiesUpdateRequest(LandUpdateArgs args, int localID, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -993,22 +1011,23 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
if (land != null) land.updateLandProperties(args, remote_client);
|
||||
}
|
||||
|
||||
public void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
|
||||
public void ClientOnParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
|
||||
{
|
||||
subdivide(west, south, east, north, remote_client.AgentId);
|
||||
}
|
||||
|
||||
public void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client)
|
||||
public void ClientOnParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client)
|
||||
{
|
||||
join(west, south, east, north, remote_client.AgentId);
|
||||
}
|
||||
|
||||
public void handleParcelSelectObjectsRequest(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client)
|
||||
public void ClientOnParcelSelectObjects(int local_id, int request_type,
|
||||
List<UUID> returnIDs, IClientAPI remote_client)
|
||||
{
|
||||
m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
|
||||
}
|
||||
|
||||
public void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client)
|
||||
public void ClientOnParcelObjectOwnerRequest(int local_id, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -1026,7 +1045,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client)
|
||||
public void ClientOnParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -1046,7 +1065,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleParcelAbandonRequest(int local_id, IClientAPI remote_client)
|
||||
public void ClientOnParcelAbandonRequest(int local_id, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -1068,7 +1087,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
public void handleParcelReclaim(int local_id, IClientAPI remote_client)
|
||||
public void ClientOnParcelReclaim(int local_id, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -1097,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// and land has been validated as well, this method transfers
|
||||
// the land ownership
|
||||
|
||||
public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e)
|
||||
public void EventManagerOnLandBuy(Object o, EventManager.LandBuyArgs e)
|
||||
{
|
||||
if (e.economyValidated && e.landValidated)
|
||||
{
|
||||
|
@ -1118,7 +1137,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
// be validated. This method validates the right to buy the
|
||||
// parcel
|
||||
|
||||
public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e)
|
||||
public void EventManagerOnValidateLandBuy(Object o, EventManager.LandBuyArgs e)
|
||||
{
|
||||
if (e.landValidated == false)
|
||||
{
|
||||
|
@ -1150,7 +1169,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
}
|
||||
|
||||
|
||||
void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
|
||||
void ClientOnParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
|
||||
{
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
|
@ -1171,7 +1190,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
#region Land Object From Storage Functions
|
||||
|
||||
public void IncomingLandObjectsFromStorage(List<LandData> data)
|
||||
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
|
||||
{
|
||||
for (int i = 0; i < data.Count; i++)
|
||||
{
|
||||
|
@ -1200,7 +1219,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
|
||||
}
|
||||
|
||||
public void NoLandDataFromStorage()
|
||||
public void EventManagerOnNoLandDataFromStorage()
|
||||
{
|
||||
ResetSimLandObjects();
|
||||
}
|
||||
|
@ -1224,7 +1243,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
#region CAPS handler
|
||||
|
||||
private void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("RemoteParcelRequest",
|
||||
|
@ -1307,7 +1326,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
#endregion
|
||||
|
||||
private void handleParcelDwell(int localID, IClientAPI remoteClient)
|
||||
private void ClientOnParcelDwellRequest(int localID, IClientAPI remoteClient)
|
||||
{
|
||||
ILandObject selectedParcel = null;
|
||||
lock (m_landList)
|
||||
|
@ -1319,7 +1338,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
remoteClient.SendParcelDwellReply(localID, selectedParcel.landData.GlobalID, selectedParcel.landData.Dwell);
|
||||
}
|
||||
|
||||
private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID)
|
||||
private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID)
|
||||
{
|
||||
if (parcelID == UUID.Zero)
|
||||
return;
|
||||
|
|
|
@ -44,7 +44,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
#region Member Variables
|
||||
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#pragma warning disable 0429
|
||||
private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
|
||||
#pragma warning restore 0429
|
||||
private bool[,] m_landBitmap = new bool[landArrayMax,landArrayMax];
|
||||
|
||||
protected LandData m_landData = new LandData();
|
||||
|
|
|
@ -495,6 +495,29 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
}
|
||||
|
||||
public void UnCombineRegion(RegionData rdata)
|
||||
{
|
||||
lock (m_regions)
|
||||
{
|
||||
if (m_regions.ContainsKey(rdata.RegionId))
|
||||
{
|
||||
// uncombine root region and virtual regions
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (RegionConnections r in m_regions.Values)
|
||||
{
|
||||
foreach (RegionData rd in r.ConnectedRegions)
|
||||
{
|
||||
if (rd.RegionId == rdata.RegionId)
|
||||
{
|
||||
// uncombine virtual region
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create a set of infinite borders around the whole aabb of the combined island.
|
||||
private void AdjustLargeRegionBounds()
|
||||
{
|
||||
|
@ -635,8 +658,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
public class LargeLandChannel : ILandChannel
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private RegionData RegData;
|
||||
private ILandChannel RootRegionLandChannel;
|
||||
private readonly List<RegionData> RegionConnections;
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
case Cardinals.SE: // x+1, y-1
|
||||
break;
|
||||
case Cardinals.S: // x+0, y-1
|
||||
if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y-1 < BorderLine.Z)
|
||||
if (position.X >= BorderLine.X && position.X <= BorderLine.Y && position.Y < BorderLine.Z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
case Cardinals.SW: // x-1, y-1
|
||||
break;
|
||||
case Cardinals.W: // x-1, y+0
|
||||
if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X-1 < BorderLine.Z)
|
||||
if (position.Y >= BorderLine.X && position.Y <= BorderLine.Y && position.X < BorderLine.Z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -337,22 +337,22 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
BordersLocked = true;
|
||||
|
||||
Border northBorder = new Border();
|
||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<---
|
||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
||||
northBorder.CrossDirection = Cardinals.N;
|
||||
NorthBorders.Add(northBorder);
|
||||
|
||||
Border southBorder = new Border();
|
||||
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //--->
|
||||
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
|
||||
southBorder.CrossDirection = Cardinals.S;
|
||||
SouthBorders.Add(southBorder);
|
||||
|
||||
Border eastBorder = new Border();
|
||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<---
|
||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
||||
eastBorder.CrossDirection = Cardinals.E;
|
||||
EastBorders.Add(eastBorder);
|
||||
|
||||
Border westBorder = new Border();
|
||||
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //--->
|
||||
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
|
||||
westBorder.CrossDirection = Cardinals.W;
|
||||
WestBorders.Add(westBorder);
|
||||
|
||||
|
@ -489,22 +489,22 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
BordersLocked = true;
|
||||
Border northBorder = new Border();
|
||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<---
|
||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
||||
northBorder.CrossDirection = Cardinals.N;
|
||||
NorthBorders.Add(northBorder);
|
||||
|
||||
Border southBorder = new Border();
|
||||
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //--->
|
||||
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,0); //--->
|
||||
southBorder.CrossDirection = Cardinals.S;
|
||||
SouthBorders.Add(southBorder);
|
||||
|
||||
Border eastBorder = new Border();
|
||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize + 1); //<---
|
||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize ); //<---
|
||||
eastBorder.CrossDirection = Cardinals.E;
|
||||
EastBorders.Add(eastBorder);
|
||||
|
||||
Border westBorder = new Border();
|
||||
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, -1); //--->
|
||||
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,0); //--->
|
||||
westBorder.CrossDirection = Cardinals.W;
|
||||
WestBorders.Add(westBorder);
|
||||
BordersLocked = false;
|
||||
|
@ -1709,6 +1709,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
int thisx = (int)RegionInfo.RegionLocX;
|
||||
int thisy = (int)RegionInfo.RegionLocY;
|
||||
Vector3 EastCross = new Vector3(0.1f,0,0);
|
||||
Vector3 WestCross = new Vector3(-0.1f, 0, 0);
|
||||
Vector3 NorthCross = new Vector3(0, 0.1f, 0);
|
||||
Vector3 SouthCross = new Vector3(0, -0.1f, 0);
|
||||
|
||||
|
||||
// use this if no borders were crossed!
|
||||
|
@ -1718,9 +1722,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
Vector3 pos = attemptedPosition;
|
||||
|
||||
if (TestBorderCross(attemptedPosition, Cardinals.W))
|
||||
if (TestBorderCross(attemptedPosition + WestCross, Cardinals.W))
|
||||
{
|
||||
if (TestBorderCross(attemptedPosition, Cardinals.S))
|
||||
if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
|
||||
{
|
||||
//Border crossedBorderx = GetCrossedBorder(attemptedPosition,Cardinals.W);
|
||||
//Border crossedBordery = GetCrossedBorder(attemptedPosition, Cardinals.S);
|
||||
|
@ -1733,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// x - 1
|
||||
// y - 1
|
||||
}
|
||||
else if (TestBorderCross(attemptedPosition, Cardinals.N))
|
||||
else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
|
||||
{
|
||||
pos.X = ((pos.X + Constants.RegionSize));
|
||||
pos.Y = ((pos.Y - Constants.RegionSize));
|
||||
|
@ -1752,9 +1756,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// x - 1
|
||||
}
|
||||
}
|
||||
else if (TestBorderCross(attemptedPosition, Cardinals.E))
|
||||
else if (TestBorderCross(attemptedPosition + EastCross, Cardinals.E))
|
||||
{
|
||||
if (TestBorderCross(attemptedPosition, Cardinals.S))
|
||||
if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
|
||||
{
|
||||
pos.X = ((pos.X - Constants.RegionSize));
|
||||
pos.Y = ((pos.Y + Constants.RegionSize));
|
||||
|
@ -1764,7 +1768,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// x + 1
|
||||
// y - 1
|
||||
}
|
||||
else if (TestBorderCross(attemptedPosition, Cardinals.N))
|
||||
else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
|
||||
{
|
||||
pos.X = ((pos.X - Constants.RegionSize));
|
||||
pos.Y = ((pos.Y - Constants.RegionSize));
|
||||
|
@ -1783,14 +1787,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// x + 1
|
||||
}
|
||||
}
|
||||
else if (TestBorderCross(attemptedPosition, Cardinals.S))
|
||||
else if (TestBorderCross(attemptedPosition + SouthCross, Cardinals.S))
|
||||
{
|
||||
pos.Y = ((pos.Y + Constants.RegionSize));
|
||||
newRegionHandle
|
||||
= Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy - 1) * Constants.RegionSize));
|
||||
// y - 1
|
||||
}
|
||||
else if (TestBorderCross(attemptedPosition, Cardinals.N))
|
||||
else if (TestBorderCross(attemptedPosition + NorthCross, Cardinals.N))
|
||||
{
|
||||
|
||||
pos.Y = ((pos.Y - Constants.RegionSize));
|
||||
|
|
|
@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
uint neighbourx = m_regionInfo.RegionLocX;
|
||||
uint neighboury = m_regionInfo.RegionLocY;
|
||||
const float boundaryDistance = 1.7f;
|
||||
Vector3 northCross = new Vector3(0, boundaryDistance, 0);
|
||||
Vector3 northCross = new Vector3(0,boundaryDistance, 0);
|
||||
Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
|
||||
Vector3 eastCross = new Vector3(boundaryDistance, 0, 0);
|
||||
Vector3 westCross = new Vector3(-1 * boundaryDistance, 0, 0);
|
||||
|
|
|
@ -264,8 +264,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
Vector3 val = value;
|
||||
|
||||
if ((m_scene.TestBorderCross(val,Cardinals.E) || m_scene.TestBorderCross(val,Cardinals.W)
|
||||
|| m_scene.TestBorderCross(val, Cardinals.N) || m_scene.TestBorderCross(val, Cardinals.S))
|
||||
if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|
||||
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
|
||||
&& !IsAttachment)
|
||||
{
|
||||
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
private static string m_freeSwitchRealm;
|
||||
private static string m_freeSwitchSIPProxy;
|
||||
private static bool m_freeSwitchAttemptUseSTUN;
|
||||
private static string m_freeSwitchSTUNServer;
|
||||
// private static string m_freeSwitchSTUNServer;
|
||||
private static string m_freeSwitchEchoServer;
|
||||
private static int m_freeSwitchEchoPort;
|
||||
private static string m_freeSwitchDefaultWellKnownIP;
|
||||
|
@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
m_freeSwitchRealm = m_config.GetString("freeswitch_realm", String.Empty);
|
||||
m_freeSwitchSIPProxy = m_config.GetString("freeswitch_sip_proxy", m_freeSwitchRealm);
|
||||
m_freeSwitchAttemptUseSTUN = m_config.GetBoolean("freeswitch_attempt_stun", true);
|
||||
m_freeSwitchSTUNServer = m_config.GetString("freeswitch_stun_server", m_freeSwitchRealm);
|
||||
// m_freeSwitchSTUNServer = m_config.GetString("freeswitch_stun_server", m_freeSwitchRealm);
|
||||
m_freeSwitchEchoServer = m_config.GetString("freeswitch_echo_server", m_freeSwitchRealm);
|
||||
m_freeSwitchEchoPort = m_config.GetInt("freeswitch_echo_port", 50505);
|
||||
m_freeSwitchDefaultWellKnownIP = m_config.GetString("freeswitch_well_known_ip", m_freeSwitchRealm);
|
||||
|
|
|
@ -172,6 +172,11 @@ namespace OpenSim.Region.Physics.Manager
|
|||
return;
|
||||
}
|
||||
|
||||
public virtual void UnCombine(PhysicsScene pScene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queue a raycast against the physics scene.
|
||||
/// The provided callback method will be called when the raycast is complete
|
||||
|
|
|
@ -3436,7 +3436,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
|
||||
d.GeomSetRotation(GroundGeom, ref R);
|
||||
d.GeomSetPosition(GroundGeom, pOffset.X + ((int)Constants.RegionSize * 0.5f), pOffset.Y + ((int)Constants.RegionSize * 0.5f), 0);
|
||||
d.GeomSetPosition(GroundGeom, (pOffset.X + ((int)Constants.RegionSize * 0.5f)) - 1, (pOffset.Y + ((int)Constants.RegionSize * 0.5f)) - 1, 0);
|
||||
IntPtr testGround = IntPtr.Zero;
|
||||
if (RegionTerrain.TryGetValue(pOffset, out testGround))
|
||||
{
|
||||
|
@ -3457,6 +3457,77 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
return waterlevel;
|
||||
}
|
||||
|
||||
public override bool SupportsCombining()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void UnCombine(PhysicsScene pScene)
|
||||
{
|
||||
IntPtr localGround = IntPtr.Zero;
|
||||
float[] localHeightfield;
|
||||
bool proceed = false;
|
||||
List<IntPtr> geomDestroyList = new List<IntPtr>();
|
||||
|
||||
lock (OdeLock)
|
||||
{
|
||||
if (RegionTerrain.TryGetValue(Vector3.Zero, out localGround))
|
||||
{
|
||||
foreach (IntPtr geom in TerrainHeightFieldHeights.Keys)
|
||||
{
|
||||
if (geom == localGround)
|
||||
{
|
||||
localHeightfield = TerrainHeightFieldHeights[geom];
|
||||
proceed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
geomDestroyList.Add(geom);
|
||||
}
|
||||
}
|
||||
|
||||
if (proceed)
|
||||
{
|
||||
m_worldOffset = Vector3.Zero;
|
||||
WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize);
|
||||
m_parentScene = null;
|
||||
|
||||
foreach (IntPtr g in geomDestroyList)
|
||||
{
|
||||
// removingHeightField needs to be done or the garbage collector will
|
||||
// collect the terrain data before we tell ODE to destroy it causing
|
||||
// memory corruption
|
||||
if (TerrainHeightFieldHeights.ContainsKey(g))
|
||||
{
|
||||
float[] removingHeightField = TerrainHeightFieldHeights[g];
|
||||
TerrainHeightFieldHeights.Remove(g);
|
||||
|
||||
if (RegionTerrain.ContainsKey(g))
|
||||
{
|
||||
RegionTerrain.Remove(g);
|
||||
}
|
||||
|
||||
d.GeomDestroy(g);
|
||||
removingHeightField = new float[0];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void SetWaterLevel(float baseheight)
|
||||
|
|
|
@ -43,11 +43,11 @@ namespace OpenSim.Tests.Common.Mock
|
|||
}
|
||||
private IUserDataPlugin m_userDataPlugin;
|
||||
|
||||
public IInventoryDataPlugin InventoryDataPlugin
|
||||
{
|
||||
get { return m_inventoryDataPlugin; }
|
||||
}
|
||||
private IInventoryDataPlugin m_inventoryDataPlugin;
|
||||
// public IInventoryDataPlugin InventoryDataPlugin
|
||||
// {
|
||||
// get { return m_inventoryDataPlugin; }
|
||||
// }
|
||||
// private IInventoryDataPlugin m_inventoryDataPlugin;
|
||||
|
||||
public TestCommunicationsManager()
|
||||
: this(null)
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace OpenSim.Tests.Common.Setup
|
|||
godsModule.Initialise(testScene, new IniConfigSource());
|
||||
testScene.AddModule(godsModule.Name, godsModule);
|
||||
realServices = realServices.ToLower();
|
||||
IConfigSource config = new IniConfigSource();
|
||||
// IConfigSource config = new IniConfigSource();
|
||||
|
||||
// If we have a brand new scene, need to initialize shared region modules
|
||||
if ((m_assetService == null && m_inventoryService == null) || newScene)
|
||||
|
|
|
@ -1375,6 +1375,8 @@
|
|||
|
||||
[J2KDecoder]
|
||||
;CacheDir = "./j2kDecodeCache"
|
||||
; Time in minutes before cached decodes expire. Set to 0 for no expiration. Default is 720 minutes.
|
||||
|
||||
;CacheTimeout = 720
|
||||
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue