mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
cosmetics
This commit is contained in:
@@ -659,12 +659,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected internal void AddPhysicalPrim(int number)
|
||||
{
|
||||
m_physicalPrim += number;
|
||||
Interlocked.Add(ref m_physicalPrim, number);
|
||||
}
|
||||
|
||||
protected internal void RemovePhysicalPrim(int number)
|
||||
{
|
||||
m_physicalPrim -= number;
|
||||
Interlocked.Add(ref m_physicalPrim, -number);
|
||||
}
|
||||
|
||||
protected internal void AddToScriptLPS(int number)
|
||||
@@ -674,7 +674,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected internal void AddActiveScripts(int number)
|
||||
{
|
||||
m_activeScripts += number;
|
||||
Interlocked.Add(ref m_activeScripts, number);
|
||||
}
|
||||
|
||||
protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
}
|
||||
public virtual bool ErrorIsZero(Vector3 err)
|
||||
{
|
||||
return (err == Vector3.Zero || err.ApproxEquals(Vector3.Zero, ErrorZeroThreshold));
|
||||
return err.ApproxZero(ErrorZeroThreshold);
|
||||
}
|
||||
|
||||
public BSVMotor(string useName)
|
||||
|
||||
@@ -129,26 +129,24 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
|
||||
|
||||
public void AddCollider(uint localID, ContactPoint contact)
|
||||
{
|
||||
if (!m_objCollisionList.ContainsKey(localID))
|
||||
{
|
||||
m_objCollisionList.Add(localID, contact);
|
||||
}
|
||||
else
|
||||
if (m_objCollisionList.ContainsKey(localID))
|
||||
{
|
||||
float lastVel = m_objCollisionList[localID].RelativeSpeed;
|
||||
if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth)
|
||||
{
|
||||
if(Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed))
|
||||
if (Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed))
|
||||
contact.RelativeSpeed = lastVel;
|
||||
m_objCollisionList[localID] = contact;
|
||||
}
|
||||
else if(Math.Abs(lastVel) < Math.Abs(contact.RelativeSpeed))
|
||||
else if (Math.Abs(lastVel) < Math.Abs(contact.RelativeSpeed))
|
||||
{
|
||||
ContactPoint tmp = m_objCollisionList[localID];
|
||||
tmp.RelativeSpeed = contact.RelativeSpeed;
|
||||
m_objCollisionList[localID] = tmp;
|
||||
}
|
||||
}
|
||||
else
|
||||
m_objCollisionList.Add(localID, contact);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Server.Handlers.Grid
|
||||
|
||||
/// <summary>
|
||||
/// Get GridInfo in json format: Used by the OSSL osGetGrid*
|
||||
/// Adding the SRV_HomeIRI to the kvp returned for use in scripts
|
||||
/// Adding the SRV_HomeURI to the kvp returned for use in scripts
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// json string
|
||||
|
||||
@@ -198,26 +198,31 @@ namespace OpenSim.Server.Handlers.Login
|
||||
if (request.Type == OSDType.Map)
|
||||
{
|
||||
OSDMap map = (OSDMap)request;
|
||||
|
||||
if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd"))
|
||||
if (map.TryGetValue("first", out OSD ofirst) &&
|
||||
map.TryGetValue("last", out OSD olast) &&
|
||||
map.TryGetValue("passwd", out OSD opass))
|
||||
{
|
||||
string startLocation = string.Empty;
|
||||
string first = ofirst.AsString();
|
||||
string last = olast.AsString();
|
||||
string passwd = opass.AsString();
|
||||
|
||||
if (map.ContainsKey("start"))
|
||||
startLocation = map["start"].AsString();
|
||||
string startLocation = string.Empty;
|
||||
OSD otmp;
|
||||
if (map.TryGetValue("start", out otmp))
|
||||
startLocation = otmp.AsString();
|
||||
|
||||
UUID scopeID = UUID.Zero;
|
||||
|
||||
if (map.ContainsKey("scope_id"))
|
||||
scopeID = new UUID(map["scope_id"].AsString());
|
||||
if (map.TryGetValue("scope_id", out otmp))
|
||||
scopeID = new UUID(otmp.AsString());
|
||||
|
||||
m_log.Info("[LOGIN]: LLSD Login Requested for: '" + map["first"].AsString() + "' '" + map["last"].AsString() + "' / " + startLocation);
|
||||
m_log.Info("[LOGIN]: LLSD Login Requested for: '" + first + "' '" + last + "' / " + startLocation);
|
||||
|
||||
LoginResponse reply = null;
|
||||
reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID,
|
||||
map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient);
|
||||
reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID,
|
||||
map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(),
|
||||
map["id0"].AsString(), remoteClient);
|
||||
return reply.ToOSDMap();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,11 +146,9 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||
source.RawServerURI = null;
|
||||
}
|
||||
|
||||
OSDMap resp = new OSDMap(2);
|
||||
string reason = string.Empty;
|
||||
|
||||
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason);
|
||||
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out string reason);
|
||||
|
||||
OSDMap resp = new OSDMap(3);
|
||||
resp["reason"] = OSD.FromString(reason);
|
||||
resp["success"] = OSD.FromBoolean(result);
|
||||
// Let's also send out the IP address of the caller back to the caller (HG 1.5)
|
||||
|
||||
Reference in New Issue
Block a user