Minor formatting cleanup.
parent
c4641d7005
commit
a2b1a1787d
|
@ -91,7 +91,9 @@ namespace OpenSim.Data.NHibernate
|
||||||
{
|
{
|
||||||
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
|
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
|
||||||
}
|
}
|
||||||
catch (Exception) {}
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
return (user != null);
|
return (user != null);
|
||||||
}
|
}
|
||||||
|
@ -161,10 +163,13 @@ namespace OpenSim.Data.NHibernate
|
||||||
{
|
{
|
||||||
UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData;
|
UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData;
|
||||||
|
|
||||||
if (old == null) {
|
if (old == null)
|
||||||
|
{
|
||||||
session.Save(agent);
|
session.Save(agent);
|
||||||
session.Transaction.Commit();
|
session.Transaction.Commit();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
UpdateUserAgent(agent);
|
UpdateUserAgent(agent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,13 +240,13 @@ namespace OpenSim.Data.NHibernate
|
||||||
|
|
||||||
// TODO: actually implement these
|
// TODO: actually implement these
|
||||||
public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; }
|
public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; }
|
||||||
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;}
|
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) { return; }
|
||||||
public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) {return;}
|
public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { return; }
|
||||||
public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) {return;}
|
public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { return; }
|
||||||
public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) {return;}
|
public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) { return; }
|
||||||
public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) {return new List<FriendListItem>();}
|
public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) { return new List<FriendListItem>(); }
|
||||||
public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) {return true;}
|
public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return true; }
|
||||||
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) {return true;}
|
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) { return true; }
|
||||||
|
|
||||||
/// Appearance
|
/// Appearance
|
||||||
/// TODO: stubs for now to get us to a compiling state gently
|
/// TODO: stubs for now to get us to a compiling state gently
|
||||||
|
|
|
@ -470,7 +470,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks to see height deltas in the tainted terrain patch at xStart ,yStart
|
/// Checks to see height deltas in the tainted terrain patch at xStart ,yStart
|
||||||
/// are all within the current estate limits
|
/// are all within the current estate limits
|
||||||
|
@ -493,7 +492,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
double bakedHeight = m_revert[x, y];
|
double bakedHeight = m_revert[x, y];
|
||||||
double requestedDelta = requestedHeight - bakedHeight;
|
double requestedDelta = requestedHeight - bakedHeight;
|
||||||
|
|
||||||
if (requestedDelta > maxDelta )
|
if (requestedDelta > maxDelta)
|
||||||
{
|
{
|
||||||
m_channel[x, y] = bakedHeight + maxDelta;
|
m_channel[x, y] = bakedHeight + maxDelta;
|
||||||
changesLimited = true;
|
changesLimited = true;
|
||||||
|
@ -509,7 +508,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
return changesLimited;
|
return changesLimited;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends a copy of the current terrain to the scenes clients
|
/// Sends a copy of the current terrain to the scenes clients
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -589,7 +587,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Console Commands
|
#region Console Commands
|
||||||
|
|
||||||
private void InterfaceLoadFile(Object[] args)
|
private void InterfaceLoadFile(Object[] args)
|
||||||
|
|
|
@ -849,7 +849,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected internal List<EntityBase> GetEntities()
|
protected internal List<EntityBase> GetEntities()
|
||||||
{
|
{
|
||||||
lock(Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
if (0 == Entities.Count) return null;
|
if (0 == Entities.Count) return null;
|
||||||
return new List<EntityBase>(Entities.Values);
|
return new List<EntityBase>(Entities.Values);
|
||||||
|
|
|
@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId);
|
TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId);
|
||||||
|
|
||||||
if(srcTaskItem == null)
|
if (srcTaskItem == null)
|
||||||
{
|
{
|
||||||
// error was already logged
|
// error was already logged
|
||||||
return;
|
return;
|
||||||
|
@ -993,7 +993,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
SceneObjectPart destPart = GetSceneObjectPart(destId);
|
SceneObjectPart destPart = GetSceneObjectPart(destId);
|
||||||
|
|
||||||
if(destPart == null)
|
if (destPart == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[PRIM INVENTORY]: " +
|
"[PRIM INVENTORY]: " +
|
||||||
|
@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask;
|
destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask;
|
||||||
destTaskItem.Flags = srcTaskItem.Flags;
|
destTaskItem.Flags = srcTaskItem.Flags;
|
||||||
|
|
||||||
if(destPart.OwnerID != part.OwnerID)
|
if (destPart.OwnerID != part.OwnerID)
|
||||||
{
|
{
|
||||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||||
{
|
{
|
||||||
|
@ -1042,7 +1042,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
destPart.AddInventoryItem(destTaskItem);
|
destPart.AddInventoryItem(destTaskItem);
|
||||||
|
|
||||||
if((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
|
if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
|
||||||
part.RemoveInventoryItem(itemId);
|
part.RemoveInventoryItem(itemId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if SPAM
|
#if SPAM
|
||||||
System.Console.WriteLine( "reverting to geodesic sphere for prim: " + primName );
|
System.Console.WriteLine("reverting to geodesic sphere for prim: " + primName);
|
||||||
#endif
|
#endif
|
||||||
return CreateSphereMesh(primName, primShape, size);
|
return CreateSphereMesh(primName, primShape, size);
|
||||||
}
|
}
|
||||||
|
@ -1802,10 +1802,13 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
#if SPAM
|
#if SPAM
|
||||||
int vCount = 0;
|
int vCount = 0;
|
||||||
|
|
||||||
foreach ( Vertex v in result.vertices )
|
foreach (Vertex v in result.vertices)
|
||||||
if ( v != null )
|
{
|
||||||
|
if (v != null)
|
||||||
vCount++;
|
vCount++;
|
||||||
System.Console.WriteLine( "Mesh vertex count: " + vCount.ToString());
|
}
|
||||||
|
|
||||||
|
System.Console.WriteLine("Mesh vertex count: " + vCount.ToString());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -1773,15 +1773,16 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Finished with all sim stepping. If requested, dump world state to file for debugging.
|
// Finished with all sim stepping. If requested, dump world state to file for debugging.
|
||||||
// TODO: This call to the export function is already inside lock(OdeLock) - but is an extra lock needed?
|
// TODO: This call to the export function is already inside lock (OdeLock) - but is an extra lock needed?
|
||||||
// TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots?
|
// TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots?
|
||||||
if(physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0) ) {
|
if (physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0))
|
||||||
|
{
|
||||||
string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename
|
string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename
|
||||||
string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file
|
string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file
|
||||||
|
|
||||||
if(physics_logging_append_existing_logfile) {
|
if (physics_logging_append_existing_logfile)
|
||||||
|
{
|
||||||
string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------";
|
string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------";
|
||||||
TextWriter fwriter = File.AppendText(fname);
|
TextWriter fwriter = File.AppendText(fname);
|
||||||
fwriter.WriteLine(header);
|
fwriter.WriteLine(header);
|
||||||
|
|
|
@ -2701,7 +2701,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
LLUUID destId = LLUUID.Zero;
|
LLUUID destId = LLUUID.Zero;
|
||||||
LLUUID objId = LLUUID.Zero;
|
LLUUID objId = LLUUID.Zero;
|
||||||
|
|
||||||
if(!LLUUID.TryParse(destination, out destId))
|
if (!LLUUID.TryParse(destination, out destId))
|
||||||
{
|
{
|
||||||
llSay(0, "Could not parse key " + destination);
|
llSay(0, "Could not parse key " + destination);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public string[] GetApis()
|
public string[] GetApis()
|
||||||
{
|
{
|
||||||
if(m_Apis.Count > 0)
|
if (m_Apis.Count > 0)
|
||||||
{
|
{
|
||||||
List<string> l = new List<string>(m_Apis.Keys);
|
List<string> l = new List<string>(m_Apis.Keys);
|
||||||
return l.ToArray();
|
return l.ToArray();
|
||||||
|
@ -53,10 +53,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
string name = t.ToString();
|
string name = t.ToString();
|
||||||
int idx = name.LastIndexOf('.');
|
int idx = name.LastIndexOf('.');
|
||||||
if(idx != -1)
|
if (idx != -1)
|
||||||
name = name.Substring(idx+1);
|
name = name.Substring(idx+1);
|
||||||
|
|
||||||
if(name.EndsWith("_Api"))
|
if (name.EndsWith("_Api"))
|
||||||
{
|
{
|
||||||
name = name.Substring(0, name.Length - 4);
|
name = name.Substring(0, name.Length - 4);
|
||||||
m_Apis[name] = t;
|
m_Apis[name] = t;
|
||||||
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public IScriptApi CreateApi(string api)
|
public IScriptApi CreateApi(string api)
|
||||||
{
|
{
|
||||||
if(!m_Apis.ContainsKey(api))
|
if (!m_Apis.ContainsKey(api))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api]));
|
IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api]));
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public AsyncCommandManager(IScriptEngine _ScriptEngine)
|
public AsyncCommandManager(IScriptEngine _ScriptEngine)
|
||||||
{
|
{
|
||||||
m_ScriptEngine = _ScriptEngine;
|
m_ScriptEngine = _ScriptEngine;
|
||||||
if(!m_Managers.Contains(this))
|
if (!m_Managers.Contains(this))
|
||||||
m_Managers.Add(this);
|
m_Managers.Add(this);
|
||||||
|
|
||||||
ReadConfig();
|
ReadConfig();
|
||||||
|
|
|
@ -2553,7 +2553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
LLUUID destId = LLUUID.Zero;
|
LLUUID destId = LLUUID.Zero;
|
||||||
LLUUID objId = LLUUID.Zero;
|
LLUUID objId = LLUUID.Zero;
|
||||||
|
|
||||||
if(!LLUUID.TryParse(destination, out destId))
|
if (!LLUUID.TryParse(destination, out destId))
|
||||||
{
|
{
|
||||||
llSay(0, "Could not parse key " + destination);
|
llSay(0, "Could not parse key " + destination);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
|
|
||||||
public void ApiTypeLSL(IScriptApi api)
|
public void ApiTypeLSL(IScriptApi api)
|
||||||
{
|
{
|
||||||
if(!(api is ILSL_Api))
|
if (!(api is ILSL_Api))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_LSL_Functions = (ILSL_Api)api;
|
m_LSL_Functions = (ILSL_Api)api;
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
|
|
||||||
public void ApiTypeOSSL(IScriptApi api)
|
public void ApiTypeOSSL(IScriptApi api)
|
||||||
{
|
{
|
||||||
if(!(api is IOSSL_Api))
|
if (!(api is IOSSL_Api))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_OSSL_Functions = (IOSSL_Api)api;
|
m_OSSL_Functions = (IOSSL_Api)api;
|
||||||
|
|
|
@ -44,9 +44,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance);
|
MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance);
|
||||||
|
|
||||||
foreach(MethodInfo mi in myArrayMethodInfo)
|
foreach (MethodInfo mi in myArrayMethodInfo)
|
||||||
{
|
{
|
||||||
if(mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType")
|
if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType")
|
||||||
{
|
{
|
||||||
string type=mi.Name.Substring(7);
|
string type=mi.Name.Substring(7);
|
||||||
inits[type]=mi;
|
inits[type]=mi;
|
||||||
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
|
|
||||||
public void InitApi(string api, IScriptApi data)
|
public void InitApi(string api, IScriptApi data)
|
||||||
{
|
{
|
||||||
if(!inits.ContainsKey(api))
|
if (!inits.ContainsKey(api))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MethodInfo mi = inits[api];
|
MethodInfo mi = inits[api];
|
||||||
|
|
|
@ -1476,7 +1476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
|
|
||||||
public override bool Equals(Object o)
|
public override bool Equals(Object o)
|
||||||
{
|
{
|
||||||
if(!(o is LSLFloat))
|
if (!(o is LSLFloat))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return value == ((LSLFloat)o).value;
|
return value == ((LSLFloat)o).value;
|
||||||
|
|
Loading…
Reference in New Issue