Compare commits

...

11 Commits

Author SHA1 Message Date
Adam Frisby
3a7cefb18d * Tagging trunk as 0.2.1-release in anticipation of the Sugilite merge. 2007-07-11 02:30:40 +00:00
lbsa71
d6d7e2127c Who would have known that the only way of specifying utf-8 without preamble, is to not specify encoding at all. Or 'null' when sending an Encoder. 2007-07-08 07:53:48 +00:00
Adam Frisby
e8671a2c05 * Maintainence: Applying Dan's ODE Patch to Trunk 2007-07-06 05:41:22 +00:00
lbsa71
8df2119bc7 * Changed XmlRpc to specify utf-8 2007-07-05 18:31:59 +00:00
Adam Frisby
f7a938a21d * Making trunk compile again for CC.net 2007-07-04 07:51:02 +00:00
Adam Frisby
ba96d08004 * Updating trunk UserServer to make it sugilite happy (differentiation of regions by handle rather than port) 2007-06-24 18:03:35 +00:00
Adam Frisby
372aca9b99 * Enabled sugilite fixes in trunk/GridManager.cs when fast mode is disabled 2007-06-24 17:49:14 +00:00
Adam Frisby
ffe0fc9bcc * Added extensions to trunk/OGS to support Sugilite regions. Anyone running a grid is highly advised to update before 1.18 hits on monday. 2007-06-24 17:43:05 +00:00
Adam Frisby
2fde703ebd * "create user" command now works with the MySQL Data Storage Engine on the userserver. 2007-06-24 14:36:08 +00:00
Adam Frisby
f3db36fc39 * Maintainence: Experimental console fix for Debian 2007-06-21 18:41:15 +00:00
lbsa71
e1ab1454a4 * Added 'LogFilename' attribute to simconfig.xml - in order to specify log name
* removed some greedy try-catch
* ignored some bins
2007-06-17 09:44:39 +00:00
22 changed files with 364 additions and 272 deletions

View File

@@ -108,9 +108,16 @@ namespace OpenSim.Framework.Console
Log.Flush();
if (!m_silent)
{
System.Console.ForegroundColor = color;
System.Console.WriteLine(format, args);
System.Console.ResetColor();
try
{
System.Console.ForegroundColor = color;
System.Console.WriteLine(format, args);
System.Console.ResetColor();
} // Because mono and old debian sucks.
catch (System.ArgumentNullException)
{
System.Console.WriteLine(format, args);
}
}
return;
}

View File

@@ -31,6 +31,7 @@ namespace Nwc.XmlRpc
using System.IO;
using System.Net.Sockets;
using System.Collections;
using System.Text;
///<summary>Very basic HTTP request handler.</summary>
///<remarks>This class is designed to accept a TcpClient and treat it as an HTTP request.
@@ -55,8 +56,10 @@ namespace Nwc.XmlRpc
public SimpleHttpRequest(TcpClient client)
{
_client = client;
_output = new StreamWriter(client.GetStream());
_input = new StreamReader(client.GetStream());
_output = new StreamWriter(client.GetStream() );
_input = new StreamReader(client.GetStream() );
GetRequestMethod();
GetRequestHeaders();
}

View File

