Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

bullet-2.82
Diva Canto 2014-05-31 08:22:56 -07:00
commit d6f9f690e5
16 changed files with 104 additions and 29 deletions

View File

@ -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

View File

@ -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":

View File

@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("0.7.6.*")]
[assembly : AssemblyVersion("0.8.0.*")]

View File

@ -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>

View File

@ -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>();

View File

@ -152,7 +152,7 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
// A sanity check that the response has the expected number of descendents for a default inventory
// TODO: Need a more thorough check.
Assert.That((int)folderOsd["descendents"], Is.EqualTo(14));
Assert.That((int)folderOsd["descendents"], Is.EqualTo(16));
}
}
}

View File

@ -1578,12 +1578,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 +1604,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 +1627,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);
}
}
}

View File

@ -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;

View File

@ -105,8 +105,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
m_scene.LoginLock = true;
m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
// Warn level because the region cannot be used while logins are disabled
m_log.WarnFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
// This should always show up to the user but should not trigger warn/errors as these messages are
// expected and are not simulator problems. Ideally, there would be a status level in log4net but
// failing that, we will print out to console instead.
MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
if (m_uri != string.Empty)
{

View File

@ -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;

View File

@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.IO;
using System.CodeDom.Compiler;
using System.Collections.Generic;
@ -48,6 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
private CSharpCodeProvider m_CSCodeProvider;
private CompilerParameters m_compilerParameters;
private CompilerResults m_compilerResults;
private ResolveEventHandler m_resolveEventHandler;
/// <summary>
/// Creates a temporary directory where build artifacts are stored.
@ -67,7 +69,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
m_CSCodeProvider = new CSharpCodeProvider();
m_compilerParameters = new CompilerParameters();
string rootPath = Path.Combine(Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory));
string rootPath = System.AppDomain.CurrentDomain.BaseDirectory;
m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve);
System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler;
m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll"));
m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"));
m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll"));
@ -81,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
[TestFixtureTearDown]
public void CleanUp()
{
System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler;
if (Directory.Exists(m_testDir))
{
// Blow away the temporary directory with artifacts.
@ -166,10 +175,11 @@ default
m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output);
// foreach (CompilerError compErr in m_compilerResults.Errors)
// {
// System.Console.WriteLine("Error: {0}", compErr);
// }
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);
}

View File

@ -74,7 +74,7 @@ namespace OpenSim.Server.Handlers.Authentication
protected override byte[] ProcessRequest(string path, Stream request,
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
m_log.Error("[XXX]: Authenticating...");
// m_log.Error("[XXX]: Authenticating...");
string[] p = SplitParams(path);
if (p.Length > 0)

View File

@ -108,7 +108,7 @@ namespace OpenSim.Services.Connectors
public bool Verify(UUID principalID, string token, int lifetime)
{
m_log.Error("[XXX]: Verify");
// m_log.Error("[XXX]: Verify");
Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["LIFETIME"] = lifetime.ToString();
sendData["PRINCIPAL"] = principalID.ToString();

View File

@ -17,7 +17,7 @@
<acceptOnMatch value="false"/>
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{HH:mm:ss} - %message%newline" />
<conversionPattern value="%date{HH:mm:ss} - %message" />
</layout>
</appender>

View File

@ -17,7 +17,7 @@
<acceptOnMatch value="false"/>
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{HH:mm:ss} - %message%newline" />
<conversionPattern value="%date{HH:mm:ss} - %message" />
</layout>
</appender>

View File

@ -11,7 +11,7 @@
<log4net>
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{HH:mm:ss.fff} - %message%newline" />
<conversionPattern value="%date{HH:mm:ss.fff} - %message" />
</layout>
</appender>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">