Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81fe05bb84 | ||
|
|
ed6aabb197 | ||
|
|
8542f34d7d | ||
|
|
025ac85a46 | ||
|
|
5edffc9ecd | ||
|
|
56a3d2f00d | ||
|
|
28babf307e | ||
|
|
03c6d2b0b4 | ||
|
|
b293242017 | ||
|
|
924ca8e2e9 | ||
|
|
86630a9010 | ||
|
|
68fcb132d9 | ||
|
|
6f582aeaff | ||
|
|
fa1f6031ca | ||
|
|
eea3be9b17 | ||
|
|
698dfe8977 | ||
|
|
25757a6abb | ||
|
|
5a1017241f | ||
|
|
76ee671dc6 | ||
|
|
2cdef143c4 | ||
|
|
34a645efb6 | ||
|
|
02980336a3 | ||
|
|
8899f2e2bb | ||
|
|
60d4b0999c | ||
|
|
a8edc908e0 | ||
|
|
901602411c | ||
|
|
d98a19b398 | ||
|
|
e8f363ff90 | ||
|
|
5e4cf1b84c | ||
|
|
ffe07527fc | ||
|
|
72456f90a4 | ||
|
|
0cf5ea9420 | ||
|
|
becb949a33 | ||
|
|
63a6998409 | ||
|
|
15f323295b | ||
|
|
2c823c9f72 | ||
|
|
d541f150d0 | ||
|
|
4da471a5aa | ||
|
|
75d21aa71a | ||
|
|
88e9cd0eee | ||
|
|
26ec918ec8 | ||
|
|
4bc2201453 | ||
|
|
344db4dc0b | ||
|
|
de6e3edfbb | ||
|
|
a1e92dead2 | ||
|
|
068cab94e0 | ||
|
|
7b66ef44c3 | ||
|
|
dcbe9d1ffb | ||
|
|
3a477a29d7 | ||
|
|
3f703ae1cb | ||
|
|
c38736de82 | ||
|
|
766c94213c |
@@ -19,10 +19,14 @@ Prereqs:
|
||||
|
||||
From the distribution type:
|
||||
* ./runprebuild.sh
|
||||
* nant (or xbuild)
|
||||
* nant (or !* xbuild)
|
||||
* cd bin
|
||||
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
|
||||
* run mono OpenSim.exe
|
||||
!* xbuild option switches
|
||||
!* clean: xbuild /target:clean
|
||||
!* debug: (default) xbuild /property:Configuration=Debug
|
||||
!* release: xbuild /property:Configuration=Release
|
||||
|
||||
# Using Monodevelop
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ what it is today.
|
||||
* alex_carnell
|
||||
* Alan Webb (IBM)
|
||||
* Aleric
|
||||
* Alicia Raven
|
||||
* Allen Kerensky
|
||||
* BigFootAg
|
||||
* BlueWall Slade
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace OpenSim.Groups
|
||||
string method = request["METHOD"].ToString();
|
||||
request.Remove("METHOD");
|
||||
|
||||
m_log.DebugFormat("[Groups.Handler]: {0}", method);
|
||||
// m_log.DebugFormat("[Groups.Handler]: {0}", method);
|
||||
switch (method)
|
||||
{
|
||||
case "PUTGROUP":
|
||||
@@ -665,7 +665,11 @@ namespace OpenSim.Groups
|
||||
GroupInviteInfo invite = m_GroupsService.GetAgentToGroupInvite(request["RequestingAgentID"].ToString(),
|
||||
new UUID(request["InviteID"].ToString()));
|
||||
|
||||
result["RESULT"] = GroupsDataUtils.GroupInviteInfo(invite);
|
||||
if (invite != null)
|
||||
result["RESULT"] = GroupsDataUtils.GroupInviteInfo(invite);
|
||||
else
|
||||
result["RESULT"] = "NULL";
|
||||
|
||||
return Util.UTF8NoBomEncoding.GetBytes(ServerUtils.BuildXmlResponse(result));
|
||||
}
|
||||
|
||||
|
||||
@@ -162,6 +162,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList);
|
||||
availableMethods["admin_estate_reload"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcEstateReload);
|
||||
|
||||
// Land management
|
||||
availableMethods["admin_reset_land"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcResetLand);
|
||||
|
||||
// Either enable full remote functionality or just selected features
|
||||
string enabledMethods = m_config.GetString("enabled_methods", "all");
|
||||
|
||||
@@ -2063,6 +2066,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
responseData["success"] = true;
|
||||
}
|
||||
|
||||
private void XmlRpcResetLand(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
|
||||
{
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
Hashtable responseData = (Hashtable)response.Value;
|
||||
|
||||
string musicURL = string.Empty;
|
||||
UUID groupID = UUID.Zero;
|
||||
uint flags = 0;
|
||||
bool set_group = false, set_music = false, set_flags = false;
|
||||
|
||||
if (requestData.Contains("group") && requestData["group"] != null)
|
||||
set_group = UUID.TryParse(requestData["group"].ToString(), out groupID);
|
||||
if (requestData.Contains("music") && requestData["music"] != null)
|
||||
{
|
||||
musicURL = requestData["music"].ToString();
|
||||
set_music = true;
|
||||
}
|
||||
if (requestData.Contains("flags") && requestData["flags"] != null)
|
||||
set_flags = UInt32.TryParse(requestData["flags"].ToString(), out flags);
|
||||
|
||||
m_log.InfoFormat("[RADMIN]: Received Reset Land Request group={0} musicURL={1} flags={2}",
|
||||
(set_group ? groupID.ToString() : "unchanged"),
|
||||
(set_music ? musicURL : "unchanged"),
|
||||
(set_flags ? flags.ToString() : "unchanged"));
|
||||
|
||||
m_application.SceneManager.ForEachScene(delegate(Scene s)
|
||||
{
|
||||
List<ILandObject> parcels = s.LandChannel.AllParcels();
|
||||
foreach (ILandObject p in parcels)
|
||||
{
|
||||
if (set_music)
|
||||
p.LandData.MusicURL = musicURL;
|
||||
|
||||
if (set_group)
|
||||
p.LandData.GroupID = groupID;
|
||||
|
||||
if (set_flags)
|
||||
p.LandData.Flags = flags;
|
||||
|
||||
s.LandChannel.UpdateLandObject(p.LandData.LocalID, p.LandData);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
responseData["success"] = true;
|
||||
|
||||
m_log.Info("[RADMIN]: Reset Land Request complete");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Parse a float with the given parameter name from a request data hash table.
|
||||
/// </summary>
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
namespace OpenSim.Data
|
||||
{
|
||||
public interface IEstateDataStore
|
||||
{
|
||||
@@ -145,7 +145,11 @@ namespace OpenSim.Data.MySQL
|
||||
cmd.CommandText = sql;
|
||||
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||
|
||||
return DoLoad(cmd, regionID, create);
|
||||
EstateSettings e = DoLoad(cmd, regionID, create);
|
||||
if (!create && e.EstateID == 0) // Not found
|
||||
return null;
|
||||
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,7 +431,10 @@ namespace OpenSim.Data.MySQL
|
||||
cmd.CommandText = sql;
|
||||
cmd.Parameters.AddWithValue("?EstateID", estateID);
|
||||
|
||||
return DoLoad(cmd, UUID.Zero, false);
|
||||
EstateSettings e = DoLoad(cmd, UUID.Zero, false);
|
||||
if (e.EstateID != estateID)
|
||||
return null;
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -296,6 +296,14 @@ namespace OpenSim.Framework.Communications
|
||||
|
||||
#endregion Async communications with server
|
||||
|
||||
/// <summary>
|
||||
/// Perform a synchronous request
|
||||
/// </summary>
|
||||
public Stream Request()
|
||||
{
|
||||
return Request(null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a synchronous request
|
||||
/// </summary>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
@@ -411,5 +412,23 @@ namespace OpenSim.Framework
|
||||
{
|
||||
return l_EstateGroups.Contains(groupID);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ToMap()
|
||||
{
|
||||
Dictionary<string, object> map = new Dictionary<string, object>();
|
||||
PropertyInfo[] properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
|
||||
foreach (PropertyInfo p in properties)
|
||||
map[p.Name] = p.GetValue(this, null);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
public EstateSettings(Dictionary<string, object> map)
|
||||
{
|
||||
PropertyInfo[] properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
|
||||
foreach (PropertyInfo p in properties)
|
||||
p.SetValue(this, map[p.Name], null);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +147,29 @@ namespace OpenSim.Framework
|
||||
public uint WorldLocX = 0;
|
||||
public uint WorldLocY = 0;
|
||||
public uint WorldLocZ = 0;
|
||||
|
||||
/// <summary>
|
||||
/// X dimension of the region.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If this is a varregion then the default size set here will be replaced when we load the region config.
|
||||
/// </remarks>
|
||||
public uint RegionSizeX = Constants.RegionSize;
|
||||
|
||||
/// <summary>
|
||||
/// X dimension of the region.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If this is a varregion then the default size set here will be replaced when we load the region config.
|
||||
/// </remarks>
|
||||
public uint RegionSizeY = Constants.RegionSize;
|
||||
|
||||
/// <summary>
|
||||
/// Z dimension of the region.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// XXX: Unknown if this accounts for regions with negative Z.
|
||||
/// </remarks>
|
||||
public uint RegionSizeZ = Constants.RegionHeight;
|
||||
|
||||
private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>();
|
||||
|
||||
@@ -45,6 +45,7 @@ using OpenSim.Framework.Monitoring;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using Timer=System.Timers.Timer;
|
||||
using Nini.Config;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
@@ -59,6 +60,7 @@ namespace OpenSim.Framework.Servers
|
||||
/// This will control a periodic log printout of the current 'show stats' (if they are active) for this
|
||||
/// server.
|
||||
/// </summary>
|
||||
private int m_periodDiagnosticTimerMS = 60 * 60 * 1000;
|
||||
private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000);
|
||||
|
||||
/// <summary>
|
||||
@@ -77,8 +79,6 @@ namespace OpenSim.Framework.Servers
|
||||
// Random uuid for private data
|
||||
m_osSecret = UUID.Random().ToString();
|
||||
|
||||
m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
|
||||
m_periodicDiagnosticsTimer.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -89,6 +89,16 @@ namespace OpenSim.Framework.Servers
|
||||
StatsManager.SimExtraStats = new SimExtraStatsCollector();
|
||||
RegisterCommonCommands();
|
||||
RegisterCommonComponents(Config);
|
||||
|
||||
IConfig startupConfig = Config.Configs["Startup"];
|
||||
int logShowStatsSeconds = startupConfig.GetInt("LogShowStatsSeconds", m_periodDiagnosticTimerMS / 1000);
|
||||
m_periodDiagnosticTimerMS = logShowStatsSeconds * 1000;
|
||||
m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
|
||||
if (m_periodDiagnosticTimerMS != 0)
|
||||
{
|
||||
m_periodicDiagnosticsTimer.Interval = m_periodDiagnosticTimerMS;
|
||||
m_periodicDiagnosticsTimer.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ShutdownSpecific()
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace OpenSim
|
||||
{
|
||||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.8.0";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
private const string VERSION_NUMBER = "0.8";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||
|
||||
public enum Flavour
|
||||
{
|
||||
@@ -38,6 +38,7 @@ namespace OpenSim
|
||||
Dev,
|
||||
RC1,
|
||||
RC2,
|
||||
RC3,
|
||||
Release,
|
||||
Post_Fixes,
|
||||
Extended
|
||||
|
||||
@@ -63,8 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public List<UUID> folders;
|
||||
}
|
||||
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Control whether requests will be processed asynchronously.
|
||||
@@ -438,7 +437,18 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
aPollRequest poolreq = m_queue.Dequeue();
|
||||
|
||||
if (poolreq != null && poolreq.thepoll != null)
|
||||
poolreq.thepoll.Process(poolreq);
|
||||
{
|
||||
try
|
||||
{
|
||||
poolreq.thepoll.Process(poolreq);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[INVENTORY]: Failed to process queued inventory request {0} for {1} in {2}. Exception {3}",
|
||||
poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", Scene.Name, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1467,10 +1467,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
mapReply.Data[i].Access = mapBlocks2[i].Access;
|
||||
mapReply.Data[i].Agents = mapBlocks2[i].Agents;
|
||||
|
||||
// TODO: hookup varregion sim size here
|
||||
mapReply.Size[i] = new MapBlockReplyPacket.SizeBlock();
|
||||
mapReply.Size[i].SizeX = 256;
|
||||
mapReply.Size[i].SizeY = 256;
|
||||
mapReply.Size[i].SizeX = mapBlocks2[i].SizeX;
|
||||
mapReply.Size[i].SizeY = mapBlocks2[i].SizeY;
|
||||
}
|
||||
OutPacket(mapReply, ThrottleOutPacketType.Land);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
|
||||
@@ -1152,16 +1152,24 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
}
|
||||
|
||||
parameters = (OSDMap)Params;
|
||||
|
||||
OSDArray list = (OSDArray)parameters["result"];
|
||||
|
||||
foreach(OSD asset in list)
|
||||
{
|
||||
OSDString assetId = (OSDString)asset;
|
||||
|
||||
Scene.AssetService.Get(string.Format("{0}/{1}",assetServerURI, assetId.AsString()));
|
||||
if (parameters.ContainsKey("result"))
|
||||
{
|
||||
OSDArray list = (OSDArray)parameters["result"];
|
||||
|
||||
foreach (OSD asset in list)
|
||||
{
|
||||
OSDString assetId = (OSDString)asset;
|
||||
|
||||
Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, assetId.AsString()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[PROFILES]: Problematic response for image_assets_request from {0}", profileServerURI);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
protected virtual void InitialiseCommon(IConfigSource source)
|
||||
{
|
||||
string transferVersionName = "SIMULATION";
|
||||
float maxTransferVersion = 0.2f;
|
||||
float maxTransferVersion = 0.3f;
|
||||
|
||||
IConfig hypergridConfig = source.Configs["Hypergrid"];
|
||||
if (hypergridConfig != null)
|
||||
@@ -760,8 +760,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
string reason;
|
||||
string version;
|
||||
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
|
||||
if (!Scene.SimulationService.QueryAccess(
|
||||
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason))
|
||||
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, out version, out reason))
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed(reason);
|
||||
|
||||
@@ -833,7 +834,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (versionComponents.Length >= 2)
|
||||
float.TryParse(versionComponents[1], out versionNumber);
|
||||
|
||||
if (versionNumber == 0.2f && MaxOutgoingTransferVersion >= versionNumber)
|
||||
if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
|
||||
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||
else
|
||||
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||
@@ -1509,8 +1510,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
|
||||
// Check to see if we have access to the target region.
|
||||
string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
|
||||
if (neighbourRegion != null
|
||||
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason))
|
||||
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, out version, out failureReason))
|
||||
{
|
||||
// remember banned
|
||||
m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
if (inventoryURL != null && inventoryURL != string.Empty)
|
||||
{
|
||||
inventoryURL = inventoryURL.Trim(new char[] { '/' });
|
||||
m_InventoryURLs.Add(userID, inventoryURL);
|
||||
m_InventoryURLs[userID] = inventoryURL;
|
||||
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Added {0} to the cache of inventory URLs", inventoryURL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
/// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
|
||||
/// </remarks>
|
||||
public string ServiceVersion { get; set; }
|
||||
private float m_VersionNumber = 0.3f;
|
||||
|
||||
/// <summary>
|
||||
/// Map region ID to scene.
|
||||
@@ -84,15 +85,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
|
||||
public void InitialiseService(IConfigSource configSource)
|
||||
{
|
||||
ServiceVersion = "SIMULATION/0.2";
|
||||
ServiceVersion = "SIMULATION/0.3";
|
||||
IConfig config = configSource.Configs["SimulationService"];
|
||||
if (config != null)
|
||||
{
|
||||
ServiceVersion = config.GetString("ConnectorProtocolVersion", ServiceVersion);
|
||||
|
||||
if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2")
|
||||
if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2" && ServiceVersion != "SIMULATION/0.3")
|
||||
throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion));
|
||||
|
||||
string[] versionComponents = ServiceVersion.Split(new char[] { '/' });
|
||||
if (versionComponents.Length >= 2)
|
||||
float.TryParse(versionComponents[1], out m_VersionNumber);
|
||||
|
||||
m_log.InfoFormat(
|
||||
"[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
|
||||
}
|
||||
@@ -264,7 +269,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = ServiceVersion;
|
||||
@@ -276,6 +281,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
// m_log.DebugFormat(
|
||||
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
|
||||
// s.RegionInfo.RegionName, destination.RegionHandle);
|
||||
uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
|
||||
|
||||
float theirVersionNumber = 0f;
|
||||
string[] versionComponents = theirversion.Split(new char[] { '/' });
|
||||
if (versionComponents.Length >= 2)
|
||||
float.TryParse(versionComponents[1], out theirVersionNumber);
|
||||
|
||||
// Var regions here, and the requesting simulator is in an older version.
|
||||
// We will forbide this, because it crashes the viewers
|
||||
if (theirVersionNumber < 0.3f && size > 256)
|
||||
{
|
||||
reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
|
||||
m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber);
|
||||
return false;
|
||||
}
|
||||
|
||||
return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason);
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return m_remoteConnector.UpdateAgent(destination, cAgentData);
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = "Unknown";
|
||||
@@ -216,12 +216,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason))
|
||||
if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionID))
|
||||
return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
|
||||
return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1985,15 +1985,17 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject);
|
||||
|
||||
// Can the user set home here?
|
||||
if (// (a) gods and land managers can set home
|
||||
m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
|
||||
m_scene.Permissions.IsGod(remoteClient.AgentId) ||
|
||||
// (b) land owners can set home
|
||||
remoteClient.AgentId == land.LandData.OwnerID ||
|
||||
// (c) members of the land-associated group in roles that can set home
|
||||
((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) ||
|
||||
// (d) parcels with telehubs can be the home of anyone
|
||||
(telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))
|
||||
if (// Required: local user; foreign users cannot set home
|
||||
m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) &&
|
||||
(// (a) gods and land managers can set home
|
||||
m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
|
||||
m_scene.Permissions.IsGod(remoteClient.AgentId) ||
|
||||
// (b) land owners can set home
|
||||
remoteClient.AgentId == land.LandData.OwnerID ||
|
||||
// (c) members of the land-associated group in roles that can set home
|
||||
((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) ||
|
||||
// (d) parcels with telehubs can be the home of anyone
|
||||
(telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))))
|
||||
{
|
||||
if (m_scene.GridUserService.SetHome(remoteClient.AgentId.ToString(), land.RegionUUID, position, lookAt))
|
||||
// FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
|
||||
|
||||
@@ -1121,32 +1121,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
block.SizeX = (ushort)r.RegionSizeX;
|
||||
block.SizeY = (ushort)r.RegionSizeY;
|
||||
blocks.Add(block);
|
||||
// If these are larger than legacy regions, create fake map entries for the covered
|
||||
// regions. The map system only does legacy sized regions so we have to fake map
|
||||
// entries for all the covered regions.
|
||||
if (r.RegionSizeX > Constants.RegionSize || r.RegionSizeY > Constants.RegionSize)
|
||||
{
|
||||
for (int x = 0; x < r.RegionSizeX / Constants.RegionSize; x++)
|
||||
{
|
||||
for (int y = 0; y < r.RegionSizeY / Constants.RegionSize; y++)
|
||||
{
|
||||
if (x == 0 && y == 0)
|
||||
continue;
|
||||
block = new MapBlockData
|
||||
{
|
||||
Access = r.Access,
|
||||
MapImageId = r.TerrainImage,
|
||||
Name = r.RegionName,
|
||||
X = (ushort)((r.RegionLocX / Constants.RegionSize) + x),
|
||||
Y = (ushort)((r.RegionLocY / Constants.RegionSize) + y),
|
||||
SizeX = (ushort)r.RegionSizeX,
|
||||
SizeY = (ushort)r.RegionSizeY
|
||||
};
|
||||
//Child piece, so ignore it
|
||||
blocks.Add(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return blocks;
|
||||
}
|
||||
@@ -1578,12 +1552,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
private Byte[] GenerateOverlay()
|
||||
{
|
||||
using (Bitmap overlay = new Bitmap(256, 256))
|
||||
// These need to be ints for bitmap generation
|
||||
int regionSizeX = (int)m_scene.RegionInfo.RegionSizeX;
|
||||
int regionSizeY = (int)m_scene.RegionInfo.RegionSizeY;
|
||||
|
||||
int landTileSize = LandManagementModule.LandUnit;
|
||||
int regionLandTilesX = regionSizeX / landTileSize;
|
||||
int regionLandTilesY = regionSizeY / landTileSize;
|
||||
|
||||
using (Bitmap overlay = new Bitmap(regionSizeX, regionSizeY))
|
||||
{
|
||||
bool[,] saleBitmap = new bool[64, 64];
|
||||
for (int x = 0 ; x < 64 ; x++)
|
||||
bool[,] saleBitmap = new bool[regionLandTilesX, regionLandTilesY];
|
||||
for (int x = 0; x < regionLandTilesX; x++)
|
||||
{
|
||||
for (int y = 0 ; y < 64 ; y++)
|
||||
for (int y = 0; y < regionLandTilesY; y++)
|
||||
saleBitmap[x, y] = false;
|
||||
}
|
||||
|
||||
@@ -1596,8 +1578,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
using (Graphics g = Graphics.FromImage(overlay))
|
||||
{
|
||||
using (SolidBrush transparent = new SolidBrush(background))
|
||||
g.FillRectangle(transparent, 0, 0, 256, 256);
|
||||
|
||||
g.FillRectangle(transparent, 0, 0, regionSizeX, regionSizeY);
|
||||
|
||||
foreach (ILandObject land in parcels)
|
||||
{
|
||||
@@ -1620,12 +1601,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
using (SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9)))
|
||||
{
|
||||
for (int x = 0 ; x < 64 ; x++)
|
||||
for (int x = 0 ; x < regionLandTilesX ; x++)
|
||||
{
|
||||
for (int y = 0 ; y < 64 ; y++)
|
||||
for (int y = 0 ; y < regionLandTilesY ; y++)
|
||||
{
|
||||
if (saleBitmap[x, y])
|
||||
g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4);
|
||||
g.FillRectangle(
|
||||
yellow, x * landTileSize,
|
||||
regionSizeX - landTileSize - (y * landTileSize),
|
||||
landTileSize,
|
||||
landTileSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1654,4 +1639,4 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
public uint itemtype;
|
||||
public ulong regionhandle;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3257,7 +3257,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
float distanceError = Vector3.Distance(OffsetPosition, expectedPosition);
|
||||
|
||||
float speed = Velocity.Length();
|
||||
float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity);
|
||||
float velocityDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity);
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Delta-v {0}, lastVelocity {1}, Velocity {2} for {3} in {4}",
|
||||
// velocidyDiff, lastVelocitySentToAllClients, Velocity, Name, Scene.Name);
|
||||
|
||||
// assuming 5 ms. worst case precision for timer, use 2x that
|
||||
// for distance error threshold
|
||||
@@ -3265,8 +3269,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (speed < 0.01f // allow rotation updates if avatar position is unchanged
|
||||
|| Math.Abs(distanceError) > distanceErrorThreshold
|
||||
|| velocidyDiff > 0.01f) // did velocity change from last update?
|
||||
|| velocityDiff > 0.01f) // did velocity change from last update?
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Update triggered with speed {0}, distanceError {1}, distanceThreshold {2}, delta-v {3} for {4} in {5}",
|
||||
// speed, distanceError, distanceErrorThreshold, velocidyDiff, Name, Scene.Name);
|
||||
|
||||
lastVelocitySentToAllClients = Velocity;
|
||||
lastTerseUpdateToAllClientsTick = currentTick;
|
||||
lastPositionSentToAllClients = OffsetPosition;
|
||||
|
||||
@@ -216,7 +216,12 @@ namespace OpenSim.Region.OptionalModules.Materials
|
||||
|
||||
GetLegacyStoredMaterialsInPart(part);
|
||||
|
||||
GetStoredMaterialInFace(part, te.DefaultTexture);
|
||||
if (te.DefaultTexture != null)
|
||||
GetStoredMaterialInFace(part, te.DefaultTexture);
|
||||
else
|
||||
m_log.WarnFormat(
|
||||
"[Materials]: Default texture for part {0} (part of object {1)) in {2} unexpectedly null. Ignoring.",
|
||||
part.Name, part.ParentGroup.Name, m_scene.Name);
|
||||
|
||||
foreach (Primitive.TextureEntryFace face in te.FaceTextures)
|
||||
{
|
||||
|
||||
@@ -76,6 +76,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
/// AutoBackupBusyCheck: True/False. Default: True.
|
||||
/// If True, we will only take an auto-backup if a set of conditions are met.
|
||||
/// These conditions are heuristics to try and avoid taking a backup when the sim is busy.
|
||||
/// AutoBackupSkipAssets
|
||||
/// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately
|
||||
/// AutoBackupScript: String. Default: not specified (disabled).
|
||||
/// File path to an executable script or binary to run when an automatic backup is taken.
|
||||
/// The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary.
|
||||
@@ -258,6 +260,8 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
AutoBackupModuleState abms = this.ParseConfig(scene, false);
|
||||
m_log.Debug("[AUTO BACKUP]: Config for " + scene.RegionInfo.RegionName);
|
||||
m_log.Debug((abms == null ? "DEFAULT" : abms.ToString()));
|
||||
|
||||
m_states.Add(scene, abms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -334,7 +338,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
double interval =
|
||||
this.ResolveDouble("AutoBackupInterval", this.m_defaultState.IntervalMinutes,
|
||||
config, regionConfig) * 60000.0;
|
||||
if (state == null && interval != this.m_defaultState.IntervalMinutes*60000.0)
|
||||
if (state == null && interval != this.m_defaultState.IntervalMinutes * 60000.0)
|
||||
{
|
||||
state = new AutoBackupModuleState();
|
||||
}
|
||||
@@ -412,6 +416,19 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
state.BusyCheck = tmpBusyCheck;
|
||||
}
|
||||
|
||||
// Included Option To Skip Assets
|
||||
bool tmpSkipAssets = ResolveBoolean("AutoBackupSkipAssets",
|
||||
this.m_defaultState.SkipAssets, config, regionConfig);
|
||||
if (state == null && tmpSkipAssets != this.m_defaultState.SkipAssets)
|
||||
{
|
||||
state = new AutoBackupModuleState();
|
||||
}
|
||||
|
||||
if (state != null)
|
||||
{
|
||||
state.SkipAssets = tmpSkipAssets;
|
||||
}
|
||||
|
||||
// Set file naming algorithm
|
||||
string stmpNamingType = ResolveString("AutoBackupNaming",
|
||||
this.m_defaultState.NamingType.ToString(), config, regionConfig);
|
||||
@@ -488,6 +505,9 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
}
|
||||
}
|
||||
|
||||
if(state == null)
|
||||
return m_defaultState;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -640,7 +660,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
/// <param name="scene"></param>
|
||||
private void DoRegionBackup(IScene scene)
|
||||
{
|
||||
if (scene.RegionStatus != RegionStatus.Up)
|
||||
if (!scene.Ready)
|
||||
{
|
||||
// We won't backup a region that isn't operating normally.
|
||||
m_log.Warn("[AUTO BACKUP]: Not backing up region " + scene.RegionInfo.RegionName +
|
||||
@@ -662,7 +682,16 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
m_pendingSaves.Add(guid, scene);
|
||||
state.LiveRequests.Add(guid, savePath);
|
||||
((Scene) scene).EventManager.OnOarFileSaved += new EventManager.OarFileSaved(EventManager_OnOarFileSaved);
|
||||
iram.ArchiveRegion(savePath, guid, null);
|
||||
|
||||
m_log.Info("[AUTO BACKUP]: Backing up region " + scene.RegionInfo.RegionName);
|
||||
|
||||
// Must pass options, even if dictionary is empty!
|
||||
Dictionary<string, object> options = new Dictionary<string, object>();
|
||||
|
||||
if (state.SkipAssets)
|
||||
options["noassets"] = true;
|
||||
|
||||
iram.ArchiveRegion(savePath, guid, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
this.Enabled = false;
|
||||
this.BackupDir = ".";
|
||||
this.BusyCheck = true;
|
||||
this.SkipAssets = false;
|
||||
this.Timer = null;
|
||||
this.NamingType = NamingType.Time;
|
||||
this.Script = null;
|
||||
@@ -91,6 +92,12 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||
set;
|
||||
}
|
||||
|
||||
public bool SkipAssets
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Script
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -205,6 +205,17 @@ public class BSActorAvatarMove : BSActor
|
||||
// Flying and not colliding and velocity nearly zero.
|
||||
m_controllingPrim.ZeroMotion(true /* inTaintTime */);
|
||||
}
|
||||
else
|
||||
{
|
||||
//We are falling but are not touching any keys make sure not falling too fast
|
||||
if (m_controllingPrim.RawVelocity.Z < BSParam.AvatarTerminalVelocity)
|
||||
{
|
||||
|
||||
OMV.Vector3 slowingForce = new OMV.Vector3(0f, 0f, BSParam.AvatarTerminalVelocity - m_controllingPrim.RawVelocity.Z) * m_controllingPrim.Mass;
|
||||
m_physicsScene.PE.ApplyCentralImpulse(m_controllingPrim.PhysBody, slowingForce);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
m_physicsScene.DetailLog("{0},BSCharacter.MoveMotor,taint,stopping,target={1},colliding={2}",
|
||||
@@ -227,7 +238,6 @@ public class BSActorAvatarMove : BSActor
|
||||
stepVelocity.Z = m_controllingPrim.RawVelocity.Z;
|
||||
}
|
||||
|
||||
|
||||
// Colliding and not flying with an upward force. The avatar must be trying to jump.
|
||||
if (!m_controllingPrim.Flying && m_controllingPrim.IsColliding && stepVelocity.Z > 0)
|
||||
{
|
||||
@@ -253,12 +263,34 @@ public class BSActorAvatarMove : BSActor
|
||||
}
|
||||
else
|
||||
{
|
||||
// Since we're not affected by anything, whatever vertical motion the avatar has, continue that.
|
||||
stepVelocity.Z = m_controllingPrim.RawVelocity.Z;
|
||||
|
||||
// Since we're not affected by anything, the avatar must be falling and we do not want that to be too fast.
|
||||
if (m_controllingPrim.RawVelocity.Z < BSParam.AvatarTerminalVelocity)
|
||||
{
|
||||
|
||||
stepVelocity.Z = BSParam.AvatarTerminalVelocity;
|
||||
}
|
||||
else
|
||||
{
|
||||
stepVelocity.Z = m_controllingPrim.RawVelocity.Z;
|
||||
}
|
||||
}
|
||||
// DetailLog("{0},BSCharacter.MoveMotor,taint,overrideStepZWithWorldZ,stepVel={1}", LocalID, stepVelocity);
|
||||
}
|
||||
|
||||
//Alicia: Maintain minimum height when flying.
|
||||
// SL has a flying effect that keeps the avatar flying above the ground by some margin
|
||||
if (m_controllingPrim.Flying)
|
||||
{
|
||||
float hover_height = m_physicsScene.TerrainManager.GetTerrainHeightAtXYZ(m_controllingPrim.RawPosition)
|
||||
+ BSParam.AvatarFlyingGroundMargin;
|
||||
|
||||
if( m_controllingPrim.Position.Z < hover_height)
|
||||
{
|
||||
stepVelocity.Z += BSParam.AvatarFlyingGroundUpForce;
|
||||
}
|
||||
}
|
||||
|
||||
// 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force.
|
||||
OMV.Vector3 moveForce = (stepVelocity - m_controllingPrim.RawVelocity) * m_controllingPrim.Mass;
|
||||
|
||||
|
||||
@@ -744,7 +744,18 @@ public sealed class BSCharacter : BSPhysObject
|
||||
// and will send agent updates to the clients if velocity changes by more than
|
||||
// 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many
|
||||
// extra updates.
|
||||
if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f))
|
||||
//
|
||||
// XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to
|
||||
// avatar movement rather than removes it. The larger the threshold, the bigger the jitter.
|
||||
// This is most noticeable in level flight and can be seen with
|
||||
// the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower
|
||||
// bound and an upper bound, where the difference between the two is enough to trigger a large delta v update
|
||||
// and subsequently trigger an update in ScenePresence.SendTerseUpdateToAllClients(). The cause of this cycle (feedback?)
|
||||
// has not yet been identified.
|
||||
//
|
||||
// If there is a threshold below 0.4 or no threshold check at all (as in ODE), then RawVelocity stays constant and extra
|
||||
// updates are not triggered in ScenePresence.SendTerseUpdateToAllClients().
|
||||
// if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f))
|
||||
RawVelocity = entprop.Velocity;
|
||||
|
||||
_acceleration = entprop.Acceleration;
|
||||
|
||||
@@ -305,6 +305,10 @@ public sealed class BSLinksetCompound : BSLinkset
|
||||
// Note that this works for rebuilding just the root after a linkset is taken apart.
|
||||
// Called at taint time!!
|
||||
private bool UseBulletSimRootOffsetHack = false; // Attempt to have Bullet track the coords of root compound shape
|
||||
// Number of times to perform rebuilds on broken linkset children. This should only happen when
|
||||
// a linkset is initially being created and should happen only one or two times at the most.
|
||||
// This exists to cause a looping problem to be reported while not rebuilding a linkset forever.
|
||||
private static int LinksetRebuildFailureLoopPrevention = 10;
|
||||
private void RecomputeLinksetCompound()
|
||||
{
|
||||
try
|
||||
@@ -376,9 +380,33 @@ public sealed class BSLinksetCompound : BSLinkset
|
||||
OMV.Quaternion offsetRot = OMV.Quaternion.Normalize(cPrim.RawOrientation) * invRootOrientation;
|
||||
|
||||
// Add the child shape to the compound shape being built
|
||||
m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot);
|
||||
DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}",
|
||||
LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
|
||||
if (childShape.physShapeInfo.HasPhysicalShape)
|
||||
{
|
||||
m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot);
|
||||
DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}",
|
||||
LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The linkset must be in an intermediate state where all the children have not yet
|
||||
// been constructed. This sometimes happens on startup when everything is getting
|
||||
// built and some shapes have to wait for assets to be read in.
|
||||
// Just skip this child for the moment and cause the shape to be rebuilt next tick.
|
||||
// One problem might be that the shape is broken somehow and it never becomes completely
|
||||
// available. This might cause the rebuild to happen over and over.
|
||||
if (LinksetRebuildFailureLoopPrevention-- > 0)
|
||||
{
|
||||
LinksetRoot.ForceBodyShapeRebuild(false);
|
||||
DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChildWithNoShape,indx={1},cShape={2},offPos={3},offRot={4}",
|
||||
LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
|
||||
// Output an annoying warning. It should only happen once but if it keeps coming out,
|
||||
// the user knows there is something wrong and will report it.
|
||||
m_physicsScene.Logger.WarnFormat("{0} Linkset rebuild warning. If this happens more than one or two times, please report in Mantis 7191", LogHeader);
|
||||
m_physicsScene.Logger.WarnFormat("{0} pName={1}, childIdx={2}, shape={3}",
|
||||
LogHeader, LinksetRoot.Name, cPrim.LinksetChildIndex, childShape);
|
||||
return false; // 'false' says to move onto the next child in the list
|
||||
}
|
||||
}
|
||||
|
||||
// Since we are borrowing the shape of the child, disable the origional child body
|
||||
if (!IsRoot(cPrim))
|
||||
|
||||
@@ -136,6 +136,9 @@ public static class BSParam
|
||||
public static float AvatarHeightLowFudge { get; private set; }
|
||||
public static float AvatarHeightMidFudge { get; private set; }
|
||||
public static float AvatarHeightHighFudge { get; private set; }
|
||||
public static float AvatarFlyingGroundMargin { get; private set; }
|
||||
public static float AvatarFlyingGroundUpForce { get; private set; }
|
||||
public static float AvatarTerminalVelocity { get; private set; }
|
||||
public static float AvatarContactProcessingThreshold { get; private set; }
|
||||
public static float AvatarStopZeroThreshold { get; private set; }
|
||||
public static int AvatarJumpFrames { get; private set; }
|
||||
@@ -583,6 +586,12 @@ public static class BSParam
|
||||
0f ),
|
||||
new ParameterDefn<float>("AvatarHeightHighFudge", "A fudge factor to make tall avatars stand on the ground",
|
||||
0f ),
|
||||
new ParameterDefn<float>("AvatarFlyingGroundMargin", "Meters avatar is kept above the ground when flying",
|
||||
5f ),
|
||||
new ParameterDefn<float>("AvatarFlyingGroundUpForce", "Upward force applied to the avatar to keep it at flying ground margin",
|
||||
2.0f ),
|
||||
new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar",
|
||||
-54.0f ),
|
||||
new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
|
||||
0.1f ),
|
||||
new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
|
||||
|
||||
@@ -462,7 +462,10 @@ public abstract class BSPhysObject : PhysicsActor
|
||||
|
||||
// If someone has subscribed for collision events log the collision so it will be reported up
|
||||
if (SubscribedEvents()) {
|
||||
CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth));
|
||||
lock (PhysScene.CollisionLock)
|
||||
{
|
||||
CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth));
|
||||
}
|
||||
DetailLog("{0},{1}.Collison.AddCollider,call,with={2},point={3},normal={4},depth={5},colliderMoving={6}",
|
||||
LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth, ColliderIsMoving);
|
||||
|
||||
@@ -474,12 +477,14 @@ public abstract class BSPhysObject : PhysicsActor
|
||||
// Send the collected collisions into the simulator.
|
||||
// Called at taint time from within the Step() function thus no locking problems
|
||||
// with CollisionCollection and ObjectsWithNoMoreCollisions.
|
||||
// Called with BSScene.CollisionLock locked to protect the collision lists.
|
||||
// Return 'true' if there were some actual collisions passed up
|
||||
public virtual bool SendCollisions()
|
||||
{
|
||||
bool ret = true;
|
||||
|
||||
// If the 'no collision' call, force it to happen right now so quick collision_end
|
||||
// If no collisions this call but there were collisions last call, force the collision
|
||||
// event to be happen right now so quick collision_end.
|
||||
bool force = (CollisionCollection.Count == 0 && CollisionsLastReported.Count != 0);
|
||||
|
||||
// throttle the collisions to the number of milliseconds specified in the subscription
|
||||
|
||||
@@ -705,7 +705,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||
// this is is under UpdateLock.
|
||||
public void PostUpdate(BSPhysObject updatee)
|
||||
{
|
||||
ObjectsWithUpdates.Add(updatee);
|
||||
lock (UpdateLock)
|
||||
{
|
||||
ObjectsWithUpdates.Add(updatee);
|
||||
}
|
||||
}
|
||||
|
||||
// The simulator thinks it is physics time so return all the collisions and position
|
||||
@@ -803,7 +806,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||
if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration))
|
||||
{
|
||||
// If a collision was 'good', remember to send it to the simulator
|
||||
ObjectsWithCollisions.Add(collider);
|
||||
lock (CollisionLock)
|
||||
{
|
||||
ObjectsWithCollisions.Add(collider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -410,6 +410,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int PRIM_POS_LOCAL = 33;
|
||||
public const int PRIM_LINK_TARGET = 34;
|
||||
public const int PRIM_SLICE = 35;
|
||||
public const int PRIM_SPECULAR = 36;
|
||||
public const int PRIM_NORMAL = 37;
|
||||
public const int PRIM_ALPHA_MODE = 38;
|
||||
public const int PRIM_TEXGEN_DEFAULT = 0;
|
||||
public const int PRIM_TEXGEN_PLANAR = 1;
|
||||
|
||||
|
||||
@@ -626,11 +626,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
string labelStatement;
|
||||
|
||||
if (m_insertCoopTerminationChecks)
|
||||
labelStatement = m_coopTerminationCheck + "\n";
|
||||
labelStatement = m_coopTerminationCheck;
|
||||
else
|
||||
labelStatement = "NoOp();\n";
|
||||
labelStatement = "NoOp();";
|
||||
|
||||
return Generate(String.Format("{0}: ", CheckName(jl.LabelName)), jl) + labelStatement;
|
||||
return GenerateLine(String.Format("{0}: {1}", CheckName(jl.LabelName), labelStatement), jl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -724,12 +724,13 @@ namespace SecondLife
|
||||
return assembly;
|
||||
}
|
||||
|
||||
private class kvpSorter : IComparer<KeyValuePair<int, int>>
|
||||
private class kvpSorter : IComparer<KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>>>
|
||||
{
|
||||
public int Compare(KeyValuePair<int, int> a,
|
||||
KeyValuePair<int, int> b)
|
||||
public int Compare(KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> a,
|
||||
KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> b)
|
||||
{
|
||||
return a.Key.CompareTo(b.Key);
|
||||
int kc = a.Key.Key.CompareTo(b.Key.Key);
|
||||
return (kc != 0) ? kc : a.Key.Value.CompareTo(b.Key.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,30 +747,46 @@ namespace SecondLife
|
||||
out ret))
|
||||
return ret;
|
||||
|
||||
List<KeyValuePair<int, int>> sorted =
|
||||
new List<KeyValuePair<int, int>>(positionMap.Keys);
|
||||
var sorted = new List<KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>>>(positionMap);
|
||||
|
||||
sorted.Sort(new kvpSorter());
|
||||
|
||||
int l = 1;
|
||||
int c = 1;
|
||||
int pl = 1;
|
||||
|
||||
foreach (KeyValuePair<int, int> cspos in sorted)
|
||||
foreach (KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> posmap in sorted)
|
||||
{
|
||||
if (cspos.Key >= line)
|
||||
//m_log.DebugFormat("[Compiler]: Scanning line map {0},{1} --> {2},{3}", posmap.Key.Key, posmap.Key.Value, posmap.Value.Key, posmap.Value.Value);
|
||||
int nl = posmap.Value.Key + line - posmap.Key.Key; // New, translated LSL line and column.
|
||||
int nc = posmap.Value.Value + col - posmap.Key.Value;
|
||||
// Keep going until we find the first point passed line,col.
|
||||
if (posmap.Key.Key > line)
|
||||
{
|
||||
if (cspos.Key > line)
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
if (cspos.Value > col)
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
c = cspos.Value;
|
||||
if (c == 0)
|
||||
c++;
|
||||
//m_log.DebugFormat("[Compiler]: Line is larger than requested {0},{1}, returning {2},{3}", line, col, l, c);
|
||||
if (pl < line)
|
||||
{
|
||||
//m_log.DebugFormat("[Compiler]: Previous line ({0}) is less than requested line ({1}), setting column to 1.", pl, line);
|
||||
c = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (posmap.Key.Key == line && posmap.Key.Value > col)
|
||||
{
|
||||
l = cspos.Key;
|
||||
// Never move l,c backwards.
|
||||
if (nl > l || (nl == l && nc > c))
|
||||
{
|
||||
//m_log.DebugFormat("[Compiler]: Using offset relative to this: {0} + {1} - {2}, {3} + {4} - {5} = {6}, {7}",
|
||||
// posmap.Value.Key, line, posmap.Key.Key, posmap.Value.Value, col, posmap.Key.Value, nl, nc);
|
||||
l = nl;
|
||||
c = nc;
|
||||
}
|
||||
//m_log.DebugFormat("[Compiler]: Column is larger than requested {0},{1}, returning {2},{3}", line, col, l, c);
|
||||
break;
|
||||
}
|
||||
pl = posmap.Key.Key;
|
||||
l = posmap.Value.Key;
|
||||
c = posmap.Value.Value;
|
||||
}
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
|
||||
// Create the temporary directory for housing build artifacts.
|
||||
Directory.CreateDirectory(m_testDir);
|
||||
}
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
// Create a CSCodeProvider and CompilerParameters.
|
||||
m_CSCodeProvider = new CSharpCodeProvider();
|
||||
m_compilerParameters = new CompilerParameters();
|
||||
@@ -85,7 +89,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
|
||||
/// Removes the temporary build directory and any build artifacts
|
||||
/// inside it.
|
||||
/// </summary>
|
||||
[TestFixtureTearDown]
|
||||
[TearDown]
|
||||
public void CleanUp()
|
||||
{
|
||||
System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler;
|
||||
@@ -97,6 +101,62 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
|
||||
}
|
||||
}
|
||||
|
||||
private CompilerResults CompileScript(
|
||||
string input, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> positionMap)
|
||||
{
|
||||
m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll");
|
||||
|
||||
CSCodeGenerator cg = new CSCodeGenerator();
|
||||
string output = cg.Convert(input);
|
||||
|
||||
output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null);
|
||||
// System.Console.WriteLine(output);
|
||||
|
||||
positionMap = cg.PositionMap;
|
||||
|
||||
CompilerResults compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output);
|
||||
|
||||
// foreach (KeyValuePair<int, int> key in positionMap.Keys)
|
||||
// {
|
||||
// KeyValuePair<int, int> val = positionMap[key];
|
||||
//
|
||||
// System.Console.WriteLine("{0},{1} => {2},{3}", key.Key, key.Value, val.Key, val.Value);
|
||||
// }
|
||||
//
|
||||
// foreach (CompilerError compErr in m_compilerResults.Errors)
|
||||
// {
|
||||
// System.Console.WriteLine("Error: {0},{1} => {2}", compErr.Line, compErr.Column, compErr);
|
||||
// }
|
||||
|
||||
return compilerResults;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test that line number errors are resolved as expected when preceding code contains a jump.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestJumpAndSyntaxError()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> positionMap;
|
||||
|
||||
CompilerResults compilerResults = CompileScript(
|
||||
@"default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
jump l;
|
||||
@l;
|
||||
i = 1;
|
||||
}
|
||||
}", out positionMap);
|
||||
|
||||
Assert.AreEqual(
|
||||
new KeyValuePair<int, int>(7, 9),
|
||||
positionMap[new KeyValuePair<int, int>(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the C# compiler error message can be mapped to the correct
|
||||
/// line/column in the LSL source when an undeclared variable is used.
|
||||
@@ -106,41 +166,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll");
|
||||
Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> positionMap;
|
||||
|
||||
string input = @"default
|
||||
CompilerResults compilerResults = CompileScript(
|
||||
@"default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
integer y = x + 3;
|
||||
}
|
||||
}";
|
||||
|
||||
CSCodeGenerator cg = new CSCodeGenerator();
|
||||
string output = cg.Convert(input);
|
||||
|
||||
output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null);
|
||||
// System.Console.WriteLine(output);
|
||||
|
||||
Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> positionMap = cg.PositionMap;
|
||||
|
||||
m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output);
|
||||
//
|
||||
// foreach (KeyValuePair<int, int> key in positionMap.Keys)
|
||||
// {
|
||||
// KeyValuePair<int, int> val = positionMap[key];
|
||||
//
|
||||
// System.Console.WriteLine("{0},{1} => {2},{3}", key.Key, key.Value, val.Key, val.Value);
|
||||
// }
|
||||
//
|
||||
// foreach (CompilerError compErr in m_compilerResults.Errors)
|
||||
// {
|
||||
// System.Console.WriteLine("Error: {0},{1} => {2}", compErr.Line, compErr.Column, compErr);
|
||||
// }
|
||||
}", out positionMap);
|
||||
|
||||
Assert.AreEqual(
|
||||
new KeyValuePair<int, int>(5, 21),
|
||||
positionMap[new KeyValuePair<int, int>(m_compilerResults.Errors[0].Line, m_compilerResults.Errors[0].Column)]);
|
||||
positionMap[new KeyValuePair<int, int>(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -152,9 +191,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll");
|
||||
Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> positionMap;
|
||||
|
||||
string input = @"string s = "" a string"";
|
||||
CompilerResults compilerResults = CompileScript(
|
||||
@"string s = "" a string"";
|
||||
|
||||
default
|
||||
{
|
||||
@@ -164,24 +204,9 @@ default
|
||||
string tmp = (string) gAvatarKey + s;
|
||||
llSay(0, tmp);
|
||||
}
|
||||
}";
|
||||
}", out positionMap);
|
||||
|
||||
// System.Console.WriteLine(input);
|
||||
CSCodeGenerator cg = new CSCodeGenerator();
|
||||
string output = cg.Convert(input);
|
||||
|
||||
output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null);
|
||||
// System.Console.WriteLine(output);
|
||||
|
||||
m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output);
|
||||
|
||||
System.Console.WriteLine("ERRORS: {0}", m_compilerResults.Errors.Count);
|
||||
foreach (CompilerError compErr in m_compilerResults.Errors)
|
||||
{
|
||||
System.Console.WriteLine("Error: {0}", compErr);
|
||||
}
|
||||
|
||||
Assert.AreEqual(0, m_compilerResults.Errors.Count);
|
||||
Assert.AreEqual(0, compilerResults.Errors.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,12 +144,16 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||
if (args.ContainsKey("agent_home_uri"))
|
||||
agentHomeURI = args["agent_home_uri"].AsString();
|
||||
|
||||
string theirVersion = string.Empty;
|
||||
if (args.ContainsKey("my_version"))
|
||||
theirVersion = args["my_version"].AsString();
|
||||
|
||||
GridRegion destination = new GridRegion();
|
||||
destination.RegionID = regionID;
|
||||
|
||||
string reason;
|
||||
string version;
|
||||
bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
|
||||
bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, theirVersion, out version, out reason);
|
||||
|
||||
responsedata["int_response_code"] = HttpStatusCode.OK;
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ using OpenSim.Services.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Data;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
//using OpenSim.Region.Framework.Interfaces;
|
||||
//using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Services.Connectors
|
||||
{
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, out string version, out string reason)
|
||||
{
|
||||
reason = "Failed to contact destination";
|
||||
version = "Unknown";
|
||||
@@ -298,6 +298,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
OSDMap request = new OSDMap();
|
||||
request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
|
||||
request.Add("position", OSD.FromString(position.ToString()));
|
||||
request.Add("my_version", OSD.FromString(myversion));
|
||||
if (agentHomeURI != null)
|
||||
request.Add("agent_home_uri", OSD.FromString(agentHomeURI));
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.Collections.Generic;
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IEstateDataService
|
||||
{
|
||||
@@ -85,10 +85,11 @@ namespace OpenSim.Services.Interfaces
|
||||
/// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param>
|
||||
/// <param name="viaTeleport">True: via teleport; False: via cross (walking)</param>
|
||||
/// <param name="position">Position in the region</param>
|
||||
/// <param name="version"></param>
|
||||
/// <param name="sversion">version that the requesting simulator is runing</param>
|
||||
/// <param name="version">version that the target simulator is running</param>
|
||||
/// <param name="reason">[out] Optional error message</param>
|
||||
/// <returns>True: ok; False: not allowed</returns>
|
||||
bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason);
|
||||
bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason);
|
||||
|
||||
/// <summary>
|
||||
/// Message from receiving region to departing region, telling it got contacted by the client.
|
||||
|
||||
@@ -33,6 +33,7 @@ using OpenSim.Framework.Servers;
|
||||
using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
namespace OpenSim.Tests.Common.Mock
|
||||
{
|
||||
|
||||
@@ -255,12 +255,13 @@ namespace OpenSim.Tools.LSL.Compiler
|
||||
return FindErrorPosition(line, col, null);
|
||||
}
|
||||
|
||||
private class kvpSorter : IComparer<KeyValuePair<int,int>>
|
||||
private class kvpSorter : IComparer<KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>>>
|
||||
{
|
||||
public int Compare(KeyValuePair<int,int> a,
|
||||
KeyValuePair<int,int> b)
|
||||
public int Compare(KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> a,
|
||||
KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> b)
|
||||
{
|
||||
return a.Key.CompareTo(b.Key);
|
||||
int kc = a.Key.Key.CompareTo(b.Key.Key);
|
||||
return (kc != 0) ? kc : a.Key.Value.CompareTo(b.Key.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,30 +278,46 @@ namespace OpenSim.Tools.LSL.Compiler
|
||||
out ret))
|
||||
return ret;
|
||||
|
||||
List<KeyValuePair<int,int>> sorted =
|
||||
new List<KeyValuePair<int,int>>(positionMap.Keys);
|
||||
var sorted = new List<KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>>>(positionMap);
|
||||
|
||||
sorted.Sort(new kvpSorter());
|
||||
|
||||
int l = 1;
|
||||
int c = 1;
|
||||
int pl = 1;
|
||||
|
||||
foreach (KeyValuePair<int, int> cspos in sorted)
|
||||
foreach (KeyValuePair<KeyValuePair<int, int>, KeyValuePair<int, int>> posmap in sorted)
|
||||
{
|
||||
if (cspos.Key >= line)
|
||||
//m_log.DebugFormat("[Compiler]: Scanning line map {0},{1} --> {2},{3}", posmap.Key.Key, posmap.Key.Value, posmap.Value.Key, posmap.Value.Value);
|
||||
int nl = posmap.Value.Key + line - posmap.Key.Key; // New, translated LSL line and column.
|
||||
int nc = posmap.Value.Value + col - posmap.Key.Value;
|
||||
// Keep going until we find the first point passed line,col.
|
||||
if (posmap.Key.Key > line)
|
||||
{
|
||||
if (cspos.Key > line)
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
if (cspos.Value > col)
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
c = cspos.Value;
|
||||
if (c == 0)
|
||||
c++;
|
||||
//m_log.DebugFormat("[Compiler]: Line is larger than requested {0},{1}, returning {2},{3}", line, col, l, c);
|
||||
if (pl < line)
|
||||
{
|
||||
//m_log.DebugFormat("[Compiler]: Previous line ({0}) is less than requested line ({1}), setting column to 1.", pl, line);
|
||||
c = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (posmap.Key.Key == line && posmap.Key.Value > col)
|
||||
{
|
||||
l = cspos.Key;
|
||||
// Never move l,c backwards.
|
||||
if (nl > l || (nl == l && nc > c))
|
||||
{
|
||||
//m_log.DebugFormat("[Compiler]: Using offset relative to this: {0} + {1} - {2}, {3} + {4} - {5} = {6}, {7}",
|
||||
// posmap.Value.Key, line, posmap.Key.Key, posmap.Value.Value, col, posmap.Key.Value, nl, nc);
|
||||
l = nl;
|
||||
c = nc;
|
||||
}
|
||||
//m_log.DebugFormat("[Compiler]: Column is larger than requested {0},{1}, returning {2},{3}", line, col, l, c);
|
||||
break;
|
||||
}
|
||||
pl = posmap.Key.Key;
|
||||
l = posmap.Value.Key;
|
||||
c = posmap.Value.Value;
|
||||
}
|
||||
return new KeyValuePair<int, int>(l, c);
|
||||
}
|
||||
|
||||
@@ -269,6 +269,10 @@
|
||||
; PreJump is an additional animation state, but it probably
|
||||
; won't look right until the physics engine supports it
|
||||
; (i.e delays takeoff for a moment)
|
||||
|
||||
; Simulator statistics are output to the console periodically at debug level INFO.
|
||||
; Setting this to zero disables this output.
|
||||
; LogShowStatsSeconds = 3600
|
||||
|
||||
; Simulator Stats URI
|
||||
; Enable JSON simulator data by setting a URI name (case sensitive)
|
||||
@@ -689,19 +693,23 @@
|
||||
[EntityTransfer]
|
||||
; The maximum protocol version that we will use for outgoing transfers
|
||||
; Valid values are
|
||||
; "SIMULATION/0.3"
|
||||
; - This is the default, and it supports teleports to variable-sized regions
|
||||
; - Older versions can teleport to this one, but only if the destination region
|
||||
; is 256x256
|
||||
; "SIMULATION/0.2"
|
||||
; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
||||
; "SIMULATION/0.1"
|
||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||
MaxOutgoingTransferVersion = "SIMULATION/0.2"
|
||||
MaxOutgoingTransferVersion = "SIMULATION/0.3"
|
||||
|
||||
; The maximum distance in regions that an agent is allowed to teleport
|
||||
; along the x or y axis. This is set to 16383 because current viewers
|
||||
; along the x or y axis. This is set to 65535 because current viewers
|
||||
; can't handle teleports that are greater than this distance
|
||||
; Setting to 0 will allow teleports of any distance
|
||||
;
|
||||
max_distance = 16383
|
||||
max_distance = 65535
|
||||
|
||||
; Minimum user level required for HyperGrid teleports
|
||||
LevelHGTeleport = 0
|
||||
@@ -1030,6 +1038,11 @@
|
||||
AvatarHeightMidFudge = 0 ; Adjustment at mid point of avatar height range
|
||||
AvatarHeightHighFudge = 0 ; Adjustment at high end of height range
|
||||
|
||||
; Terminal velocity of a falling avatar
|
||||
; This is the same http://en.wikipedia.org/wiki/Terminal_velocity#Examples
|
||||
; negative for a downward speed.
|
||||
AvatarTerminalVelocity = -54
|
||||
|
||||
; Default linkset implmentation
|
||||
; 'Constraint' uses physics constraints to hold linkset together. 'Compound'
|
||||
; builds a compound shape from the children shapes to create a single physical
|
||||
|
||||
@@ -23,6 +23,14 @@ InternalPort = 9000
|
||||
AllowAlternatePorts = False
|
||||
ExternalHostName = "SYSTEMIP"
|
||||
|
||||
; *
|
||||
; * Variable-sized regions allows the creation of large, borderless spaces.
|
||||
; * The default is 256 meters. For larger spaces, set these to multiples of 256.
|
||||
; * For the time being, X and Y need to be the same.
|
||||
; *
|
||||
; SizeX = 512
|
||||
; SizeY = 512
|
||||
|
||||
; *
|
||||
; * Prim data
|
||||
; * This allows limiting the sizes of prims and the region prim count
|
||||
|
||||
@@ -33,13 +33,17 @@
|
||||
[SimulationService]
|
||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
||||
; It is used to control the teleport handoff process.
|
||||
; Valid values are
|
||||
; Valid values are
|
||||
; "SIMULATION/0.3"
|
||||
; - This is the default, and it supports teleports to variable-sized regions
|
||||
; - Older versions can teleport to this one, but only if the destination region
|
||||
; is 256x256
|
||||
; "SIMULATION/0.2"
|
||||
; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
||||
; "SIMULATION/0.1"
|
||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||
ConnectorProtocolVersion = "SIMULATION/0.2"
|
||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
||||
|
||||
[SimulationDataStore]
|
||||
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
||||
|
||||
@@ -39,12 +39,16 @@
|
||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
||||
; It is used to control the teleport handoff process.
|
||||
; Valid values are
|
||||
; "SIMULATION/0.3"
|
||||
; - This is the default, and it supports teleports to variable-sized regions
|
||||
; - Older versions can teleport to this one, but only if the destination region
|
||||
; is 256x256
|
||||
; "SIMULATION/0.2"
|
||||
; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
||||
; "SIMULATION/0.1"
|
||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||
ConnectorProtocolVersion = "SIMULATION/0.2"
|
||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
||||
|
||||
[Profile]
|
||||
Module = "BasicProfileModule"
|
||||
|
||||
@@ -31,12 +31,16 @@
|
||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
||||
; It is used to control the teleport handoff process.
|
||||
; Valid values are
|
||||
; "SIMULATION/0.3"
|
||||
; - This is the default, and it supports teleports to variable-sized regions
|
||||
; - Older versions can teleport to this one, but only if the destination region
|
||||
; is 256x256
|
||||
; "SIMULATION/0.2"
|
||||
; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
||||
; "SIMULATION/0.1"
|
||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||
ConnectorProtocolVersion = "SIMULATION/0.2"
|
||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
||||
|
||||
[SimulationDataStore]
|
||||
LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService"
|
||||
|
||||
@@ -42,12 +42,16 @@
|
||||
; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport
|
||||
; It is used to control the teleport handoff process.
|
||||
; Valid values are
|
||||
; "SIMULATION/0.3"
|
||||
; - This is the default, and it supports teleports to variable-sized regions
|
||||
; - Older versions can teleport to this one, but only if the destination region
|
||||
; is 256x256
|
||||
; "SIMULATION/0.2"
|
||||
; - this is the default. A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol
|
||||
; - this protocol is more efficient than "SIMULATION/0.1"
|
||||
; "SIMULATION/0.1"
|
||||
; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||
ConnectorProtocolVersion = "SIMULATION/0.2"
|
||||
ConnectorProtocolVersion = "SIMULATION/0.3"
|
||||
|
||||
[Messaging]
|
||||
MessageTransferModule = HGMessageTransferModule
|
||||
|
||||
@@ -1407,6 +1407,7 @@
|
||||
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||
<Reference name="OpenSim.Services.Interfaces"/>
|
||||
<Reference name="XMLRPC" path="../../../bin/"/>
|
||||
<Reference name="Nini" path="../../../bin/"/>
|
||||
<Reference name="log4net" path="../../../bin/"/>
|
||||
|
||||
Reference in New Issue
Block a user