@@ -56,7 +56,7 @@ namespace Nwc.XmlRpc
public class XmlRpcRequest
{
private String _methodName = null;
private Encoding _encoding = new ASCIIEncoding();
private Encoding _encoding = new UTF8Encoding();
private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer();
private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer();

View File

@@ -56,6 +56,7 @@ namespace Nwc.XmlRpc
override public Object Deserialize(TextReader xmlData)
{
XmlTextReader reader = new XmlTextReader(xmlData);
XmlRpcRequest request = new XmlRpcRequest();
bool done = false;

View File

@@ -30,6 +30,7 @@ namespace Nwc.XmlRpc
using System;
using System.Xml;
using System.Net.Sockets;
using System.Text;
/// <summary>The class is a container of the context of an XML-RPC dialog on the server side.</summary>
/// <remarks>Instances of this class maintain the context for an individual XML-RPC server
@@ -98,8 +99,9 @@ namespace Nwc.XmlRpc
if (Logger.Delegate != null)
Logger.WriteEntry(xmlRpcResp.ToString(), LogLevel.Information);
XmlRpcServer.HttpHeader(httpReq.Protocol, "text/xml", 0, " 200 OK", httpReq.Output);
XmlRpcServer.HttpHeader(httpReq.Protocol, "text/xml", 0, " 200 OK", httpReq.Output);
httpReq.Output.Flush();
XmlTextWriter xml = new XmlTextWriter(httpReq.Output);
_serializer.Serialize(xml, xmlRpcResp);
xml.Flush();

View File

@@ -31,6 +31,7 @@ namespace Nwc.XmlRpc
using System.Collections;
using System.IO;
using System.Xml;
using System.Text;
/// <summary>Base class of classes serializing data to XML-RPC's XML format.</summary>
/// <remarks>This class handles the basic type conversions like Integer to &lt;i4&gt;. </remarks>
@@ -53,15 +54,21 @@ namespace Nwc.XmlRpc
/// <seealso cref="XmlRpcRequest"/>
public String Serialize(Object obj)
{
StringWriter strBuf = new StringWriter();
XmlTextWriter xml = new XmlTextWriter(strBuf);
xml.Formatting = Formatting.Indented;
xml.Indentation = 4;
Serialize(xml, obj);
xml.Flush();
String returns = strBuf.ToString();
xml.Close();
return returns;
using (MemoryStream memStream = new MemoryStream(4096))
{
XmlTextWriter xml = new XmlTextWriter( memStream, null );
xml.Formatting = Formatting.Indented;
xml.Indentation = 4;
Serialize(xml, obj);
xml.Flush();
byte[] resultBytes = memStream.ToArray();
UTF8Encoding encoder = new UTF8Encoding();
String returns = encoder.GetString( resultBytes, 0, resultBytes.Length );
xml.Close();
return returns;
}
}
/// <remarks>Serialize the object to the output stream.</remarks>

View File

@@ -27,75 +27,65 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceManager", "OpenGridServices\ServiceManager\ServiceManager.csproj", "{E141F4EE-0000-0000-0000-000000000000}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({39BD9497-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({0A563AC1-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000})
({0F3C3AC1-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({1E3F341A-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({7924FD35-0000-0000-0000-000000000000})
({338FA00B-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -21,8 +21,8 @@
</lib>
<include name="../../../bin/Db4objects.Db4o.dll" />
<include name="../../../bin/libsecondlife.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="../../../bin/OpenSim.Framework.dll" />
<include name="../../../bin/OpenSim.Framework.Console.dll" />
<include name="System.dll" />
<include name="System.Data.dll.dll" />
<include name="System.Xml.dll" />

View File

@@ -513,6 +513,90 @@ namespace OpenGrid.Framework.Data.MySQL
return returnval;
}
/// <summary>
/// Creates a new user and inserts it into the database
/// </summary>
/// <param name="uuid">User ID</param>
/// <param name="username">First part of the login</param>
/// <param name="lastname">Second part of the login</param>
/// <param name="passwordHash">A salted hash of the users password</param>
/// <param name="passwordSalt">The salt used for the password hash</param>
/// <param name="homeRegion">A regionHandle of the users home region</param>
/// <param name="homeLocX">Home region position vector</param>
/// <param name="homeLocY">Home region position vector</param>
/// <param name="homeLocZ">Home region position vector</param>
/// <param name="homeLookAtX">Home region 'look at' vector</param>
/// <param name="homeLookAtY">Home region 'look at' vector</param>
/// <param name="homeLookAtZ">Home region 'look at' vector</param>
/// <param name="created">Account created (unix timestamp)</param>
/// <param name="lastlogin">Last login (unix timestamp)</param>
/// <param name="inventoryURI">Users inventory URI</param>
/// <param name="assetURI">Users asset URI</param>
/// <param name="canDoMask">I can do mask</param>
/// <param name="wantDoMask">I want to do mask</param>
/// <param name="aboutText">Profile text</param>
/// <param name="firstText">Firstlife text</param>
/// <param name="profileImage">UUID for profile image</param>
/// <param name="firstImage">UUID for firstlife image</param>
/// <returns>Success?</returns>
public bool insertUserRow(libsecondlife.LLUUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText,
libsecondlife.LLUUID profileImage, libsecondlife.LLUUID firstImage)
{
string sql = "INSERT INTO users (`UUID`, `username`, `lastname`, `passwordHash`, `passworldSalt`, `homeRegion`, ";
sql += "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, ";
sql += "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, ";
sql += "`profileFirstText`, `profileImage`, profileFirstImage`) VALUES ";
sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passworldSalt, ?homeRegion, ";
sql += "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX`, ?homeLookAtY, ?homeLookAtZ, ?created, ";
sql += "?lastLogin`, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, ";
sql += "?profileFirstText, ?profileImage, ?profileFirstImage)";
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["?UUID"] = uuid.ToStringHyphenated();
parameters["?username"] = username.ToString();
parameters["?lastname"] = lastname.ToString();
parameters["?passwordHash"] = passwordHash.ToString();
parameters["?passworldSalt"] = passwordSalt.ToString();
parameters["?homeRegion"] = homeRegion.ToString();
parameters["?homeLocationX"] = homeLocX.ToString();
parameters["?homeLocationY"] = homeLocY.ToString();
parameters["?homeLocationZ"] = homeLocZ.ToString();
parameters["?homeLookAtX"] = homeLookAtX.ToString();
parameters["?homeLookAtY"] = homeLookAtY.ToString();
parameters["?homeLookAtZ"] = homeLookAtZ.ToString();
parameters["?created"] = created.ToString();
parameters["?lastLogin"] = lastlogin.ToString();
parameters["?userInventoryURI"] = inventoryURI.ToString();
parameters["?userAssetURI"] = assetURI.ToString();
parameters["?profileCanDoMask"] = canDoMask.ToString();
parameters["?profileWantDoMask"] = wantDoMask.ToString();
parameters["?profileAboutText"] = aboutText.ToString();
parameters["?profileFirstText"] = firstText.ToString();
parameters["?profileImage"] = profileImage.ToStringHyphenated();
parameters["?profileFirstImage"] = firstImage.ToStringHyphenated();
bool returnval = false;
try
{
IDbCommand result = Query(sql, parameters);
if (result.ExecuteNonQuery() == 1)
returnval = true;
result.Dispose();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
return false;
}
return returnval;
}
/// <summary>
/// Inserts a new region into the database
/// </summary>

View File

@@ -200,6 +200,20 @@ namespace OpenGrid.Framework.Data.MySQL
/// <param name="user">The user profile to create</param>
public void addNewUserProfile(UserProfileData user)
{
try
{
lock (database)
{
database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z,
user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask,
user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage);
}
}
catch (Exception e)
{
database.Reconnect();
Console.WriteLine(e.ToString());
}
}
/// <summary>

View File

@@ -20,10 +20,10 @@
<include name="${project::get-base-directory()}/${build.dir}" />
</lib>
<include name="../../bin/libsecondlife.dll" />
<include name="OpenSim.Framework.dll.dll" />
<include name="OpenSim.Servers.dll.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.Servers.dll" />
<include name="System.dll" />
<include name="XMLRPC.dll" />
<include name="../../bin/XMLRPC.dll" />
</references>
</csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@@ -22,14 +22,14 @@
</lib>
<include name="../../bin/Db4objects.Db4o.dll" />
<include name="../../bin/libsecondlife.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="OpenSim.GridInterfaces.Local.dll" />
<include name="OpenSim.Servers.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.Framework.Console.dll" />
<include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
<include name="../../bin/OpenSim.Servers.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="XMLRPC.dll" />
<include name="../../bin/XMLRPC.dll" />
</references>
</csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@@ -360,6 +360,13 @@ namespace OpenGridServices.GridServer
simProfileBlock["agents"] = 1;
simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString();
// For Sugilite compatibility
simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString();
simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
simProfileList.Add(simProfileBlock);
}
OpenSim.Framework.Console.MainConsole.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode");
@@ -384,6 +391,13 @@ namespace OpenGridServices.GridServer
simProfileBlock["agents"] = 1;
simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
// For Sugilite compatibility
simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
simProfileList.Add(simProfileBlock);
}
}

View File

@@ -24,14 +24,14 @@
<include name="../../bin/libsecondlife.dll" />
<include name="../../bin/OpenGrid.Framework.Data.dll" />
<include name="../../bin/OpenGrid.Framework.Manager.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="OpenSim.GenericConfig.Xml.dll" />
<include name="OpenSim.Servers.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.Framework.Console.dll" />
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
<include name="../../bin/OpenSim.Servers.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="XMLRPC.dll" />
<include name="../../bin/XMLRPC.dll" />
</references>
</csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@@ -22,14 +22,14 @@
<include name="../../bin/Db4objects.Db4o.dll" />
<include name="../../bin/libsecondlife.dll" />
<include name="../../bin/OpenGrid.Framework.Data.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="OpenSim.GridInterfaces.Local.dll" />
<include name="OpenSim.Servers.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.Framework.Console.dll" />
<include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
<include name="../../bin/OpenSim.Servers.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="XMLRPC.dll" />
<include name="../../bin/XMLRPC.dll" />
</references>
</csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@@ -23,14 +23,14 @@
<include name="../../bin/Db4objects.Db4o.dll" />
<include name="../../bin/libsecondlife.dll" />
<include name="../../bin/OpenGrid.Framework.Data.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="OpenSim.GenericConfig.Xml.dll" />
<include name="OpenSim.Servers.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.Framework.Console.dll" />
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
<include name="../../bin/OpenSim.Servers.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="XMLRPC.dll" />
<include name="../../bin/XMLRPC.dll" />
</references>
</csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@@ -355,6 +355,7 @@ namespace OpenGridServices.UserServer
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
ArrayList SendParams = new ArrayList();
SendParams.Add(SimParams);

View File

@@ -21,8 +21,8 @@
</lib>
<include name="../../../bin/Db4objects.Db4o.dll" />
<include name="../../../bin/libsecondlife.dll" />
<include name="OpenSim.Framework.dll" />
<include name="OpenSim.Framework.Console.dll" />
<include name="../../../bin/OpenSim.Framework.dll" />
<include name="../../../bin/OpenSim.Framework.Console.dll" />
<include name="System.dll" />
<include name="System.Data.dll.dll" />
<include name="System.Xml.dll" />

View File

@@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@@ -6,7 +6,8 @@
<ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>ServiceManager</AssemblyName>
@@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>ServiceManager</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -55,30 +61,31 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Framework.dll" >
<Reference Include="OpenSim.Framework.dll">
<HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.GenericConfig.Xml" >
<Reference Include="OpenSim.GenericConfig.Xml">
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.ServiceProcess" >
<Reference Include="System.ServiceProcess">
<HintPath>System.ServiceProcess.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
@@ -87,7 +94,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ServiceManager.cs">
<SubType>Code</SubType>
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
@@ -97,4 +104,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@@ -19,8 +19,8 @@
<include name="${project::get-base-directory()}/${build.dir}" />
</lib>
<include name="../../bin/libsecondlife.dll" />
<include name="OpenSim.Framework.dll.dll" />
<include name="OpenSim.GenericConfig.Xml.dll" />
<include name="../../bin/OpenSim.Framework.dll" />
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
<include name="System.dll" />
<include name="System.ServiceProcess.dll" />
<include name="System.Xml.dll" />

View File

@@ -37,124 +37,85 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({438A9556-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).5 = ({E88EF749-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).6 = ({8BE16150-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).7 = ({632E1BFD-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).9 = ({2270B8FE-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).12 = ({8E81D43C-0000-0000-0000-000000000000})
({8ACA2445-0000-0000-0000-000000000000}).4 = ({8E81D43C-0000-0000-0000-000000000000})
({E88EF749-0000-0000-0000-000000000000}).0 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({4F874463-0000-0000-0000-000000000000}).1 = ({8BE16150-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({988F0AC4-0000-0000-0000-000000000000}).1 = ({8BE16150-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).5 = ({E88EF749-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8BE16150-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).7 = ({8BB20F0A-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).8 = ({2270B8FE-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).11 = ({8E81D43C-0000-0000-0000-000000000000})
({97A82740-0000-0000-0000-000000000000}).0 = ({8ACA2445-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -84,21 +84,18 @@ namespace OpenSim.Physics.OdePlugin
public OdeScene()
{
contact.surface.mode = d.ContactFlags.Bounce | d.ContactFlags.SoftCFM;
contact.surface.mu = d.Infinity;
contact.surface.mu2 = 0.0f;
contact.surface.bounce = 0.1f;
contact.surface.bounce_vel = 0.1f;
contact.surface.soft_cfm = 0.01f;
contact.surface.mode |= d.ContactFlags.Approx1 | d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP;
contact.surface.mu = 10.0f;
contact.surface.bounce = 0.9f;
contact.surface.soft_erp = 0.005f;
contact.surface.soft_cfm = 0.00003f;
world = d.WorldCreate();
space = d.HashSpaceCreate(IntPtr.Zero);
contactgroup = d.JointGroupCreate(0);
d.WorldSetGravity(world, 0.0f, 0.0f, -0.5f);
//d.WorldSetCFM(world, 1e-5f);
d.WorldSetGravity(world, 0.0f, 0.0f, -10.0f);
d.WorldSetAutoDisableFlag(world, false);
d.WorldSetContactSurfaceLayer(world, 0.001f);
// d.CreatePlane(space, 0, 0, 1, 0);
this._heightmap = new double[65536];
}
@@ -153,16 +150,19 @@ namespace OpenSim.Physics.OdePlugin
{
foreach (OdeCharacter actor in _characters)
{
actor.Move(timeStep * 5f);
actor.Move(timeStep);
}
d.SpaceCollide(space, IntPtr.Zero, nearCallback);
d.WorldQuickStep(world, timeStep * 5f);
for (int i = 0; i < 50; i++)
{
d.WorldQuickStep(world, timeStep * 0.02f);
}
d.JointGroupEmpty(contactgroup);
foreach (OdeCharacter actor in _characters)
{
actor.UpdatePosition();
}
}
public override void GetResults()
@@ -220,7 +220,7 @@ namespace OpenSim.Physics.OdePlugin
private PhysicsVector _position;
private PhysicsVector _velocity;
private PhysicsVector _acceleration;
private bool flying;
private bool flying = false;
//private float gravityAccel;
private IntPtr BoundingCapsule;
IntPtr capsule_geom;
@@ -231,8 +231,8 @@ namespace OpenSim.Physics.OdePlugin
_velocity = new PhysicsVector();
_position = pos;
_acceleration = new PhysicsVector();
d.MassSetCapsule(out capsule_mass, 5.0f, 3, 0.5f, 2f);
capsule_geom = d.CreateCapsule(OdeScene.space, 0.5f, 2f);
d.MassSetCapsule(out capsule_mass, 50.0f, 3, 0.5f, 2f);
capsule_geom = d.CreateSphere(OdeScene.space, 1.0f); /// not a typo! Spheres roll, capsules tumble
this.BoundingCapsule = d.BodyCreate(OdeScene.world);
d.BodySetMass(BoundingCapsule, ref capsule_mass);
d.BodySetPosition(BoundingCapsule, pos.X, pos.Y, pos.Z);
@@ -325,13 +325,14 @@ namespace OpenSim.Physics.OdePlugin
public void Move(float timeStep)
{
PhysicsVector vec = new PhysicsVector();
vec.X = this._velocity.X * timeStep;
vec.Y = this._velocity.Y * timeStep;
d.Vector3 vel = d.BodyGetLinearVel(BoundingCapsule);
vec.X = (vel.X - this._velocity.X) * -75000.0f;
vec.Y = (vel.Y - this._velocity.Y) * -75000.0f;
if (flying)
{
vec.Z = (this._velocity.Z + 0.5f) * timeStep;
vec.Z = (vel.Z - this._velocity.Z) * -75000.0f;
}
d.BodySetLinearVel(this.BoundingCapsule, vec.X, vec.Y, vec.Z);
d.BodyAddForce(this.BoundingCapsule, vec.X, vec.Y, vec.Z);
}
public void UpdatePosition()
@@ -339,7 +340,7 @@ namespace OpenSim.Physics.OdePlugin
d.Vector3 vec = d.BodyGetPosition(BoundingCapsule);
this._position.X = vec.X;
this._position.Y = vec.Y;
this._position.Z = vec.Z+1.0f;
this._position.Z = vec.Z;
}
}