Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/Servers/VersionInfo.cs OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs OpenSim/Region/Framework/Scenes/ScenePresence.csavinationmerge
commit
1f32730798
|
@ -8,6 +8,24 @@
|
|||
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
||||
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
|
||||
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
|
||||
<!-- delete files generated by runprebuild.sh which had to be run in order to generate the build file for this target-->
|
||||
<delete>
|
||||
<fileset basedir="OpenSim">
|
||||
<include name="**/*.build"/>
|
||||
<include name="**/*.csproj*"/>
|
||||
<include name="**/*.dll.build"/>
|
||||
<include name="**/*.pidb"/>
|
||||
<exclude name="Tools/OpenSim.32BitLaunch/**"/>
|
||||
<exclude name="Tools/Robust.32BitLaunch/**"/>
|
||||
<exclude name="Tools/LaunchSLClient/**"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
<delete>
|
||||
<fileset>
|
||||
<include name="OpenSim.build"/>
|
||||
<include name="OpenSim.sln"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<property name="distbindir" value="distbin" />
|
||||
|
|
|
@ -1367,7 +1367,7 @@ VALUES
|
|||
newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]);
|
||||
newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]);
|
||||
newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]);
|
||||
newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
|
||||
newSettings.Sandbox = Convert.ToBoolean(row["Sandbox"]);
|
||||
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
|
||||
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
|
||||
newSettings.SunVector = new Vector3(
|
||||
|
@ -1782,7 +1782,7 @@ VALUES
|
|||
parameters.Add(_Database.CreateParameter("terrain_raise_limit", settings.TerrainRaiseLimit));
|
||||
parameters.Add(_Database.CreateParameter("terrain_lower_limit", settings.TerrainLowerLimit));
|
||||
parameters.Add(_Database.CreateParameter("use_estate_sun", settings.UseEstateSun));
|
||||
parameters.Add(_Database.CreateParameter("sandbox", settings.Sandbox));
|
||||
parameters.Add(_Database.CreateParameter("Sandbox", settings.Sandbox));
|
||||
parameters.Add(_Database.CreateParameter("fixed_sun", settings.FixedSun));
|
||||
parameters.Add(_Database.CreateParameter("sun_position", settings.SunPosition));
|
||||
parameters.Add(_Database.CreateParameter("sunvectorx", settings.SunVector.X));
|
||||
|
|
|
@ -1299,7 +1299,7 @@ namespace OpenSim.Data.MySQL
|
|||
newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]);
|
||||
newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]);
|
||||
newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]);
|
||||
newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
|
||||
newSettings.Sandbox = Convert.ToBoolean(row["Sandbox"]);
|
||||
newSettings.SunVector = new Vector3 (
|
||||
Convert.ToSingle(row["sunvectorx"]),
|
||||
Convert.ToSingle(row["sunvectory"]),
|
||||
|
|
|
@ -2157,7 +2157,7 @@ namespace OpenSim.Data.SQLite
|
|||
row["terrain_raise_limit"] = settings.TerrainRaiseLimit;
|
||||
row["terrain_lower_limit"] = settings.TerrainLowerLimit;
|
||||
row["use_estate_sun"] = settings.UseEstateSun;
|
||||
row["Sandbox"] = settings.Sandbox; // database uses upper case S for sandbox
|
||||
row["sandbox"] = settings.Sandbox; // unlike other database modules, sqlite uses a lower case s for sandbox!
|
||||
row["sunvectorx"] = settings.SunVector.X;
|
||||
row["sunvectory"] = settings.SunVector.Y;
|
||||
row["sunvectorz"] = settings.SunVector.Z;
|
||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
|
@ -37,28 +38,42 @@ namespace OpenSim.Framework.Console
|
|||
/// Don't use this except for Unit Testing or you're in for a world of hurt when the
|
||||
/// sim gets to ReadLine
|
||||
/// </summary>
|
||||
public class MockConsole : CommandConsole
|
||||
public class MockConsole : ICommandConsole
|
||||
{
|
||||
public MockConsole(string defaultPrompt) : base(defaultPrompt)
|
||||
{
|
||||
}
|
||||
public override void Output(string text)
|
||||
{
|
||||
}
|
||||
public override void Output(string text, string level)
|
||||
{
|
||||
}
|
||||
private MockCommands m_commands = new MockCommands();
|
||||
|
||||
public override string ReadLine(string p, bool isCommand, bool e)
|
||||
{
|
||||
//Thread.CurrentThread.Join(1000);
|
||||
return string.Empty;
|
||||
}
|
||||
public override void UnlockOutput()
|
||||
{
|
||||
}
|
||||
public override void LockOutput()
|
||||
{
|
||||
}
|
||||
public ICommands Commands { get { return m_commands; } }
|
||||
|
||||
public void Prompt() {}
|
||||
|
||||
public void RunCommand(string cmd) {}
|
||||
|
||||
public string ReadLine(string p, bool isCommand, bool e) { return ""; }
|
||||
|
||||
public object ConsoleScene { get { return null; } }
|
||||
|
||||
public void Output(string text, string level) {}
|
||||
public void Output(string text) {}
|
||||
public void OutputFormat(string format, params object[] components) {}
|
||||
|
||||
public string CmdPrompt(string p) { return ""; }
|
||||
public string CmdPrompt(string p, string def) { return ""; }
|
||||
public string CmdPrompt(string p, List<char> excludedCharacters) { return ""; }
|
||||
public string CmdPrompt(string p, string def, List<char> excludedCharacters) { return ""; }
|
||||
|
||||
public string CmdPrompt(string prompt, string defaultresponse, List<string> options) { return ""; }
|
||||
|
||||
public string PasswdPrompt(string p) { return ""; }
|
||||
}
|
||||
}
|
||||
|
||||
public class MockCommands : ICommands
|
||||
{
|
||||
public void FromXml(XmlElement root, CommandDelegate fn) {}
|
||||
public List<string> GetHelp(string[] cmd) { return null; }
|
||||
public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn) {}
|
||||
public void AddCommand(string module, bool shared, string command, string help, string longhelp, string descriptivehelp, CommandDelegate fn) {}
|
||||
public string[] FindNextOption(string[] cmd, bool term) { return null; }
|
||||
public string[] Resolve(string[] cmd) { return null; }
|
||||
public XmlElement GetXml(XmlDocument doc) { return null; }
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ namespace OpenSim
|
|||
{
|
||||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.7.3CM";
|
||||
private const string VERSION_NUMBER = "0.7.4CM";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
|
||||
public enum Flavour
|
||||
|
|
|
@ -63,77 +63,7 @@ namespace OpenSim.Framework
|
|||
// a "long" call for warning & debugging purposes
|
||||
public const int LongCallTime = 500;
|
||||
|
||||
// /// <summary>
|
||||
// /// Send LLSD to an HTTP client in application/llsd+json form
|
||||
// /// </summary>
|
||||
// /// <param name="response">HTTP response to send the data in</param>
|
||||
// /// <param name="body">LLSD to send to the client</param>
|
||||
// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
|
||||
// {
|
||||
// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
|
||||
//
|
||||
// response.ContentEncoding = Encoding.UTF8;
|
||||
// response.ContentLength = responseData.Length;
|
||||
// response.ContentType = "application/llsd+json";
|
||||
// response.Body.Write(responseData, 0, responseData.Length);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Send LLSD to an HTTP client in application/llsd+xml form
|
||||
// /// </summary>
|
||||
// /// <param name="response">HTTP response to send the data in</param>
|
||||
// /// <param name="body">LLSD to send to the client</param>
|
||||
// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
|
||||
// {
|
||||
// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
|
||||
//
|
||||
// response.ContentEncoding = Encoding.UTF8;
|
||||
// response.ContentLength = responseData.Length;
|
||||
// response.ContentType = "application/llsd+xml";
|
||||
// response.Body.Write(responseData, 0, responseData.Length);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Make a GET or GET-like request to a web service that returns LLSD
|
||||
/// or JSON data
|
||||
/// </summary>
|
||||
public static OSDMap ServiceRequest(string url, string httpVerb)
|
||||
{
|
||||
string errorMessage;
|
||||
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||
request.Method = httpVerb;
|
||||
|
||||
using (WebResponse response = request.GetResponse())
|
||||
{
|
||||
using (Stream responseStream = response.GetResponseStream())
|
||||
{
|
||||
try
|
||||
{
|
||||
string responseStr = responseStream.GetStreamString();
|
||||
OSD responseOSD = OSDParser.Deserialize(responseStr);
|
||||
if (responseOSD.Type == OSDType.Map)
|
||||
return (OSDMap)responseOSD;
|
||||
else
|
||||
errorMessage = "Response format was invalid.";
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorMessage = "Failed to parse the response.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
|
||||
errorMessage = ex.Message;
|
||||
}
|
||||
|
||||
return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } };
|
||||
}
|
||||
#region JSONRequest
|
||||
|
||||
/// <summary>
|
||||
/// PUT JSON-encoded data to a web service that returns LLSD or
|
||||
|
@ -304,6 +234,10 @@ namespace OpenSim.Framework
|
|||
return result;
|
||||
}
|
||||
|
||||
#endregion JSONRequest
|
||||
|
||||
#region FormRequest
|
||||
|
||||
/// <summary>
|
||||
/// POST URL-encoded form data to a web service that returns LLSD or
|
||||
/// JSON data
|
||||
|
@ -398,6 +332,8 @@ namespace OpenSim.Framework
|
|||
result["Message"] = OSD.FromString("Service request failed: " + msg);
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion FormRequest
|
||||
|
||||
#region Uri
|
||||
|
||||
|
|
|
@ -150,7 +150,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
|||
string skillsText = String.Empty;
|
||||
string languages = String.Empty;
|
||||
|
||||
Byte[] charterMember = Utils.StringToBytes("Avatar");
|
||||
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, avatarID);
|
||||
|
||||
string name = "Avatar";
|
||||
int created = 0;
|
||||
if (account != null)
|
||||
{
|
||||
name = account.FirstName + " " + account.LastName;
|
||||
created = account.Created;
|
||||
}
|
||||
Byte[] charterMember = Utils.StringToBytes(name);
|
||||
|
||||
profileUrl = "No profile data";
|
||||
aboutText = string.Empty;
|
||||
|
@ -160,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
|||
partner = UUID.Zero;
|
||||
|
||||
remoteClient.SendAvatarProperties(avatarID, aboutText,
|
||||
Util.ToDateTime(0).ToString(
|
||||
Util.ToDateTime(created).ToString(
|
||||
"M/d/yyyy", CultureInfo.InvariantCulture),
|
||||
charterMember, firstLifeAboutText,
|
||||
(uint)(0 & 0xff),
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
string userAssetServer = string.Empty;
|
||||
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
|
||||
{
|
||||
Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
|
||||
m_assMapper.Post(assetID, avatarID, userAssetServer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// There is a major hack going on in this method. The viewer doesn't request
|
||||
// map blocks (RequestMapBlocks) above 2048. That means that if we don't hack,
|
||||
// grids above that cell don't have a map at all. So, here's the hack: we wait
|
||||
// for this CAP request to come, and we inject the map blocks at this point.
|
||||
// for this CAP request to come, and we inject the map blocks at this point.
|
||||
// In a normal scenario, this request simply sends back the MapLayer (the blue color).
|
||||
// In the hacked scenario, it also sends the map blocks via UDP.
|
||||
//
|
||||
|
@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
{
|
||||
uint x = 0, y = 0;
|
||||
Utils.LongToUInts(regionhandle, out x, out y);
|
||||
GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
|
||||
if (mreg != null)
|
||||
{
|
||||
|
@ -857,7 +857,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
finally
|
||||
{
|
||||
if (os != null)
|
||||
os.Close();
|
||||
os.Close();
|
||||
}
|
||||
|
||||
string response_mapItems_reply = null;
|
||||
|
@ -960,16 +960,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// on an unloaded square.
|
||||
// But make sure: Look whether the one we requested is in there
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
minX * (int)Constants.RegionSize,
|
||||
maxX * (int)Constants.RegionSize,
|
||||
minY * (int)Constants.RegionSize,
|
||||
minX * (int)Constants.RegionSize,
|
||||
maxX * (int)Constants.RegionSize,
|
||||
minY * (int)Constants.RegionSize,
|
||||
maxY * (int)Constants.RegionSize);
|
||||
|
||||
if (regions != null)
|
||||
{
|
||||
foreach (GridRegion r in regions)
|
||||
{
|
||||
if ((r.RegionLocX == minX * (int)Constants.RegionSize) &&
|
||||
if ((r.RegionLocX == minX * (int)Constants.RegionSize) &&
|
||||
(r.RegionLocY == minY * (int)Constants.RegionSize))
|
||||
{
|
||||
// found it => add it to response
|
||||
|
@ -1004,7 +1004,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
{
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>();
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
(minX - 4) * (int)Constants.RegionSize,
|
||||
(minX - 4) * (int)Constants.RegionSize,
|
||||
(maxX + 4) * (int)Constants.RegionSize,
|
||||
(minY - 4) * (int)Constants.RegionSize,
|
||||
(maxY + 4) * (int)Constants.RegionSize);
|
||||
|
@ -1336,7 +1336,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// Cannot create a map for a nonexistant heightmap
|
||||
if (m_scene.Heightmap == null)
|
||||
return;
|
||||
|
||||
|
||||
//create a texture asset of the terrain
|
||||
IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>();
|
||||
if (terrain == null)
|
||||
|
@ -1345,7 +1345,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
byte[] data = terrain.WriteJpeg2000Image();
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
|
||||
byte[] overlay = GenerateOverlay();
|
||||
|
||||
m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
|
||||
|
@ -1366,7 +1366,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// Store the new one
|
||||
m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
|
||||
m_scene.AssetService.Store(asset);
|
||||
|
||||
|
||||
if (overlay != null)
|
||||
{
|
||||
parcelImageID = UUID.Random();
|
||||
|
@ -1390,7 +1390,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID;
|
||||
m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID;
|
||||
m_scene.RegionInfo.RegionSettings.Save();
|
||||
|
||||
|
||||
// Delete the old one
|
||||
// m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID);
|
||||
m_scene.AssetService.Delete(lastTerrainImageID.ToString());
|
||||
|
@ -1511,11 +1511,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
|
||||
if (!landForSale)
|
||||
{
|
||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not geenrating overlay", m_scene.RegionInfo.RegionName);
|
||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not generating overlay", m_scene.RegionInfo.RegionName);
|
||||
return null;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName);
|
||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -4330,16 +4330,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public bool PipeEventsForScript(uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||
|
||||
if (part != null)
|
||||
{
|
||||
// Changed so that child prims of attachments return ScriptDanger for their parent, so that
|
||||
// their scripts will actually run.
|
||||
// -- Leaf, Tue Aug 12 14:17:05 EDT 2008
|
||||
SceneObjectPart parent = part.ParentGroup.RootPart;
|
||||
if (part.ParentGroup.IsAttachment)
|
||||
return ScriptDanger(parent, parent.GetWorldPosition());
|
||||
else
|
||||
return ScriptDanger(part, part.GetWorldPosition());
|
||||
return ScriptDanger(parent, parent.GetWorldPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -349,13 +349,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
protected Vector3 m_lastCameraPosition;
|
||||
|
||||
protected Vector3 m_CameraPosition;
|
||||
|
||||
public Vector3 CameraPosition
|
||||
{
|
||||
get { return m_CameraPosition; }
|
||||
private set { m_CameraPosition = value; }
|
||||
}
|
||||
public Vector3 CameraPosition { get; set; }
|
||||
|
||||
public Quaternion CameraRotation
|
||||
{
|
||||
|
@ -365,28 +359,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Use these three vectors to figure out what the agent is looking at
|
||||
// Convert it to a Matrix and/or Quaternion
|
||||
//
|
||||
protected Vector3 m_CameraAtAxis;
|
||||
protected Vector3 m_CameraLeftAxis;
|
||||
protected Vector3 m_CameraUpAxis;
|
||||
|
||||
public Vector3 CameraAtAxis
|
||||
{
|
||||
get { return m_CameraAtAxis; }
|
||||
private set { m_CameraAtAxis = value; }
|
||||
}
|
||||
|
||||
|
||||
public Vector3 CameraLeftAxis
|
||||
{
|
||||
get { return m_CameraLeftAxis; }
|
||||
private set { m_CameraLeftAxis = value; }
|
||||
}
|
||||
|
||||
public Vector3 CameraUpAxis
|
||||
{
|
||||
get { return m_CameraUpAxis; }
|
||||
private set { m_CameraUpAxis = value; }
|
||||
}
|
||||
public Vector3 CameraAtAxis { get; set; }
|
||||
public Vector3 CameraLeftAxis { get; set; }
|
||||
public Vector3 CameraUpAxis { get; set; }
|
||||
|
||||
public Vector3 Lookat
|
||||
{
|
||||
|
@ -402,33 +377,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
#endregion
|
||||
|
||||
public readonly string Firstname;
|
||||
public readonly string Lastname;
|
||||
public string Firstname { get; private set; }
|
||||
public string Lastname { get; private set; }
|
||||
|
||||
private string m_grouptitle;
|
||||
|
||||
public string Grouptitle
|
||||
{
|
||||
get { return m_grouptitle; }
|
||||
set { m_grouptitle = value; }
|
||||
}
|
||||
public string Grouptitle { get; set; }
|
||||
|
||||
// Agent's Draw distance.
|
||||
protected float m_DrawDistance;
|
||||
public float DrawDistance { get; set; }
|
||||
|
||||
public float DrawDistance
|
||||
{
|
||||
get { return m_DrawDistance; }
|
||||
private set { m_DrawDistance = value; }
|
||||
}
|
||||
|
||||
protected bool m_allowMovement = true;
|
||||
|
||||
public bool AllowMovement
|
||||
{
|
||||
get { return m_allowMovement; }
|
||||
set { m_allowMovement = value; }
|
||||
}
|
||||
public bool AllowMovement { get; set; }
|
||||
|
||||
private bool m_setAlwaysRun;
|
||||
|
||||
|
@ -455,13 +412,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
private byte m_state;
|
||||
|
||||
public byte State
|
||||
{
|
||||
get { return m_state; }
|
||||
set { m_state = value; }
|
||||
}
|
||||
public byte State { get; set; }
|
||||
|
||||
private AgentManager.ControlFlags m_AgentControlFlags;
|
||||
|
||||
|
@ -471,29 +422,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set { m_AgentControlFlags = (AgentManager.ControlFlags)value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This works out to be the ClientView object associated with this avatar, or it's client connection manager
|
||||
/// </summary>
|
||||
private IClientAPI m_controllingClient;
|
||||
|
||||
public IClientAPI ControllingClient
|
||||
{
|
||||
get { return m_controllingClient; }
|
||||
private set { m_controllingClient = value; }
|
||||
}
|
||||
public IClientAPI ControllingClient { get; set; }
|
||||
|
||||
public IClientCore ClientView
|
||||
{
|
||||
get { return (IClientCore) m_controllingClient; }
|
||||
get { return (IClientCore)ControllingClient; }
|
||||
}
|
||||
|
||||
protected Vector3 m_parentPosition;
|
||||
|
||||
public Vector3 ParentPosition
|
||||
{
|
||||
get { return m_parentPosition; }
|
||||
set { m_parentPosition = value; }
|
||||
}
|
||||
public Vector3 ParentPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position of this avatar relative to the region the avatar is in
|
||||
|
@ -760,7 +696,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
|
||||
{
|
||||
AttachmentsSyncLock = new Object();
|
||||
|
||||
AllowMovement = true;
|
||||
IsChildAgent = true;
|
||||
m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
|
||||
Animator = new ScenePresenceAnimator(this);
|
||||
|
@ -839,17 +775,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
private Vector3[] GetWalkDirectionVectors()
|
||||
{
|
||||
Vector3[] vector = new Vector3[11];
|
||||
vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD
|
||||
vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK
|
||||
vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD
|
||||
vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK
|
||||
vector[2] = Vector3.UnitY; //LEFT
|
||||
vector[3] = -Vector3.UnitY; //RIGHT
|
||||
vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP
|
||||
vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN
|
||||
vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE
|
||||
vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE
|
||||
vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP
|
||||
vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN
|
||||
vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE
|
||||
vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE
|
||||
vector[8] = Vector3.UnitY; //LEFT_NUDGE
|
||||
vector[9] = -Vector3.UnitY; //RIGHT_NUDGE
|
||||
vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE
|
||||
vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE
|
||||
return vector;
|
||||
}
|
||||
|
||||
|
@ -1380,7 +1316,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Convert it to a Matrix and/or Quaternion
|
||||
CameraAtAxis = agentData.CameraAtAxis;
|
||||
CameraLeftAxis = agentData.CameraLeftAxis;
|
||||
m_CameraUpAxis = agentData.CameraUpAxis;
|
||||
CameraUpAxis = agentData.CameraUpAxis;
|
||||
|
||||
// The Agent's Draw distance setting
|
||||
// When we get to the point of re-computing neighbors everytime this
|
||||
|
@ -1392,7 +1328,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Check if Client has camera in 'follow cam' or 'build' mode.
|
||||
Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
|
||||
|
||||
m_followCamAuto = ((m_CameraUpAxis.Z > 0.959f && m_CameraUpAxis.Z < 0.98f)
|
||||
m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f)
|
||||
&& (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false;
|
||||
|
||||
m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0;
|
||||
|
@ -3158,7 +3094,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
cAgent.Center = CameraPosition;
|
||||
cAgent.AtAxis = CameraAtAxis;
|
||||
cAgent.LeftAxis = CameraLeftAxis;
|
||||
cAgent.UpAxis = m_CameraUpAxis;
|
||||
cAgent.UpAxis = CameraUpAxis;
|
||||
|
||||
cAgent.Far = DrawDistance;
|
||||
|
||||
|
@ -3247,7 +3183,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
CameraPosition = cAgent.Center;
|
||||
CameraAtAxis = cAgent.AtAxis;
|
||||
CameraLeftAxis = cAgent.LeftAxis;
|
||||
m_CameraUpAxis = cAgent.UpAxis;
|
||||
CameraUpAxis = cAgent.UpAxis;
|
||||
ParentUUID = cAgent.ParentPart;
|
||||
m_prevSitOffset = cAgent.SitOffset;
|
||||
|
||||
|
|
|
@ -65,8 +65,7 @@ namespace OpenSim.Region.Framework.Tests
|
|||
|
||||
// Create an object embedded inside the first
|
||||
UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000");
|
||||
TaskInventoryItem taskSceneObjectItem
|
||||
= TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
|
||||
TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
|
||||
|
||||
TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId);
|
||||
Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId));
|
||||
|
|
|
@ -4450,7 +4450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f),
|
||||
Util.Clip((float)color.y, 0.0f, 1.0f),
|
||||
Util.Clip((float)color.z, 0.0f, 1.0f));
|
||||
m_host.SetText(text.Length > 254 ? text.Remove(255) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
||||
m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
||||
//m_host.ParentGroup.HasGroupChanged = true;
|
||||
//m_host.ParentGroup.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
|
|
@ -2169,6 +2169,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return result;
|
||||
}
|
||||
|
||||
public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osReplaceString");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// Normalize indices (if negative).
|
||||
// After normlaization they may still be
|
||||
// negative, but that is now relative to
|
||||
// the start, rather than the end, of the
|
||||
// sequence.
|
||||
if (start < 0)
|
||||
{
|
||||
start = src.Length + start;
|
||||
}
|
||||
|
||||
if (start < 0 || start >= src.Length)
|
||||
{
|
||||
return src;
|
||||
}
|
||||
|
||||
// Find matches beginning at start position
|
||||
Regex matcher = new Regex(pattern);
|
||||
return matcher.Replace(src,replace,count,start);
|
||||
}
|
||||
|
||||
public string osLoadedCreationDate()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate");
|
||||
|
|
|
@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
|||
|
||||
public void CheckSenseRepeaterEvents()
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
lock (SenseRepeatListLock)
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
// Go through all timers
|
||||
foreach (SenseRepeatClass ts in SenseRepeaters)
|
||||
{
|
||||
|
@ -640,7 +640,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
|||
ts.next =
|
||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
|
||||
SenseRepeaters.Add(ts);
|
||||
lock (SenseRepeatListLock)
|
||||
SenseRepeaters.Add(ts);
|
||||
|
||||
idx += 6;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
|
||||
LSL_String osFormatString(string str, LSL_List strings);
|
||||
LSL_List osMatchString(string src, string pattern, int start);
|
||||
LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
|
||||
|
||||
// Information about data loaded into the region
|
||||
string osLoadedCreationDate();
|
||||
|
|
|
@ -472,6 +472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osMatchString(src, pattern, start);
|
||||
}
|
||||
|
||||
public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
|
||||
{
|
||||
return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
|
||||
}
|
||||
|
||||
|
||||
// Information about data loaded into the region
|
||||
public string osLoadedCreationDate()
|
||||
{
|
||||
|
|
|
@ -224,13 +224,11 @@ namespace OpenSim.Region.UserStatistics
|
|||
concurrencyCounter--;
|
||||
|
||||
response_code = 200;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
strOut = MainServer.Instance.GetHTTP404("");
|
||||
}
|
||||
|
||||
|
||||
responsedata["int_response_code"] = response_code;
|
||||
responsedata["content_type"] = contenttype;
|
||||
|
@ -247,43 +245,44 @@ namespace OpenSim.Region.UserStatistics
|
|||
// TODO: FIXME: implement stats migrations
|
||||
const string SQL = @"SELECT * FROM migrations LIMIT 1";
|
||||
|
||||
SqliteCommand cmd = new SqliteCommand(SQL, db);
|
||||
|
||||
try
|
||||
using (SqliteCommand cmd = new SqliteCommand(SQL, db))
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
CreateTables(db);
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
CreateTables(db);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateTables(SqliteConnection db)
|
||||
{
|
||||
SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db);
|
||||
createcmd.ExecuteNonQuery();
|
||||
using (SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db))
|
||||
{
|
||||
createcmd.ExecuteNonQuery();
|
||||
|
||||
createcmd.CommandText = SQL_MIGRA_TABLE_CREATE;
|
||||
createcmd.ExecuteNonQuery();
|
||||
createcmd.CommandText = SQL_MIGRA_TABLE_CREATE;
|
||||
createcmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void PostInitialise()
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AddHandlers();
|
||||
}
|
||||
|
||||
public virtual void Close()
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dbConn.Close();
|
||||
dbConn.Dispose();
|
||||
m_sessions.Clear();
|
||||
|
@ -304,7 +303,8 @@ namespace OpenSim.Region.UserStatistics
|
|||
|
||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
||||
string capsPath = "/CAPS/VS/" + UUID.Random();
|
||||
caps.RegisterHandler("ViewerStats",
|
||||
new RestStreamHandler("POST", capsPath,
|
||||
|
@ -318,7 +318,6 @@ namespace OpenSim.Region.UserStatistics
|
|||
|
||||
public void OnDeRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual void AddHandlers()
|
||||
|
@ -368,7 +367,6 @@ namespace OpenSim.Region.UserStatistics
|
|||
|
||||
public void OnMakeChildAgent(ScenePresence agent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClientClosed(UUID agentID, Scene scene)
|
||||
|
@ -430,6 +428,7 @@ namespace OpenSim.Region.UserStatistics
|
|||
return scene.RegionInfo.RegionID;
|
||||
}
|
||||
}
|
||||
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
|
@ -458,14 +457,14 @@ namespace OpenSim.Region.UserStatistics
|
|||
UserSessionData usd;
|
||||
OSD message = OSDParser.DeserializeLLSDXml(request);
|
||||
OSDMap mmap;
|
||||
|
||||
lock (m_sessions)
|
||||
{
|
||||
if (agentID != UUID.Zero)
|
||||
{
|
||||
|
||||
if (!m_sessions.ContainsKey(agentID))
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: no session for stat disclosure");
|
||||
m_log.WarnFormat("[WEB STATS MODULE]: no session for stat disclosure for agent {0}", agentID);
|
||||
return new UserSessionID();
|
||||
}
|
||||
uid = m_sessions[agentID];
|
||||
|
@ -585,8 +584,6 @@ namespace OpenSim.Region.UserStatistics
|
|||
usd.n_out_kb = (float)net_out["kbytes"].AsReal();
|
||||
usd.n_out_pk = net_out["packets"].AsInteger();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -602,83 +599,85 @@ namespace OpenSim.Region.UserStatistics
|
|||
|
||||
lock (db)
|
||||
{
|
||||
SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db);
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view",
|
||||
(int) uid.session_data.min_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view",
|
||||
(int) uid.session_data.max_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view",
|
||||
(int) uid.session_data.mode_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString()));
|
||||
// m_log.Debug("UPDATE");
|
||||
|
||||
int result = updatecmd.ExecuteNonQuery();
|
||||
|
||||
if (result == 0)
|
||||
using (SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db))
|
||||
{
|
||||
// m_log.Debug("INSERT");
|
||||
updatecmd.CommandText = SQL_STATS_TABLE_INSERT;
|
||||
try
|
||||
{
|
||||
updatecmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteExecutionException)
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage Execution Exception");
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage SQL Syntax Exception");
|
||||
}
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view",
|
||||
(int) uid.session_data.min_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view",
|
||||
(int) uid.session_data.max_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view",
|
||||
(int) uid.session_data.mode_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString()));
|
||||
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: Database stats update for {0}", uid.session_data.agent_id);
|
||||
|
||||
int result = updatecmd.ExecuteNonQuery();
|
||||
|
||||
if (result == 0)
|
||||
{
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: Database stats insert for {0}", uid.session_data.agent_id);
|
||||
|
||||
updatecmd.CommandText = SQL_STATS_TABLE_INSERT;
|
||||
|
||||
try
|
||||
{
|
||||
updatecmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[WEB STATS MODULE]: failed to write stats for {0}, storage Execution Exception {1}{2}",
|
||||
uid.session_data.agent_id, e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace OpenSim.Tests.Common
|
|||
Console.WriteLine("Setting up test scene {0}", name);
|
||||
|
||||
// We must set up a console otherwise setup of some modules may fail
|
||||
MainConsole.Instance = new MockConsole("TEST PROMPT");
|
||||
MainConsole.Instance = new MockConsole();
|
||||
|
||||
RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
|
||||
regInfo.RegionName = name;
|
||||
|
|
|
@ -420,6 +420,8 @@ namespace pCampBot
|
|||
|
||||
public void Network_LoginProgress(object sender, LoginProgressEventArgs args)
|
||||
{
|
||||
m_log.DebugFormat("[BOT]: Bot {0} {1} in Network_LoginProcess", Name, args.Status);
|
||||
|
||||
if (args.Status == LoginStatus.Success)
|
||||
{
|
||||
if (OnConnected != null)
|
||||
|
@ -431,10 +433,15 @@ namespace pCampBot
|
|||
|
||||
public void Network_SimConnected(object sender, SimConnectedEventArgs args)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[BOT]: Bot {0} connected to {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
|
||||
}
|
||||
|
||||
public void Network_OnDisconnected(object sender, DisconnectedEventArgs args)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[BOT]: Bot {0} disconnected reason {1}, message {2}", Name, args.Reason, args.Message);
|
||||
|
||||
// m_log.ErrorFormat("Fired Network_OnDisconnected");
|
||||
|
||||
// if (
|
||||
|
|
|
@ -266,7 +266,7 @@ namespace pCampBot
|
|||
/// <returns></returns>
|
||||
protected CommandConsole CreateConsole()
|
||||
{
|
||||
return new LocalConsole("Region");
|
||||
return new LocalConsole("pCampbot");
|
||||
}
|
||||
|
||||
private void HandleShutdown(string module, string[] cmd)
|
||||
|
|
|
@ -56,6 +56,10 @@ namespace pCampBot
|
|||
{
|
||||
Help();
|
||||
}
|
||||
else if (config.Get("firstname") == null || config.Get("lastname") == null || config.Get("password") == null)
|
||||
{
|
||||
Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots.");
|
||||
}
|
||||
else
|
||||
{
|
||||
int botcount = config.GetInt("botcount", 1);
|
||||
|
|
|
@ -128,3 +128,4 @@ OpenSim, as well as how to report bugs, and participate in the OpenSim
|
|||
project can always be found at http://opensimulator.org.
|
||||
|
||||
Thanks for trying OpenSim, we hope it is a pleasant experience.
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue