Merge branch 'master' into varregion
commit
2be0347f50
|
@ -452,7 +452,7 @@ namespace OpenSim.Data.PGSQL
|
|||
public List<int> GetEstates(string search)
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
string sql = "select \"estateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)";
|
||||
string sql = "select \"EstateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)";
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using Npgsql;
|
||||
|
@ -50,8 +51,36 @@ namespace OpenSim.Data.PGSQL
|
|||
protected PGSqlFramework(string connectionString)
|
||||
{
|
||||
m_connectionString = connectionString;
|
||||
InitializeMonoSecurity();
|
||||
}
|
||||
|
||||
public void InitializeMonoSecurity()
|
||||
{
|
||||
if (!Util.IsPlatformMono)
|
||||
{
|
||||
|
||||
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
|
||||
{
|
||||
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
|
||||
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
||||
{
|
||||
Assembly MyAssembly = null;
|
||||
|
||||
if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
|
||||
{
|
||||
MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
|
||||
}
|
||||
|
||||
//Return the loaded assembly.
|
||||
return MyAssembly;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////
|
||||
//
|
||||
// All non queries are funneled through one connection
|
||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using OpenSim.Framework;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using Npgsql;
|
||||
|
@ -56,6 +57,34 @@ namespace OpenSim.Data.PGSQL
|
|||
public PGSQLManager(string connection)
|
||||
{
|
||||
connectionString = connection;
|
||||
InitializeMonoSecurity();
|
||||
}
|
||||
|
||||
public void InitializeMonoSecurity()
|
||||
{
|
||||
if (!Util.IsPlatformMono)
|
||||
{
|
||||
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
|
||||
{
|
||||
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
|
||||
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
||||
{
|
||||
Assembly MyAssembly = null;
|
||||
|
||||
if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
|
||||
{
|
||||
MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
|
||||
}
|
||||
|
||||
//Return the loaded assembly.
|
||||
return MyAssembly;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -4515,6 +4515,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
SceneObjectPart root = sop.ParentGroup.RootPart;
|
||||
|
||||
block.TouchName = Util.StringToBytes256(root.TouchName);
|
||||
|
||||
// SL 3.3.4, at least, appears to read this information as a concatenated byte[] stream of UUIDs but
|
||||
// it's not yet clear whether this is actually used. If this is done in the future then a pre-cached
|
||||
// copy is really needed since it's less efficient to be constantly recreating this byte array.
|
||||
// using (MemoryStream memStream = new MemoryStream())
|
||||
// {
|
||||
// using (BinaryWriter binWriter = new BinaryWriter(memStream))
|
||||
// {
|
||||
// for (int i = 0; i < sop.GetNumberOfSides(); i++)
|
||||
// {
|
||||
// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i];
|
||||
//
|
||||
// UUID textureID;
|
||||
//
|
||||
// if (teFace != null)
|
||||
// textureID = teFace.TextureID;
|
||||
// else
|
||||
// textureID = sop.Shape.Textures.DefaultTexture.TextureID;
|
||||
//
|
||||
// binWriter.Write(textureID.GetBytes());
|
||||
// }
|
||||
//
|
||||
// block.TextureID = memStream.ToArray();
|
||||
// }
|
||||
// }
|
||||
|
||||
block.TextureID = new byte[0]; // TextureID ???
|
||||
block.SitName = Util.StringToBytes256(root.SitName);
|
||||
block.OwnerMask = root.OwnerMask;
|
||||
|
|
|
@ -862,44 +862,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return x == m_location;
|
||||
}
|
||||
|
||||
public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting)
|
||||
{
|
||||
// CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way
|
||||
if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting)
|
||||
allowSplitting = false;
|
||||
|
||||
if (allowSplitting && packet.HasVariableBlocks)
|
||||
{
|
||||
byte[][] datas = packet.ToBytesMultiple();
|
||||
int packetCount = datas.Length;
|
||||
|
||||
if (packetCount < 1)
|
||||
m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length);
|
||||
|
||||
for (int i = 0; i < packetCount; i++)
|
||||
{
|
||||
byte[] data = datas[i];
|
||||
m_scene.ForEachClient(
|
||||
delegate(IClientAPI client)
|
||||
{
|
||||
if (client is LLClientView)
|
||||
SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] data = packet.ToBytes();
|
||||
m_scene.ForEachClient(
|
||||
delegate(IClientAPI client)
|
||||
{
|
||||
if (client is LLClientView)
|
||||
SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
// public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting)
|
||||
// {
|
||||
// // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way
|
||||
// if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting)
|
||||
// allowSplitting = false;
|
||||
//
|
||||
// if (allowSplitting && packet.HasVariableBlocks)
|
||||
// {
|
||||
// byte[][] datas = packet.ToBytesMultiple();
|
||||
// int packetCount = datas.Length;
|
||||
//
|
||||
// if (packetCount < 1)
|
||||
// m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length);
|
||||
//
|
||||
// for (int i = 0; i < packetCount; i++)
|
||||
// {
|
||||
// byte[] data = datas[i];
|
||||
// m_scene.ForEachClient(
|
||||
// delegate(IClientAPI client)
|
||||
// {
|
||||
// if (client is LLClientView)
|
||||
// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// byte[] data = packet.ToBytes();
|
||||
// m_scene.ForEachClient(
|
||||
// delegate(IClientAPI client)
|
||||
// {
|
||||
// if (client is LLClientView)
|
||||
// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Start the process of sending a packet to the client.
|
||||
|
@ -919,6 +919,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting)
|
||||
allowSplitting = false;
|
||||
|
||||
bool packetQueued = false;
|
||||
|
||||
if (allowSplitting && packet.HasVariableBlocks)
|
||||
{
|
||||
byte[][] datas = packet.ToBytesMultiple();
|
||||
|
@ -930,18 +932,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
for (int i = 0; i < packetCount; i++)
|
||||
{
|
||||
byte[] data = datas[i];
|
||||
SendPacketData(udpClient, data, packet.Type, category, method);
|
||||
|
||||
if (!SendPacketData(udpClient, data, packet.Type, category, method))
|
||||
packetQueued = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] data = packet.ToBytes();
|
||||
SendPacketData(udpClient, data, packet.Type, category, method);
|
||||
packetQueued = SendPacketData(udpClient, data, packet.Type, category, method);
|
||||
}
|
||||
|
||||
PacketPool.Instance.ReturnPacket(packet);
|
||||
|
||||
m_dataPresentEvent.Set();
|
||||
if (packetQueued)
|
||||
m_dataPresentEvent.Set();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -955,7 +960,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// The method to call if the packet is not acked by the client. If null, then a standard
|
||||
/// resend of the packet is done.
|
||||
/// </param>
|
||||
public void SendPacketData(
|
||||
/// <returns>true if the data was sent immediately, false if it was queued for sending</returns>
|
||||
public bool SendPacketData(
|
||||
LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method)
|
||||
{
|
||||
int dataLength = data.Length;
|
||||
|
@ -1020,7 +1026,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// packet so that it isn't sent before a queued update packet.
|
||||
bool requestQueue = type == PacketType.KillObject;
|
||||
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue))
|
||||
{
|
||||
SendPacketFinal(outgoingPacket);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion Queue or Send
|
||||
}
|
||||
|
|
|
@ -631,7 +631,22 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
|||
cdl.AddRow("SculptType", s.SculptType);
|
||||
cdl.AddRow("State", s.State);
|
||||
|
||||
// TODO, unpack and display texture entries
|
||||
// TODO, need to display more information about textures but in a compact format
|
||||
// to stop output becoming huge.
|
||||
for (int i = 0; i < sop.GetNumberOfSides(); i++)
|
||||
{
|
||||
Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i];
|
||||
|
||||
UUID textureID;
|
||||
|
||||
if (teFace != null)
|
||||
textureID = teFace.TextureID;
|
||||
else
|
||||
textureID = s.Textures.DefaultTexture.TextureID;
|
||||
|
||||
cdl.AddRow(string.Format("Face {0} texture ID", i), textureID);
|
||||
}
|
||||
|
||||
//cdl.AddRow("Textures", string.Format("{0} entries", s.Textures.
|
||||
}
|
||||
|
||||
|
|
|
@ -244,25 +244,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (part.ParentGroup.RootPart.LocalId != part.LocalId)
|
||||
return;
|
||||
|
||||
bool isAttachment = false;
|
||||
|
||||
// This is wrong, wrong, wrong. Selection should not be
|
||||
// handled by group, but by prim. Legacy cruft.
|
||||
// TODO: Make selection flagging per prim!
|
||||
//
|
||||
part.ParentGroup.IsSelected = false;
|
||||
|
||||
if (part.ParentGroup.IsAttachment)
|
||||
isAttachment = true;
|
||||
else
|
||||
part.ParentGroup.ScheduleGroupForFullUpdate();
|
||||
part.ParentGroup.ScheduleGroupForFullUpdate();
|
||||
|
||||
// If it's not an attachment, and we are allowed to move it,
|
||||
// then we might have done so. If we moved across a parcel
|
||||
// boundary, we will need to recount prims on the parcels.
|
||||
// For attachments, that makes no sense.
|
||||
//
|
||||
if (!isAttachment)
|
||||
if (!part.ParentGroup.IsAttachment)
|
||||
{
|
||||
if (Permissions.CanEditObject(
|
||||
part.UUID, remoteClient.AgentId)
|
||||
|
|
|
@ -2700,7 +2700,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
|
||||
// This was pulled from SceneViewer. Attachments always receive full updates.
|
||||
// I could not verify if this is a requirement but this maintains existing behavior
|
||||
// This is needed because otherwise if only the root prim changes position, then
|
||||
// it looks as if the entire object has moved (including the other prims).
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScheduleFullUpdate();
|
||||
|
|
|
@ -249,7 +249,7 @@ public enum CollisionFlags : uint
|
|||
BS_VEHICLE_COLLISIONS = 1 << 12, // return collisions for vehicle ground checking
|
||||
BS_RETURN_ROOT_COMPOUND_SHAPE = 1 << 13, // return the pos/rot of the root shape in a compound shape
|
||||
BS_NONE = 0,
|
||||
BS_ALL = 0xFFFFFFFF
|
||||
BS_ALL = 0x7FFF // collision flags are a signed short
|
||||
};
|
||||
|
||||
// Values f collisions groups and masks
|
||||
|
@ -265,14 +265,14 @@ public enum CollisionFilterGroups : uint
|
|||
BDebrisGroup = 1 << 3, // 0008
|
||||
BSensorTrigger = 1 << 4, // 0010
|
||||
BCharacterGroup = 1 << 5, // 0020
|
||||
BAllGroup = 0x000FFFFF,
|
||||
BAllGroup = 0x0007FFF, // collision flags are a signed short
|
||||
// Filter groups defined by BulletSim
|
||||
BGroundPlaneGroup = 1 << 10, // 0400
|
||||
BTerrainGroup = 1 << 11, // 0800
|
||||
BRaycastGroup = 1 << 12, // 1000
|
||||
BSolidGroup = 1 << 13, // 2000
|
||||
BGroundPlaneGroup = 1 << 8, // 0400
|
||||
BTerrainGroup = 1 << 9, // 0800
|
||||
BRaycastGroup = 1 << 10, // 1000
|
||||
BSolidGroup = 1 << 11, // 2000
|
||||
// BLinksetGroup = xx // a linkset proper is either static or dynamic
|
||||
BLinksetChildGroup = 1 << 14, // 4000
|
||||
BLinksetChildGroup = 1 << 12, // 4000
|
||||
};
|
||||
|
||||
// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0
|
||||
|
|
|
@ -120,6 +120,7 @@ public static class BSParam
|
|||
public static float NumberOfSolverIterations { get; private set; }
|
||||
public static bool UseSingleSidedMeshes { get; private set; }
|
||||
public static float GlobalContactBreakingThreshold { get; private set; }
|
||||
public static float PhysicsUnmanLoggingFrames { get; private set; }
|
||||
|
||||
// Avatar parameters
|
||||
public static float AvatarFriction { get; private set; }
|
||||
|
@ -671,6 +672,10 @@ public static class BSParam
|
|||
0f,
|
||||
(s) => { return GlobalContactBreakingThreshold; },
|
||||
(s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
|
||||
new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics",
|
||||
0f,
|
||||
(s) => { return PhysicsUnmanLoggingFrames; },
|
||||
(s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ),
|
||||
|
||||
new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
|
||||
7 ),
|
||||
|
|
|
@ -112,15 +112,14 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
|
|||
m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution);
|
||||
m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT);
|
||||
|
||||
m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
|
||||
|
||||
// Return the new terrain to the world of physical objects
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody);
|
||||
|
||||
// redo its bounding box now that it is in the world
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody);
|
||||
|
||||
m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
|
||||
m_mapInfo.terrainBody.ApplyCollisionMask(m_physicsScene);
|
||||
|
||||
// Make it so the terrain will not move or be considered for movement.
|
||||
m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION);
|
||||
|
||||
|
|
|
@ -138,13 +138,14 @@ public sealed class BSTerrainManager : IDisposable
|
|||
m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
|
||||
BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity);
|
||||
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
|
||||
// Ground plane does not move
|
||||
m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
|
||||
// Everything collides with the ground plane.
|
||||
m_groundPlane.collisionType = CollisionType.Groundplane;
|
||||
m_groundPlane.ApplyCollisionMask(m_physicsScene);
|
||||
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
|
||||
|
||||
// Ground plane does not move
|
||||
m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
|
||||
|
||||
BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize);
|
||||
lock (m_terrains)
|
||||
|
|
|
@ -235,7 +235,8 @@ public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeM
|
|||
{ CollisionType.Groundplane,
|
||||
new CollisionTypeFilterGroup(CollisionType.Groundplane,
|
||||
(uint)CollisionFilterGroups.BGroundPlaneGroup,
|
||||
(uint)CollisionFilterGroups.BAllGroup)
|
||||
// (uint)CollisionFilterGroups.BAllGroup)
|
||||
(uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup))
|
||||
},
|
||||
{ CollisionType.Terrain,
|
||||
new CollisionTypeFilterGroup(CollisionType.Terrain,
|
||||
|
|
|
@ -3325,7 +3325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
|
||||
emailModule.SendEmail(m_host.UUID, address, subject, message);
|
||||
llSleep(EMAIL_PAUSE_TIME);
|
||||
ScriptSleep(EMAIL_PAUSE_TIME * 1000);
|
||||
}
|
||||
|
||||
public void llGetNextEmail(string address, string subject)
|
||||
|
|
|
@ -17,6 +17,8 @@ need to build OpenSim before running it.
|
|||
|
||||
# Running OpenSim on Windows
|
||||
|
||||
You will need .NET Framework 3.5 installed to run OpenSimulator.
|
||||
|
||||
We recommend that you run OpenSim from a command prompt on Windows in order
|
||||
to capture any errors.
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnecto
|
|||
|
||||
; helper uri: optional: if it exists if will be used to tell the client to use
|
||||
; this for all economy related things
|
||||
;economy = http://127.0.0.1:9000/
|
||||
;economy = http://127.0.0.1:8002/
|
||||
|
||||
; web page of grid: optional: page providing further information about your grid
|
||||
;about = http://127.0.0.1/about/
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue