Minor formatting cleanup.

0.6.0-stable
Jeff Ames 2008-06-25 14:30:28 +00:00
parent c4641d7005
commit a2b1a1787d
15 changed files with 149 additions and 143 deletions

View File

@ -91,7 +91,9 @@ namespace OpenSim.Data.NHibernate
{
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
}
catch (Exception) {}
catch (Exception)
{
}
return (user != null);
}
@ -161,10 +163,13 @@ namespace OpenSim.Data.NHibernate
{
UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData;
if (old == null) {
if (old == null)
{
session.Save(agent);
session.Transaction.Commit();
} else {
}
else
{
UpdateUserAgent(agent);
}
}
@ -235,13 +240,13 @@ namespace OpenSim.Data.NHibernate
// TODO: actually implement these
public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; }
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;}
public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) {return;}
public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) {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 bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) {return true;}
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) {return true;}
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) { return; }
public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { return; }
public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { 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 bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return true; }
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) { return true; }
/// Appearance
/// TODO: stubs for now to get us to a compiling state gently

View File

@ -470,7 +470,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
}
}
/// <summary>
/// Checks to see height deltas in the tainted terrain patch at xStart ,yStart
/// 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 requestedDelta = requestedHeight - bakedHeight;
if (requestedDelta > maxDelta )
if (requestedDelta > maxDelta)
{
m_channel[x, y] = bakedHeight + maxDelta;
changesLimited = true;
@ -509,7 +508,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
return changesLimited;
}
/// <summary>
/// Sends a copy of the current terrain to the scenes clients
/// </summary>
@ -589,7 +587,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
}
}
#region Console Commands
private void InterfaceLoadFile(Object[] args)

View File

@ -849,7 +849,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <returns></returns>
protected internal List<EntityBase> GetEntities()
{
lock(Entities)
lock (Entities)
{
if (0 == Entities.Count) return null;
return new List<EntityBase>(Entities.Values);

View File

@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Scenes
{
TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId);
if(srcTaskItem == null)
if (srcTaskItem == null)
{
// error was already logged
return;
@ -993,7 +993,7 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart destPart = GetSceneObjectPart(destId);
if(destPart == null)
if (destPart == null)
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Environment.Scenes
destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask;
destTaskItem.Flags = srcTaskItem.Flags;
if(destPart.OwnerID != part.OwnerID)
if (destPart.OwnerID != part.OwnerID)
{
if (ExternalChecks.ExternalChecksPropagatePermissions())
{
@ -1042,7 +1042,7 @@ namespace OpenSim.Region.Environment.Scenes
destPart.AddInventoryItem(destTaskItem);
if((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
part.RemoveInventoryItem(itemId);
}

View File

@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Physics.Meshing
)
{
#if SPAM
System.Console.WriteLine( "reverting to geodesic sphere for prim: " + primName );
System.Console.WriteLine("reverting to geodesic sphere for prim: " + primName);
#endif
return CreateSphereMesh(primName, primShape, size);
}
@ -1802,10 +1802,13 @@ namespace OpenSim.Region.Physics.Meshing
#if SPAM
int vCount = 0;
foreach ( Vertex v in result.vertices )
if ( v != null )
foreach (Vertex v in result.vertices)
{
if (v != null)
vCount++;
System.Console.WriteLine( "Mesh vertex count: " + vCount.ToString());
}
System.Console.WriteLine("Mesh vertex count: " + vCount.ToString());
#endif
return result;

View File

@ -1773,15 +1773,16 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
// 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?
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 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() + " --------------";
TextWriter fwriter = File.AppendText(fname);
fwriter.WriteLine(header);

View File

@ -2701,7 +2701,7 @@ namespace OpenSim.Region.ScriptEngine.Common
LLUUID destId = 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);
return;

View File

@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public string[] GetApis()
{
if(m_Apis.Count > 0)
if (m_Apis.Count > 0)
{
List<string> l = new List<string>(m_Apis.Keys);
return l.ToArray();
@ -53,10 +53,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
string name = t.ToString();
int idx = name.LastIndexOf('.');
if(idx != -1)
if (idx != -1)
name = name.Substring(idx+1);
if(name.EndsWith("_Api"))
if (name.EndsWith("_Api"))
{
name = name.Substring(0, name.Length - 4);
m_Apis[name] = t;
@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public IScriptApi CreateApi(string api)
{
if(!m_Apis.ContainsKey(api))
if (!m_Apis.ContainsKey(api))
return null;
IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api]));

View File

@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public AsyncCommandManager(IScriptEngine _ScriptEngine)
{
m_ScriptEngine = _ScriptEngine;
if(!m_Managers.Contains(this))
if (!m_Managers.Contains(this))
m_Managers.Add(this);
ReadConfig();

View File

@ -2553,7 +2553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LLUUID destId = 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);
return;

View File

@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public void ApiTypeLSL(IScriptApi api)
{
if(!(api is ILSL_Api))
if (!(api is ILSL_Api))
return;
m_LSL_Functions = (ILSL_Api)api;

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public void ApiTypeOSSL(IScriptApi api)
{
if(!(api is IOSSL_Api))
if (!(api is IOSSL_Api))
return;
m_OSSL_Functions = (IOSSL_Api)api;

View File

@ -44,9 +44,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
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);
inits[type]=mi;
@ -63,7 +63,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public void InitApi(string api, IScriptApi data)
{
if(!inits.ContainsKey(api))
if (!inits.ContainsKey(api))
return;
MethodInfo mi = inits[api];

View File

@ -1476,7 +1476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
public override bool Equals(Object o)
{
if(!(o is LSLFloat))
if (!(o is LSLFloat))
return false;
return value == ((LSLFloat)o).value;