mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' of opensimulator.org:/var/git/opensim
This commit is contained in:
@@ -58,7 +58,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat,
|
||||
bool isModerator, bool textMute);
|
||||
void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID);
|
||||
void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID);
|
||||
void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data);
|
||||
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono);
|
||||
OSD BuildEvent(string eventName, OSD eventBody);
|
||||
|
||||
@@ -250,6 +250,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
///
|
||||
public int m_linksetPhysCapacity = 0;
|
||||
|
||||
/// <summary>
|
||||
/// When placed outside the region's border, do we transfer the objects or
|
||||
/// do we keep simulating them here?
|
||||
/// </summary>
|
||||
public bool DisableObjectTransfer { get; set; }
|
||||
|
||||
public bool m_useFlySlow;
|
||||
public bool m_useTrashOnDelete = true;
|
||||
|
||||
@@ -1155,6 +1161,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (entityTransferConfig != null)
|
||||
{
|
||||
AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing);
|
||||
DisableObjectTransfer = entityTransferConfig.GetBoolean("DisableObjectTransfer", false);
|
||||
}
|
||||
|
||||
#region Interest Management
|
||||
@@ -4309,14 +4316,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (banned || restricted)
|
||||
{
|
||||
ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
|
||||
Vector2? newPosition = null;
|
||||
if (nearestParcel != null)
|
||||
{
|
||||
//Move agent to nearest allowed
|
||||
Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
||||
posX = newPosition.X;
|
||||
posY = newPosition.Y;
|
||||
// Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
||||
newPosition = nearestParcel.GetNearestPoint(new Vector3(posX, posY,0));
|
||||
}
|
||||
else
|
||||
if(newPosition == null)
|
||||
{
|
||||
if (banned)
|
||||
{
|
||||
@@ -4329,6 +4336,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
posX = newPosition.Value.X;
|
||||
posY = newPosition.Value.Y;
|
||||
}
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
|
||||
@@ -242,6 +242,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
coarseLocations = new List<Vector3>();
|
||||
avatarUUIDs = new List<UUID>();
|
||||
|
||||
// coarse locations are sent as BYTE, so limited to the 255m max of normal regions
|
||||
// try to work around that scale down X and Y acording to region size, so reducing the resolution
|
||||
//
|
||||
// viewers need to scale up
|
||||
float scaleX = m_parentScene.RegionInfo.RegionSizeX / Constants.RegionSize;
|
||||
if (scaleX == 0)
|
||||
scaleX = 1.0f;
|
||||
scaleX = 1.0f / scaleX;
|
||||
float scaleY = m_parentScene.RegionInfo.RegionSizeY / Constants.RegionSize;
|
||||
if (scaleY == 0)
|
||||
scaleY = 1.0f;
|
||||
scaleY = 1.0f / scaleY;
|
||||
|
||||
List<ScenePresence> presences = GetScenePresences();
|
||||
for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
|
||||
{
|
||||
@@ -250,9 +263,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// If this presence is a child agent, we don't want its coarse locations
|
||||
if (sp.IsChildAgent)
|
||||
continue;
|
||||
Vector3 pos = sp.AbsolutePosition;
|
||||
pos.X *= scaleX;
|
||||
pos.Y *= scaleY;
|
||||
|
||||
coarseLocations.Add(sp.AbsolutePosition);
|
||||
|
||||
coarseLocations.Add(pos);
|
||||
avatarUUIDs.Add(sp.UUID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,6 +556,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
&& !Scene.PositionIsInCurrentRegion(val)
|
||||
&& !IsAttachmentCheckFull()
|
||||
&& !Scene.LoadingPrims
|
||||
&& !Scene.DisableObjectTransfer
|
||||
)
|
||||
{
|
||||
if (!inTransit)
|
||||
|
||||
Reference in New Issue
Block a user