Formatting cleanup.

0.6.0-stable
Jeff Ames 2008-05-14 05:11:23 +00:00
parent eff470c0de
commit c995d60d37
62 changed files with 283 additions and 291 deletions

View File

@ -117,7 +117,7 @@ namespace OpenSim.Data.Base
return m_source.GetGuid(m_source.GetOrdinal(name)); return m_source.GetGuid(m_source.GetOrdinal(name));
} }
public UInt32 GetUInt32(string name ) public UInt32 GetUInt32(string name)
{ {
return (UInt32)GetInt32(name); return (UInt32)GetInt32(name);
} }
@ -129,9 +129,9 @@ namespace OpenSim.Data.Base
return int32; return int32;
} }
public Int64 GetInt64(string name) public Int64 GetInt64(string name)
{ {
int ordinal = m_source.GetOrdinal( name ); int ordinal = m_source.GetOrdinal(name);
long int64 = m_source.GetInt64(ordinal); long int64 = m_source.GetInt64(ordinal);
return int64; return int64;
} }

View File

@ -125,7 +125,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by TryGetValue(). // HACK: This is a temporary function used by TryGetValue().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain // Due to a bug in mono 1.2.6, delegate blocks cannot contain
// a using() block. This has been fixed in SVN, so the next // a using block. This has been fixed in SVN, so the next
// mono release should work. // mono release should work.
private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success) private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success)
{ {
@ -137,7 +137,7 @@ namespace OpenSim.Data.Base
{ {
if (reader.Read()) if (reader.Read())
{ {
result = FromReader( CreateReader(reader)); result = FromReader(CreateReader(reader));
success = true; success = true;
} }
else else
@ -165,7 +165,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Remove(). // HACK: This is a temporary function used by Remove().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain // Due to a bug in mono 1.2.6, delegate blocks cannot contain
// a using() block. This has been fixed in SVN, so the next // a using block. This has been fixed in SVN, so the next
// mono release should work. // mono release should work.
protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted) protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted)
{ {
@ -215,7 +215,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Update(). // HACK: This is a temporary function used by Update().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain // Due to a bug in mono 1.2.6, delegate blocks cannot contain
// a using() block. This has been fixed in SVN, so the next // a using block. This has been fixed in SVN, so the next
// mono release should work. // mono release should work.
protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated) protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated)
{ {
@ -246,7 +246,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Add(). // HACK: This is a temporary function used by Add().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain // Due to a bug in mono 1.2.6, delegate blocks cannot contain
// a using() block. This has been fixed in SVN, so the next // a using block. This has been fixed in SVN, so the next
// mono release should work. // mono release should work.
protected void TryAdd(DbConnection connection, TRowMapper value, ref int added) protected void TryAdd(DbConnection connection, TRowMapper value, ref int added)
{ {

View File

@ -46,7 +46,7 @@ namespace OpenSim.Data.MSSQLMapper
public override object ConvertToDbType(object value) public override object ConvertToDbType(object value)
{ {
if( value is UInt32 ) if (value is UInt32)
{ {
UInt32 tmpVal = (UInt32) value; UInt32 tmpVal = (UInt32) value;
Int64 result = Convert.ToInt64(tmpVal); Int64 result = Convert.ToInt64(tmpVal);

View File

@ -512,7 +512,7 @@ namespace OpenSim.Data.MySQL
retval.FirstLifeImage = tmp; retval.FirstLifeImage = tmp;
} }
if(reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
{ {
retval.WebLoginKey = LLUUID.Zero; retval.WebLoginKey = LLUUID.Zero;
} }

View File

@ -69,7 +69,7 @@ namespace OpenSim.Data.MySQL
string settingPort = iniFile.ParseFileReadValue("port"); string settingPort = iniFile.ParseFileReadValue("port");
m_usersTableName = iniFile.ParseFileReadValue("userstablename"); m_usersTableName = iniFile.ParseFileReadValue("userstablename");
if( m_usersTableName == null ) if (m_usersTableName == null)
{ {
m_usersTableName = "users"; m_usersTableName = "users";
} }

View File

@ -52,7 +52,7 @@ namespace OpenSim.Data.MySQLMapper
public override BaseDataReader CreateReader(IDataReader reader) public override BaseDataReader CreateReader(IDataReader reader)
{ {
return new MySQLDataReader( reader ); return new MySQLDataReader(reader);
} }
} }
} }

View File

@ -97,14 +97,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: Assets"; string regex = @"no such table: Assets";
Regex RE = new Regex(regex, RegexOptions.Multiline); Regex RE = new Regex(regex, RegexOptions.Multiline);
try { try {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
session.Load(typeof(AssetBase), LLUUID.Zero); session.Load(typeof(AssetBase), LLUUID.Zero);
} }
} catch (ObjectNotFoundException) { } catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok // yes, we know it's not there, but that's ok
} catch (ADOException e) { } catch (ADOException e) {
Match m = RE.Match(e.ToString()); Match m = RE.Match(e.ToString());
if(m.Success) { if (m.Success) {
// We don't have this table, so create it. // We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true); new SchemaExport(cfg).Create(true, true);
} }
@ -113,7 +113,7 @@ namespace OpenSim.Data.NHibernate
override public AssetBase FetchAsset(LLUUID uuid) override public AssetBase FetchAsset(LLUUID uuid)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
try { try {
return session.Load(typeof(AssetBase), uuid) as AssetBase; return session.Load(typeof(AssetBase), uuid) as AssetBase;
} catch { } catch {
@ -125,8 +125,8 @@ namespace OpenSim.Data.NHibernate
override public void CreateAsset(AssetBase asset) override public void CreateAsset(AssetBase asset)
{ {
if (!ExistsAsset(asset.FullID)) { if (!ExistsAsset(asset.FullID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Save(asset); session.Save(asset);
transaction.Commit(); transaction.Commit();
} }
@ -137,8 +137,8 @@ namespace OpenSim.Data.NHibernate
override public void UpdateAsset(AssetBase asset) override public void UpdateAsset(AssetBase asset)
{ {
if (ExistsAsset(asset.FullID)) { if (ExistsAsset(asset.FullID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Update(asset); session.Update(asset);
transaction.Commit(); transaction.Commit();
} }

View File

@ -95,14 +95,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: Inventory"; string regex = @"no such table: Inventory";
Regex RE = new Regex(regex, RegexOptions.Multiline); Regex RE = new Regex(regex, RegexOptions.Multiline);
try { try {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
session.Load(typeof(InventoryItemBase), LLUUID.Zero); session.Load(typeof(InventoryItemBase), LLUUID.Zero);
} }
} catch (ObjectNotFoundException) { } catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok // yes, we know it's not there, but that's ok
} catch (ADOException e) { } catch (ADOException e) {
Match m = RE.Match(e.ToString()); Match m = RE.Match(e.ToString());
if(m.Success) { if (m.Success) {
// We don't have this table, so create it. // We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true); new SchemaExport(cfg).Create(true, true);
} }
@ -125,7 +125,7 @@ namespace OpenSim.Data.NHibernate
/// <returns>A class containing item information</returns> /// <returns>A class containing item information</returns>
public InventoryItemBase getInventoryItem(LLUUID item) public InventoryItemBase getInventoryItem(LLUUID item)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
try { try {
return session.Load(typeof(InventoryItemBase), item) as InventoryItemBase; return session.Load(typeof(InventoryItemBase), item) as InventoryItemBase;
} catch { } catch {
@ -142,8 +142,8 @@ namespace OpenSim.Data.NHibernate
public void addInventoryItem(InventoryItemBase item) public void addInventoryItem(InventoryItemBase item)
{ {
if (!ExistsItem(item.ID)) { if (!ExistsItem(item.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Save(item); session.Save(item);
transaction.Commit(); transaction.Commit();
} }
@ -161,8 +161,8 @@ namespace OpenSim.Data.NHibernate
public void updateInventoryItem(InventoryItemBase item) public void updateInventoryItem(InventoryItemBase item)
{ {
if (ExistsItem(item.ID)) { if (ExistsItem(item.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Update(item); session.Update(item);
transaction.Commit(); transaction.Commit();
} }
@ -178,8 +178,8 @@ namespace OpenSim.Data.NHibernate
/// <param name="item"></param> /// <param name="item"></param>
public void deleteInventoryItem(LLUUID itemID) public void deleteInventoryItem(LLUUID itemID)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Delete(itemID); session.Delete(itemID);
transaction.Commit(); transaction.Commit();
} }
@ -194,7 +194,7 @@ namespace OpenSim.Data.NHibernate
/// <returns>A class containing folder information</returns> /// <returns>A class containing folder information</returns>
public InventoryFolderBase getInventoryFolder(LLUUID folder) public InventoryFolderBase getInventoryFolder(LLUUID folder)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
try { try {
return session.Load(typeof(InventoryFolderBase), folder) as InventoryFolderBase; return session.Load(typeof(InventoryFolderBase), folder) as InventoryFolderBase;
} catch { } catch {
@ -211,8 +211,8 @@ namespace OpenSim.Data.NHibernate
public void addInventoryFolder(InventoryFolderBase folder) public void addInventoryFolder(InventoryFolderBase folder)
{ {
if (!ExistsFolder(folder.ID)) { if (!ExistsFolder(folder.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Save(folder); session.Save(folder);
transaction.Commit(); transaction.Commit();
} }
@ -230,8 +230,8 @@ namespace OpenSim.Data.NHibernate
public void updateInventoryFolder(InventoryFolderBase folder) public void updateInventoryFolder(InventoryFolderBase folder)
{ {
if (ExistsFolder(folder.ID)) { if (ExistsFolder(folder.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Update(folder); session.Update(folder);
transaction.Commit(); transaction.Commit();
} }
@ -247,8 +247,8 @@ namespace OpenSim.Data.NHibernate
/// <param name="folder"></param> /// <param name="folder"></param>
public void deleteInventoryFolder(LLUUID folderID) public void deleteInventoryFolder(LLUUID folderID)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Delete(folderID.ToString()); session.Delete(folderID.ToString());
transaction.Commit(); transaction.Commit();
} }
@ -324,10 +324,10 @@ namespace OpenSim.Data.NHibernate
/// <returns>A List of InventoryItemBase items</returns> /// <returns>A List of InventoryItemBase items</returns>
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
// try { // try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase));
criteria.Add(Expression.Eq("Folder", folderID) ); criteria.Add(Expression.Eq("Folder", folderID));
List<InventoryItemBase> list = new List<InventoryItemBase>(); List<InventoryItemBase> list = new List<InventoryItemBase>();
foreach (InventoryItemBase item in criteria.List()) foreach (InventoryItemBase item in criteria.List())
{ {
@ -348,11 +348,11 @@ namespace OpenSim.Data.NHibernate
// see InventoryItemBase.getUserRootFolder // see InventoryItemBase.getUserRootFolder
public InventoryFolderBase getUserRootFolder(LLUUID user) public InventoryFolderBase getUserRootFolder(LLUUID user)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
// try { // try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
criteria.Add(Expression.Eq("ParentID", LLUUID.Zero) ); criteria.Add(Expression.Eq("ParentID", LLUUID.Zero));
criteria.Add(Expression.Eq("Owner", user) ); criteria.Add(Expression.Eq("Owner", user));
foreach (InventoryFolderBase folder in criteria.List()) foreach (InventoryFolderBase folder in criteria.List())
{ {
return folder; return folder;
@ -372,10 +372,10 @@ namespace OpenSim.Data.NHibernate
/// <param name="parentID">ID of parent</param> /// <param name="parentID">ID of parent</param>
private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
// try { // try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
criteria.Add(Expression.Eq("ParentID", parentID) ); criteria.Add(Expression.Eq("ParentID", parentID));
foreach (InventoryFolderBase item in criteria.List()) foreach (InventoryFolderBase item in criteria.List())
{ {
folders.Add(item); folders.Add(item);

View File

@ -88,14 +88,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: UserProfiles"; string regex = @"no such table: UserProfiles";
Regex RE = new Regex(regex, RegexOptions.Multiline); Regex RE = new Regex(regex, RegexOptions.Multiline);
try { try {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
session.Load(typeof(UserProfileData), LLUUID.Zero); session.Load(typeof(UserProfileData), LLUUID.Zero);
} }
} catch (ObjectNotFoundException) { } catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok // yes, we know it's not there, but that's ok
} catch (ADOException e) { } catch (ADOException e) {
Match m = RE.Match(e.ToString()); Match m = RE.Match(e.ToString());
if(m.Success) { if (m.Success) {
// We don't have this table, so create it. // We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true); new SchemaExport(cfg).Create(true, true);
} }
@ -106,7 +106,7 @@ namespace OpenSim.Data.NHibernate
{ {
UserProfileData user = null; UserProfileData user = null;
try { try {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
} }
// BUG: CATCHALL IS BAD. // BUG: CATCHALL IS BAD.
@ -119,7 +119,7 @@ namespace OpenSim.Data.NHibernate
{ {
UserProfileData user; UserProfileData user;
// TODO: I'm sure I'll have to do something silly here // TODO: I'm sure I'll have to do something silly here
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
user.CurrentAgent = GetAgentByUUID(uuid); user.CurrentAgent = GetAgentByUUID(uuid);
} }
@ -129,8 +129,8 @@ namespace OpenSim.Data.NHibernate
override public void AddNewUserProfile(UserProfileData profile) override public void AddNewUserProfile(UserProfileData profile)
{ {
if (!ExistsUser(profile.ID)) { if (!ExistsUser(profile.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Save(profile); session.Save(profile);
SetAgentData(profile.ID, profile.CurrentAgent, session); SetAgentData(profile.ID, profile.CurrentAgent, session);
// TODO: save agent // TODO: save agent
@ -166,8 +166,8 @@ namespace OpenSim.Data.NHibernate
override public bool UpdateUserProfile(UserProfileData profile) override public bool UpdateUserProfile(UserProfileData profile)
{ {
if (ExistsUser(profile.ID)) { if (ExistsUser(profile.ID)) {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Update(profile); session.Update(profile);
SetAgentData(profile.ID, profile.CurrentAgent, session); SetAgentData(profile.ID, profile.CurrentAgent, session);
transaction.Commit(); transaction.Commit();
@ -183,8 +183,8 @@ namespace OpenSim.Data.NHibernate
override public void AddNewUserAgent(UserAgentData agent) override public void AddNewUserAgent(UserAgentData agent)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Save(agent); session.Save(agent);
transaction.Commit(); transaction.Commit();
} }
@ -193,8 +193,8 @@ namespace OpenSim.Data.NHibernate
public void UpdateUserAgent(UserAgentData agent) public void UpdateUserAgent(UserAgentData agent)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
session.Update(agent); session.Update(agent);
transaction.Commit(); transaction.Commit();
} }
@ -206,7 +206,7 @@ namespace OpenSim.Data.NHibernate
override public UserAgentData GetAgentByUUID(LLUUID uuid) override public UserAgentData GetAgentByUUID(LLUUID uuid)
{ {
try { try {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
return session.Load(typeof(UserAgentData), uuid) as UserAgentData; return session.Load(typeof(UserAgentData), uuid) as UserAgentData;
} }
} catch { } catch {
@ -216,7 +216,7 @@ namespace OpenSim.Data.NHibernate
override public UserProfileData GetUserByName(string fname, string lname) override public UserProfileData GetUserByName(string fname, string lname)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); ICriteria criteria = session.CreateCriteria(typeof(UserProfileData));
criteria.Add(Expression.Eq("FirstName", fname)); criteria.Add(Expression.Eq("FirstName", fname));
criteria.Add(Expression.Eq("SurName", lname)); criteria.Add(Expression.Eq("SurName", lname));
@ -247,11 +247,11 @@ namespace OpenSim.Data.NHibernate
if (querysplit.Length == 2) if (querysplit.Length == 2)
{ {
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); ICriteria criteria = session.CreateCriteria(typeof(UserProfileData));
criteria.Add(Expression.Like("FirstName", querysplit[0])); criteria.Add(Expression.Like("FirstName", querysplit[0]));
criteria.Add(Expression.Like("SurName", querysplit[1])); criteria.Add(Expression.Like("SurName", querysplit[1]));
foreach(UserProfileData profile in criteria.List()) foreach (UserProfileData profile in criteria.List())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = profile.ID; user.AvatarID = profile.ID;
@ -280,7 +280,7 @@ namespace OpenSim.Data.NHibernate
{ {
UserAppearance appearance; UserAppearance appearance;
// TODO: I'm sure I'll have to do something silly here // TODO: I'm sure I'll have to do something silly here
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
appearance = session.Load(typeof(UserAppearance), user) as UserAppearance; appearance = session.Load(typeof(UserAppearance), user) as UserAppearance;
} }
return appearance; return appearance;
@ -289,7 +289,7 @@ namespace OpenSim.Data.NHibernate
private bool ExistsAppearance(LLUUID uuid) private bool ExistsAppearance(LLUUID uuid)
{ {
UserAppearance appearance; UserAppearance appearance;
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
appearance = session.Load(typeof(UserAppearance), uuid) as UserAppearance; appearance = session.Load(typeof(UserAppearance), uuid) as UserAppearance;
} }
return (appearance == null) ? false : true; return (appearance == null) ? false : true;
@ -299,8 +299,8 @@ namespace OpenSim.Data.NHibernate
override public void UpdateUserAppearance(LLUUID user, UserAppearance appearance) override public void UpdateUserAppearance(LLUUID user, UserAppearance appearance)
{ {
bool exists = ExistsAppearance(user); bool exists = ExistsAppearance(user);
using(ISession session = factory.OpenSession()) { using (ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using (ITransaction transaction = session.BeginTransaction()) {
if (exists) { if (exists) {
session.Update(appearance); session.Update(appearance);
} else { } else {

View File

@ -143,7 +143,7 @@ namespace OpenSim.Data
PrimitiveBaseShape shape = new PrimitiveBaseShape(); PrimitiveBaseShape shape = new PrimitiveBaseShape();
PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape);
mapper.FillObject( reader ); mapper.FillObject(reader);
return mapper; return mapper;
} }
@ -162,7 +162,7 @@ namespace OpenSim.Data
private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape)
{ {
PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper( m_schema, primitiveBaseShape ); PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, primitiveBaseShape);
mapper.SceneObjectPartId = sceneObjectPartId; mapper.SceneObjectPartId = sceneObjectPartId;
return mapper; return mapper;
} }

View File

@ -155,7 +155,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
using (IDataReader reader = cmd.ExecuteReader()) using (IDataReader reader = cmd.ExecuteReader())
{ {
if(reader.Read()) if (reader.Read())
{ {
reader.Close(); reader.Close();
return true; return true;

View File

@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="restMethod"></param> /// <param name="restMethod"></param>
public void DeregisterHandlers() public void DeregisterHandlers()
{ {
foreach(string capsName in m_capsHandlers.Caps) foreach (string capsName in m_capsHandlers.Caps)
{ {
m_capsHandlers.Remove(capsName); m_capsHandlers.Remove(capsName);
} }

View File

@ -37,7 +37,7 @@ using libsecondlife;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
/// <summary> /// <summary>
/// Borrowed from (a older version of ) libsl for now, as their new llsd code doesn't work we our decoding code. /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
/// </summary> /// </summary>
public static class LLSD public static class LLSD
{ {

View File

@ -31,7 +31,7 @@ namespace OpenSim.Framework
{ {
public delegate void restart(RegionInfo thisRegion); public delegate void restart(RegionInfo thisRegion);
//public delegate void regionup ( RegionInfo thisRegion ); //public delegate void regionup (RegionInfo thisRegion);
public enum RegionStatus : int public enum RegionStatus : int
{ {

View File

@ -163,7 +163,7 @@ namespace OpenSim.Framework
{ {
PacketType type=packet.Type; PacketType type=packet.Type;
if(pool[type] == null) if (pool[type] == null)
{ {
pool[type] = new Stack(); pool[type] = new Stack();
} }

View File

@ -122,7 +122,7 @@ namespace OpenSim.Framework
get get
{ {
// Old one defaults to IPv6 // Old one defaults to IPv6
//return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); //return new IPEndPoint(Dns.GetHostAddresses(m_externalHostName)[0], m_internalEndPoint.Port);
IPAddress ia = null; IPAddress ia = null;
// If it is already an IP, don't resolve it - just return directly // If it is already an IP, don't resolve it - just return directly

View File

@ -116,7 +116,7 @@ namespace OpenSim.Framework
get get
{ {
// Old one defaults to IPv6 // Old one defaults to IPv6
//return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); //return new IPEndPoint(Dns.GetHostAddresses(m_externalHostName)[0], m_internalEndPoint.Port);
IPAddress ia = null; IPAddress ia = null;
// If it is already an IP, don't resolve it - just return directly // If it is already an IP, don't resolve it - just return directly

View File

@ -412,7 +412,7 @@ namespace OpenSim.Framework.Servers
public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response) public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response)
{ {
switch( request.HttpMethod ) switch (request.HttpMethod)
{ {
case "OPTIONS": case "OPTIONS":
response.StatusCode = 200; response.StatusCode = 200;

View File

@ -54,9 +54,9 @@ namespace OpenSim.Framework.Servers
/// </summary> /// </summary>
public virtual void Shutdown() public virtual void Shutdown()
{ {
if(m_console != null) if (m_console != null)
{ {
m_console.Close(); m_console.Close();
} }
Environment.Exit(0); Environment.Exit(0);
} }
@ -112,7 +112,7 @@ namespace OpenSim.Framework.Servers
/// </summary> /// </summary>
private void Notice(string msg) private void Notice(string msg)
{ {
if(m_console != null) if (m_console != null)
{ {
m_console.Notice(msg); m_console.Notice(msg);
} }

View File

@ -371,7 +371,7 @@ namespace OpenSim.Grid.GridServer
catch (FormatException e) catch (FormatException e)
{ {
m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response.");
return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString() ); return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString());
} }
m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
@ -406,7 +406,7 @@ namespace OpenSim.Grid.GridServer
{ {
DataResponse insertResponse; DataResponse insertResponse;
if( existingSim == null ) if (existingSim == null)
{ {
insertResponse = kvp.Value.AddProfile(sim); insertResponse = kvp.Value.AddProfile(sim);
} }

View File

@ -87,7 +87,7 @@ namespace OpenSim.Grid.GridServer
AddHttpHandlers(); AddHttpHandlers();
LoadGridPlugins( ); LoadGridPlugins();
m_httpServer.Start(); m_httpServer.Start();

View File

@ -39,7 +39,7 @@ namespace OpenGridServices.Manager
protected virtual void OnResponse(object o, Gtk.ResponseArgs args) protected virtual void OnResponse(object o, Gtk.ResponseArgs args)
{ {
switch(args.ResponseId) { switch (args.ResponseId) {
case Gtk.ResponseType.Ok: case Gtk.ResponseType.Ok:
MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text);
break; break;

View File

@ -55,7 +55,7 @@ namespace OpenGridServices.Manager
LoginParams.Add(LoginParamsHT); LoginParams.Add(LoginParamsHT);
XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams);
XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000);
if(GridResp.IsFault) { if (GridResp.IsFault) {
connected=false; connected=false;
return false; return false;
} else { } else {
@ -87,14 +87,15 @@ namespace OpenGridServices.Manager
// TODO - ERROR! // TODO - ERROR!
} }
for(int i=0; i<=rootnode.ChildNodes.Count; i++) for (int i = 0; i <= rootnode.ChildNodes.Count; i++)
{ {
if(rootnode.ChildNodes.Item(i).Name != "region") { if (rootnode.ChildNodes.Item(i).Name != "region")
{
// TODO - ERROR! // TODO - ERROR!
} else { }
else
{
TempRegionData = new RegionBlock(); TempRegionData = new RegionBlock();
} }
} }
} }
@ -112,8 +113,8 @@ namespace OpenGridServices.Manager
ShutdownParamsHT["session_id"]=this.SessionID.ToString(); ShutdownParamsHT["session_id"]=this.SessionID.ToString();
ShutdownParams.Add(ShutdownParamsHT); ShutdownParams.Add(ShutdownParamsHT);
XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams);
XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL,3000); XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL, 3000);
if(GridResp.IsFault) { if (GridResp.IsFault) {
return false; return false;
} else { } else {
connected=false; connected=false;

View File

@ -45,7 +45,7 @@ namespace OpenGridServices.Manager
public static void DoMainLoop() public static void DoMainLoop()
{ {
while(!QuitReq) while (!QuitReq)
{ {
Application.RunIteration(); Application.RunIteration();
} }
@ -57,15 +57,15 @@ namespace OpenGridServices.Manager
string cmd; string cmd;
char[] sep = new char[1]; char[] sep = new char[1];
sep[0]=' '; sep[0]=' ';
while(!QuitReq) while (!QuitReq)
{ {
operation=PendingOperations.Dequeue(); operation=PendingOperations.Dequeue();
Console.WriteLine(operation); Console.WriteLine(operation);
cmd = operation.Split(sep)[0]; cmd = operation.Split(sep)[0];
switch(cmd) { switch (cmd) {
case "connect_to_gridserver": case "connect_to_gridserver":
win.SetStatus("Connecting to grid server..."); win.SetStatus("Connecting to grid server...");
if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) { if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3])) {
win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID);
win.SetGridServerConnected(true); win.SetGridServerConnected(true);
Thread.Sleep(3000); Thread.Sleep(3000);
@ -78,7 +78,7 @@ namespace OpenGridServices.Manager
case "restart_gridserver": case "restart_gridserver":
win.SetStatus("Restarting grid server..."); win.SetStatus("Restarting grid server...");
if(gridserverConn.RestartServer()) { if (gridserverConn.RestartServer()) {
win.SetStatus("Restarted server OK"); win.SetStatus("Restarted server OK");
Thread.Sleep(3000); Thread.Sleep(3000);
win.SetStatus(""); win.SetStatus("");
@ -89,7 +89,7 @@ namespace OpenGridServices.Manager
case "shutdown_gridserver": case "shutdown_gridserver":
win.SetStatus("Shutting down grid server..."); win.SetStatus("Shutting down grid server...");
if(gridserverConn.ShutdownServer()) { if (gridserverConn.ShutdownServer()) {
win.SetStatus("Grid server shutdown"); win.SetStatus("Grid server shutdown");
win.SetGridServerConnected(false); win.SetGridServerConnected(false);
Thread.Sleep(3000); Thread.Sleep(3000);

View File

@ -364,21 +364,21 @@ namespace OpenSim.Grid.ScriptEngine.Common
List<string> llList2List(List<string> src, int start, int end); List<string> llList2List(List<string> src, int start, int end);
//wiki: llDeleteSubList(list src, integer start, integer end) //wiki: llDeleteSubList(list src, integer start, integer end)
List<string> llDeleteSubList(List<string> src, int start, int end); List<string> llDeleteSubList(List<string> src, int start, int end);
//wiki: integer llGetListEntryType( list src, integer index ) //wiki: integer llGetListEntryType(list src, integer index)
int llGetListEntryType(List<string> src, int index); int llGetListEntryType(List<string> src, int index);
//wiki: string llList2CSV( list src ) //wiki: string llList2CSV(list src)
string llList2CSV(List<string> src); string llList2CSV(List<string> src);
//wiki: list llCSV2List( string src ) //wiki: list llCSV2List(string src)
List<string> llCSV2List(string src); List<string> llCSV2List(string src);
//wiki: list llListRandomize( list src, integer stride ) //wiki: list llListRandomize(list src, integer stride)
List<string> llListRandomize(List<string> src, int stride); List<string> llListRandomize(List<string> src, int stride);
//wiki: list llList2ListStrided( list src, integer start, integer end, integer stride ) //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride)
List<string> llList2ListStrided(List<string> src, int start, int end, int stride); List<string> llList2ListStrided(List<string> src, int start, int end, int stride);
//wiki: vector llGetRegionCorner( ) //wiki: vector llGetRegionCorner()
LSL_Types.Vector3 llGetRegionCorner(); LSL_Types.Vector3 llGetRegionCorner();
//wiki: list llListInsertList( list dest, list src, integer start ) //wiki: list llListInsertList(list dest, list src, integer start)
List<string> llListInsertList(List<string> dest, List<string> src, int start); List<string> llListInsertList(List<string> dest, List<string> src, int start);
//wiki: integer llListFindList( list src, list test ) //wiki: integer llListFindList(list src, list test)
int llListFindList(List<string> src, List<string> test); int llListFindList(List<string> src, List<string> test);
//wiki: string llGetObjectName() //wiki: string llGetObjectName()
string llGetObjectName(); string llGetObjectName();
@ -469,7 +469,7 @@ namespace OpenSim.Grid.ScriptEngine.Common
void llDumpList2String(); void llDumpList2String();
//wiki: integer llScriptDanger(vector pos) //wiki: integer llScriptDanger(vector pos)
void llScriptDanger(LSL_Types.Vector3 pos); void llScriptDanger(LSL_Types.Vector3 pos);
//wiki: llDialog( key avatar, string message, list buttons, integer chat_channel ) //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel)
void llDialog(string avatar, string message, List<string> buttons, int chat_channel); void llDialog(string avatar, string message, List<string> buttons, int chat_channel);
//wiki: llVolumeDetect(integer detect) //wiki: llVolumeDetect(integer detect)
void llVolumeDetect(int detect); void llVolumeDetect(int detect);
@ -493,7 +493,7 @@ namespace OpenSim.Grid.ScriptEngine.Common
void llCloseRemoteDataChannel(string channel); void llCloseRemoteDataChannel(string channel);
//wiki: string llMD5String(string src, integer nonce) //wiki: string llMD5String(string src, integer nonce)
string llMD5String(string src, int nonce); string llMD5String(string src, int nonce);
//wiki: llSetPrimitiveParams( list rules ) //wiki: llSetPrimitiveParams(list rules)
void llSetPrimitiveParams(List<string> rules); void llSetPrimitiveParams(List<string> rules);
//wiki: string llStringToBase64(string str) //wiki: string llStringToBase64(string str)
string llStringToBase64(string str); string llStringToBase64(string str);
@ -507,7 +507,7 @@ namespace OpenSim.Grid.ScriptEngine.Common
double llLog10(double val); double llLog10(double val);
//wiki: double llLog(double val) //wiki: double llLog(double val)
double llLog(double val); double llLog(double val);
//wiki: list llGetAnimationList( key id ) //wiki: list llGetAnimationList(key id)
List<string> llGetAnimationList(string id); List<string> llGetAnimationList(string id);
//wiki: llSetParcelMusicURL(string url) //wiki: llSetParcelMusicURL(string url)
void llSetParcelMusicURL(string url); void llSetParcelMusicURL(string url);
@ -529,7 +529,7 @@ namespace OpenSim.Grid.ScriptEngine.Common
int llGetNumberOfPrims(); int llGetNumberOfPrims();
//wiki: key llGetNumberOfNotecardLines(string name) //wiki: key llGetNumberOfNotecardLines(string name)
string llGetNumberOfNotecardLines(string name); string llGetNumberOfNotecardLines(string name);
//wiki: list llGetBoundingBox( key object ) //wiki: list llGetBoundingBox(key object)
List<string> llGetBoundingBox(string obj); List<string> llGetBoundingBox(string obj);
//wiki: vector llGetGeometricCenter() //wiki: vector llGetGeometricCenter()
LSL_Types.Vector3 llGetGeometricCenter(); LSL_Types.Vector3 llGetGeometricCenter();
@ -544,7 +544,7 @@ namespace OpenSim.Grid.ScriptEngine.Common
string llGetSimulatorHostname(); string llGetSimulatorHostname();
//llSetLocalRot(rotation rot) //llSetLocalRot(rotation rot)
void llSetLocalRot(LSL_Types.Quaternion rot); void llSetLocalRot(LSL_Types.Quaternion rot);
//wiki: list llParseStringKeepNulls( string src, list separators, list spacers ) //wiki: list llParseStringKeepNulls(string src, list separators, list spacers)
List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers); List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers);
//wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param)
void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity,
@ -571,14 +571,14 @@ namespace OpenSim.Grid.ScriptEngine.Common
void llListReplaceList(); void llListReplaceList();
//wiki: llLoadURL(key avatar_id, string message, string url) //wiki: llLoadURL(key avatar_id, string message, string url)
void llLoadURL(string avatar_id, string message, string url); void llLoadURL(string avatar_id, string message, string url);
//wiki: llParcelMediaCommandList( list commandList ) //wiki: llParcelMediaCommandList(list commandList)
void llParcelMediaCommandList(List<string> commandList); void llParcelMediaCommandList(List<string> commandList);
void llParcelMediaQuery(); void llParcelMediaQuery();
//wiki integer llModPow(integer a, integer b, integer c) //wiki integer llModPow(integer a, integer b, integer c)
int llModPow(int a, int b, int c); int llModPow(int a, int b, int c);
//wiki: integer llGetInventoryType(string name) //wiki: integer llGetInventoryType(string name)
int llGetInventoryType(string name); int llGetInventoryType(string name);
//wiki: llSetPayPrice( integer price, list quick_pay_buttons ) //wiki: llSetPayPrice(integer price, list quick_pay_buttons)
void llSetPayPrice(int price, List<string> quick_pay_buttons); void llSetPayPrice(int price, List<string> quick_pay_buttons);
//wiki: vector llGetCameraPos() //wiki: vector llGetCameraPos()
LSL_Types.Vector3 llGetCameraPos(); LSL_Types.Vector3 llGetCameraPos();
@ -600,11 +600,11 @@ namespace OpenSim.Grid.ScriptEngine.Common
void llRemoveFromLandPassList(string avatar); void llRemoveFromLandPassList(string avatar);
//wiki: llRemoveFromLandBanList(key avatar) //wiki: llRemoveFromLandBanList(key avatar)
void llRemoveFromLandBanList(string avatar); void llRemoveFromLandBanList(string avatar);
//wiki: llSetCameraParams( list rules ) //wiki: llSetCameraParams(list rules)
void llSetCameraParams(List<string> rules); void llSetCameraParams(List<string> rules);
//wiki: llClearCameraParams() //wiki: llClearCameraParams()
void llClearCameraParams(); void llClearCameraParams();
//wiki: double llListStatistics( integer operation, list src ) //wiki: double llListStatistics(integer operation, list src)
double llListStatistics(int operation, List<string> src); double llListStatistics(int operation, List<string> src);
//wiki: integer llGetUnixTime() //wiki: integer llGetUnixTime()
int llGetUnixTime(); int llGetUnixTime();
@ -621,11 +621,11 @@ namespace OpenSim.Grid.ScriptEngine.Common
void llResetLandPassList(); void llResetLandPassList();
//wiki integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) //wiki integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide)
int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide);
//wiki: list llGetParcelPrimOwners( vector pos ) //wiki: list llGetParcelPrimOwners(vector pos)
List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos); List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos);
//wiki: integer llGetObjectPrimCount(key object_id) //wiki: integer llGetObjectPrimCount(key object_id)
int llGetObjectPrimCount(string object_id); int llGetObjectPrimCount(string object_id);
//wiki: integer llGetParcelMaxPrims( vector pos, integer sim_wide ) //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide)
int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide);
//wiki list llGetParcelDetails(vector pos, list params) //wiki list llGetParcelDetails(vector pos, list params)
List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param); List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param);

View File

@ -1333,7 +1333,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
if (chunk.Count > 0) if (chunk.Count > 0)
tmp.Add(chunk); tmp.Add(chunk);
// Decreate (<- what kind of word is that? :D ) array back into a list // Decreate (<- what kind of word is that? :D) array back into a list
int rnd; int rnd;
List<string> ret = new List<string>(); List<string> ret = new List<string>();
while (tmp.Count > 0) while (tmp.Count > 0)

View File

@ -65,7 +65,7 @@ namespace OpenUser.Config.UserConfigDb4o
{ {
db = Db4oFactory.OpenFile("openuser.yap"); db = Db4oFactory.OpenFile("openuser.yap");
IObjectSet result = db.Get(typeof(DbUserConfig)); IObjectSet result = db.Get(typeof(DbUserConfig));
if(result.Count==1) if (result.Count == 1)
{ {
m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading");
foreach (DbUserConfig cfg in result) foreach (DbUserConfig cfg in result)

View File

@ -266,8 +266,8 @@ namespace OpenSim.Grid.UserServer
float positionZ, string firstname, string lastname) float positionZ, string firstname, string lastname)
{ {
m_messagesService.TellMessageServersAboutUser( agentID, sessionID, RegionID, regionhandle, positionX, m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX,
positionY, positionZ, firstname, lastname); positionY, positionZ, firstname, lastname);
} }
} }
} }

View File

@ -159,7 +159,7 @@ namespace OpenSim.Grid.UserServer
ulong regionhandle, float positionX, float positionY, ulong regionhandle, float positionX, float positionY,
float positionZ, string firstname, string lastname) float positionZ, string firstname, string lastname)
{ {
// Loop over registered Message Servers ( AND THERE WILL BE MORE THEN ONE :D ) // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D)
lock (MessageServers) lock (MessageServers)
{ {
if (MessageServers.Count > 0) if (MessageServers.Count > 0)

View File

@ -1204,11 +1204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendPayPrice(LLUUID objectID, int[] payPrice) public void SendPayPrice(LLUUID objectID, int[] payPrice)
{ {
if(payPrice[0] == 0 && if (payPrice[0] == 0 &&
payPrice[1] == 0 && payPrice[1] == 0 &&
payPrice[2] == 0 && payPrice[2] == 0 &&
payPrice[3] == 0 && payPrice[3] == 0 &&
payPrice[4] == 0) payPrice[4] == 0)
return; return;
PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply); PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply);
@ -3094,7 +3094,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true; return true;
} }
public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question)
{ {
ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion);
@ -3108,13 +3107,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(scriptQuestion, ThrottleOutPacketType.Task); OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
} }
private void InitDefaultAnimations() private void InitDefaultAnimations()
{ {
} }
public LLUUID GetDefaultAnimation(string name) public LLUUID GetDefaultAnimation(string name)
{ {
if(m_defaultAnimations.ContainsKey(name)) if (m_defaultAnimations.ContainsKey(name))
return m_defaultAnimations[name]; return m_defaultAnimations[name];
return LLUUID.Zero; return LLUUID.Zero;
} }
@ -3318,8 +3318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null) if (handlerUpdatePrimGroupScale != null)
{ {
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
handlerUpdatePrimGroupScale(localId, scale5, this); handlerUpdatePrimGroupScale(localId, scale5, this);
handlerUpdateVector = OnUpdatePrimGroupPosition; handlerUpdateVector = OnUpdatePrimGroupPosition;

View File

@ -369,7 +369,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void AddNewClient(Packet packet) protected virtual void AddNewClient(Packet packet)
{ {
//Slave regions don't accept new clients //Slave regions don't accept new clients
if(m_localScene.Region_Status != RegionStatus.SlaveScene) if (m_localScene.Region_Status != RegionStatus.SlaveScene)
{ {
UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
lock (clientCircuits) lock (clientCircuits)

View File

@ -91,7 +91,7 @@ namespace OpenSim.Region.Communications.Local
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
if (!m_regions.ContainsKey(regionInfo.RegionHandle)) if (!m_regions.ContainsKey(regionInfo.RegionHandle))
{ {
//Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle);
m_regions.Add(regionInfo.RegionHandle, regionInfo); m_regions.Add(regionInfo.RegionHandle, regionInfo);
RegionCommsListener regionHost = new RegionCommsListener(); RegionCommsListener regionHost = new RegionCommsListener();
@ -180,7 +180,7 @@ namespace OpenSim.Region.Communications.Local
public RegionInfo RequestClosestRegion(string regionName) public RegionInfo RequestClosestRegion(string regionName)
{ {
foreach(RegionInfo regInfo in m_regions.Values) foreach (RegionInfo regInfo in m_regions.Values)
{ {
if (regInfo.RegionName == regionName) return regInfo; if (regInfo.RegionName == regionName) return regInfo;
} }

View File

@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
{ {
if (Data.Length < 1000) if (Data.Length < 1000)
{ {
// for now (testing ) we only support files under 1000 bytes // for now (testing) we only support files under 1000 bytes
byte[] transferData = new byte[Data.Length + 4]; byte[] transferData = new byte[Data.Length + 4];
Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4);
Array.Copy(Data, 0, transferData, 4, Data.Length); Array.Copy(Data, 0, transferData, 4, Data.Length);

View File

@ -278,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
list.Add(entry.AgentID); list.Add(entry.AgentID);
} }
} }
if(list.Count == 0) if (list.Count == 0)
{ {
list.Add(LLUUID.Zero); list.Add(LLUUID.Zero);
} }

View File

@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
} }
protected void DebugPermissionInformation(string permissionCalled) protected void DebugPermissionInformation(string permissionCalled)
{ {
if(m_debugPermissions) if (m_debugPermissions)
m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
} }
@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
if (user != LLUUID.Zero) if (user != LLUUID.Zero)
{ {
LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers;
foreach(LLUUID estatemanager in estatemanagers) foreach (LLUUID estatemanager in estatemanagers)
{ {
if (estatemanager == user) if (estatemanager == user)
return true; return true;

View File

@ -155,48 +155,44 @@ namespace OpenSim.Region.Environment.Modules
m_longitude = d_longitude; m_longitude = d_longitude;
} }
switch(m_mode) switch (m_mode)
{ {
case "T1":
default:
case "SL":
// Time taken to complete a cycle (day and season)
case "T1" : SecondsPerSunCycle = (uint) (m_day_length * 60 * 60);
SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length);
default : // Ration of real-to-virtual time
case "SL" : VWTimeRatio = 24/m_day_length;
// Time taken to complete a cycle (day and season)
SecondsPerSunCycle = (uint) (m_day_length * 60 * 60); // Speed of rotation needed to complete a cycle in the
SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length); // designated period (day and season)
// Ration of real-to-virtual time SunSpeed = SunCycle/SecondsPerSunCycle;
SeasonSpeed = SeasonalCycle/SecondsPerYear;
VWTimeRatio = 24/m_day_length; // Horizon translation
// Speed of rotation needed to complete a cycle in the HorizonShift = m_day_night; // Z axis translation
// designated period (day and season) HoursToRadians = (SunCycle/24)*VWTimeRatio;
SunSpeed = SunCycle/SecondsPerSunCycle; // Insert our event handling hooks
SeasonSpeed = SeasonalCycle/SecondsPerYear;
// Horizon translation scene.EventManager.OnFrame += SunUpdate;
scene.EventManager.OnNewClient += SunToClient;
HorizonShift = m_day_night; // Z axis translation ready = true;
HoursToRadians = (SunCycle/24)*VWTimeRatio;
// Insert our event handling hooks m_log.Debug("[SUN] Mode is "+m_mode);
m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days");
scene.EventManager.OnFrame += SunUpdate; m_log.Debug("[SUN] Axis offset is "+m_day_night);
scene.EventManager.OnNewClient += SunToClient; m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames");
ready = true;
m_log.Debug("[SUN] Mode is "+m_mode);
m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days");
m_log.Debug("[SUN] Axis offset is "+m_day_night);
m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames");
break; break;
} }
} }
@ -224,21 +220,20 @@ namespace OpenSim.Region.Environment.Modules
public void SunToClient(IClientAPI client) public void SunToClient(IClientAPI client)
{ {
if(m_mode != "T1") if (m_mode != "T1")
{ {
if(ready) if (ready)
{ {
GenSunPos(); // Generate shared values once GenSunPos(); // Generate shared values once
client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
m_log.Debug("[SUN] Initial update for new client"); m_log.Debug("[SUN] Initial update for new client");
} }
} }
} }
public void SunUpdate() public void SunUpdate()
{ {
if (((m_frame++%m_frame_mod) != 0) || !ready)
if(((m_frame++%m_frame_mod) != 0) || !ready)
{ {
return; return;
} }
@ -253,7 +248,6 @@ namespace OpenSim.Region.Environment.Modules
// set estate settings for region access to sun position // set estate settings for region access to sun position
m_scene.RegionInfo.EstateSettings.sunPosition = Position; m_scene.RegionInfo.EstateSettings.sunPosition = Position;
} }
/// <summary> /// <summary>

View File

@ -596,7 +596,7 @@ namespace OpenSim.Region.Environment.Scenes
ScenePresence presence; ScenePresence presence;
TryGetAvatar(remoteClient.AgentId, out presence); TryGetAvatar(remoteClient.AgentId, out presence);
byte[] data = null; byte[] data = null;
if(invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum if (invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum
{ {
LLVector3 pos=presence.AbsolutePosition; LLVector3 pos=presence.AbsolutePosition;
string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
@ -996,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes
permissionToDelete = false; //Just taking copy! permissionToDelete = false; //Just taking copy!
} }
else if(DeRezPacket.AgentBlock.Destination == 4) //Take else if (DeRezPacket.AgentBlock.Destination == 4) //Take
{ {
// Take // Take
permissionToTake = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); permissionToTake = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);

View File

@ -452,7 +452,7 @@ namespace OpenSim.Region.Environment.Scenes
d); d);
} }
public delegate void SendCloseChildAgentDelegate( LLUUID agentID, List<ulong> regionlst); public delegate void SendCloseChildAgentDelegate(LLUUID agentID, List<ulong> regionlst);
/// <summary> /// <summary>
/// This Closes child agents on neighboring regions /// This Closes child agents on neighboring regions
@ -568,7 +568,8 @@ namespace OpenSim.Region.Environment.Scenes
// assume local regions are always up // assume local regions are always up
destRegionUp = true; destRegionUp = true;
} }
if(destRegionUp)
if (destRegionUp)
{ {
avatar.Close(); avatar.Close();

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.Environment.Scenes
public void addCheckRezObject(CanRezObject delegateFunc) public void addCheckRezObject(CanRezObject delegateFunc)
{ {
if(!CanRezObjectCheckFunctions.Contains(delegateFunc)) if (!CanRezObjectCheckFunctions.Contains(delegateFunc))
CanRezObjectCheckFunctions.Add(delegateFunc); CanRezObjectCheckFunctions.Add(delegateFunc);
} }
public void removeCheckRezObject(CanRezObject delegateFunc) public void removeCheckRezObject(CanRezObject delegateFunc)

View File

@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
foreach (Scene mscene in m_localScenes) foreach (Scene mscene in m_localScenes)
{ {
if((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) && if ((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) &&
(mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)) (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port))
{ {
scene = mscene; scene = mscene;

View File

@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
foreach (TaskInventoryItem item in m_taskInventory.Values) foreach (TaskInventoryItem item in m_taskInventory.Values)
{ {
if(item.Name == name) if (item.Name == name)
return true; return true;
} }
return false; return false;
@ -271,14 +271,14 @@ namespace OpenSim.Region.Environment.Scenes
private string FindAvailableInventoryName(string name) private string FindAvailableInventoryName(string name)
{ {
if(!InventoryContainsName(name)) if (!InventoryContainsName(name))
return name; return name;
int suffix=1; int suffix=1;
while(suffix < 256) while (suffix < 256)
{ {
string tryName=String.Format("{0} {1}", name, suffix); string tryName=String.Format("{0} {1}", name, suffix);
if(!InventoryContainsName(tryName)) if (!InventoryContainsName(tryName))
return tryName; return tryName;
suffix++; suffix++;
} }
@ -296,7 +296,7 @@ namespace OpenSim.Region.Environment.Scenes
item.ParentPartID = UUID; item.ParentPartID = UUID;
string name=FindAvailableInventoryName(item.Name); string name=FindAvailableInventoryName(item.Name);
if(name == String.Empty) if (name == String.Empty)
return; return;
item.Name=name; item.Name=name;

View File

@ -2049,7 +2049,7 @@ namespace OpenSim.Region.Environment.Scenes
data[pos] = (byte)pTexAnim.SizeY; pos++; data[pos] = (byte)pTexAnim.SizeY; pos++;
Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
Helpers.FloatToBytes(pTexAnim.Length ).CopyTo(data, pos + 4); Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
m_TextureAnimation = data; m_TextureAnimation = data;
@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Environment.Scenes
(int) (color.x*0xff), (int) (color.x*0xff),
(int) (color.y*0xff), (int) (color.y*0xff),
(int) (color.z*0xff)); (int) (color.z*0xff));
SetText( text ); SetText(text);
} }
public int registerTargetWaypoint(LLVector3 target, float tolerance) public int registerTargetWaypoint(LLVector3 target, float tolerance)

View File

@ -1263,7 +1263,7 @@ namespace OpenSim.Region.Environment.Scenes
//bool colliding = (m_physicsActor.IsColliding==true); //bool colliding = (m_physicsActor.IsColliding==true);
//if (controlland) //if (controlland)
// m_log.Info("[AGENT]: landCommand"); // m_log.Info("[AGENT]: landCommand");
//if (colliding ) //if (colliding)
// m_log.Info("[AGENT]: colliding"); // m_log.Info("[AGENT]: colliding");
//if (m_physicsActor.Flying && colliding && controlland) //if (m_physicsActor.Flying && colliding && controlland)
//{ //{

View File

@ -60,7 +60,7 @@ namespace OpenSim.Region.Examples.SimpleModule
float cpu = m_counter.NextValue()/40f; float cpu = m_counter.NextValue()/40f;
LLVector3 size = new LLVector3(cpu, cpu, cpu); LLVector3 size = new LLVector3(cpu, cpu, cpu);
RootPart.Resize( size ); RootPart.Resize(size);
base.UpdateMovement(); base.UpdateMovement();
} }

View File

@ -103,7 +103,7 @@ namespace OpenSim.Region.Examples.SimpleModule
for (int i = 0; i < (objs*objs*objs); i++) for (int i = 0; i < (objs*objs*objs); i++)
{ {
LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / ( objs )) * 4, (i / (objs*objs)) * 4); LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4);
ComplexObject complexObject = ComplexObject complexObject =
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
pos + posOffset); pos + posOffset);

View File

@ -729,7 +729,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
{ {
prim.UpdateKinetics(); prim.UpdateKinetics();
} }
//if(this._simFlatPlanet!=null) this._simFlatPlanet.Restore(); //if (this._simFlatPlanet!=null) this._simFlatPlanet.Restore();
} }
public override void GetResults() public override void GetResults()

View File

@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Meshing
} }
// each simplex still in the list belongs to the hull of the region in question // each simplex still in the list belongs to the hull of the region in question
// The new vertex (yes, we still deal with verices here :-) ) forms a triangle // The new vertex (yes, we still deal with verices here :-)) forms a triangle
// with each of these simplices. Build the new triangles and add them to the list // with each of these simplices. Build the new triangles and add them to the list
foreach (Simplex s in simplices) foreach (Simplex s in simplices)
{ {

View File

@ -79,7 +79,7 @@ namespace OpenSim.Region.Physics.OdePlugin
public bool m_returnCollisions = false; public bool m_returnCollisions = false;
// Default we're a Geometry // Default we're a Geometry
private CollisionCategories m_collisionCategories = (CollisionCategories.Geom ); private CollisionCategories m_collisionCategories = (CollisionCategories.Geom);
// Default, Collide with Other Geometries, spaces and Bodies // Default, Collide with Other Geometries, spaces and Bodies
private CollisionCategories m_collisionFlags = m_default_collisionFlags; private CollisionCategories m_collisionFlags = m_default_collisionFlags;
@ -1170,9 +1170,8 @@ namespace OpenSim.Region.Physics.OdePlugin
if (m_usePID) if (m_usePID)
{ {
// If we're using the PID controller, then we have no gravity // If we're using the PID controller, then we have no gravity
fz = ((9.8f) * this.Mass ); fz = 9.8f * this.Mass;
// no lock; for now it's only called from within Simulate() // no lock; for now it's only called from within Simulate()

View File

@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
{ {
invItemID=inv.Key; invItemID=inv.Key;
break; break;
@ -152,9 +152,9 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if (inv.Value.Name == name)
{ {
if(inv.Value.Type != type) if (inv.Value.Type != type)
return LLUUID.Zero; return LLUUID.Zero;
return inv.Value.AssetID.ToString(); return inv.Value.AssetID.ToString();
@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if (inv.Value.Name == name)
{ {
return inv.Value.AssetID.ToString(); return inv.Value.AssetID.ToString();
} }
@ -362,11 +362,11 @@ namespace OpenSim.Region.ScriptEngine.Common
double x,y,z,s; double x,y,z,s;
double c1 = Math.Cos(v.y / 2); double c1 = Math.Cos(v.y / 2);
double s1 = Math.Sin(v.y / 2 ); double s1 = Math.Sin(v.y / 2);
double c2 = Math.Cos(v.z / 2 ); double c2 = Math.Cos(v.z / 2);
double s2 = Math.Sin(v.z / 2 ); double s2 = Math.Sin(v.z / 2);
double c3 = Math.Cos(v.x / 2 ); double c3 = Math.Cos(v.x / 2);
double s3 = Math.Sin(v.x / 2 ); double s3 = Math.Sin(v.x / 2);
double c1c2 = c1 * c2; double c1c2 = c1 * c2;
double s1s2 = s1 * s2; double s1s2 = s1 * s2;
@ -2900,7 +2900,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD);
llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot) ); llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot));
llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG));
// convert back and forth between quaternion <-> vector and angle // convert back and forth between quaternion <-> vector and angle
@ -3339,14 +3339,13 @@ namespace OpenSim.Region.ScriptEngine.Common
if (src.Data.Length > 0) if (src.Data.Length > 0)
{ {
ret = src.Data[x++].ToString(); ret = src.Data[x++].ToString();
for(;x<src.Data.Length;x++) for (; x < src.Data.Length; x++)
{ {
ret += ", "+src.Data[x].ToString(); ret += ", "+src.Data[x].ToString();
} }
} }
return ret; return ret;
} }
/// <summary> /// <summary>
@ -3367,9 +3366,9 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
for(int i=0; i<src.Length; i++) for (int i = 0; i < src.Length; i++)
{ {
switch(src[i]) switch (src[i])
{ {
case '<' : case '<' :
parens++; parens++;
@ -3435,15 +3434,14 @@ namespace OpenSim.Region.ScriptEngine.Common
if (src.Length != stride && src.Length%stride == 0) if (src.Length != stride && src.Length%stride == 0)
{ {
chunkk = src.Length/stride; chunkk = src.Length/stride;
chunks = new int[chunkk]; chunks = new int[chunkk];
for(int i=0;i<chunkk;i++) for (int i = 0; i < chunkk; i++)
chunks[i] = i; chunks[i] = i;
for(int i=0; i<chunkk-1; i++) for (int i = 0; i < chunkk - 1; i++)
{ {
// randomly select 2 chunks // randomly select 2 chunks
index1 = rand.Next(rand.Next(65536)); index1 = rand.Next(rand.Next(65536));
@ -3461,10 +3459,13 @@ namespace OpenSim.Region.ScriptEngine.Common
result = new LSL_Types.list(); result = new LSL_Types.list();
for(int i=0; i<chunkk; i++) for (int i = 0; i < chunkk; i++)
for(int j=0;j<stride;j++) {
for (int j = 0; j < stride; j++)
{
result.Add(src.Data[chunks[i]*stride+j]); result.Add(src.Data[chunks[i]*stride+j]);
}
}
} }
else { else {
object[] array = new object[src.Length]; object[] array = new object[src.Length];
@ -3540,25 +3541,28 @@ namespace OpenSim.Region.ScriptEngine.Common
stride = 1; stride = 1;
if (stride > 0) if (stride > 0)
for(int i=0;i<src.Length;i+=stride) {
for (int i = 0; i < src.Length; i += stride)
{ {
if (i<=ei[0] && i>=si[0]) if (i<=ei[0] && i>=si[0])
result.Add(src.Data[i]); result.Add(src.Data[i]);
if (twopass && i>=si[1] && i<=ei[1]) if (twopass && i>=si[1] && i<=ei[1])
result.Add(src.Data[i]); result.Add(src.Data[i]);
} }
}
else if (stride < 0) else if (stride < 0)
for(int i=src.Length-1;i>=0;i+=stride) {
for (int i = src.Length - 1; i >= 0; i += stride)
{ {
if (i<=ei[0] && i>=si[0]) if (i <= ei[0] && i >= si[0])
result.Add(src.Data[i]); result.Add(src.Data[i]);
if (twopass && i>=si[1] && i<=ei[1]) if (twopass && i >= si[1] && i <= ei[1])
result.Add(src.Data[i]); result.Add(src.Data[i]);
} }
}
} }
return result; return result;
} }
public LSL_Types.Vector3 llGetRegionCorner() public LSL_Types.Vector3 llGetRegionCorner()
@ -3635,12 +3639,12 @@ namespace OpenSim.Region.ScriptEngine.Common
if (src.Length != 0 && test.Length != 0) if (src.Length != 0 && test.Length != 0)
{ {
for(int i=0; i< length; i++) for (int i = 0; i < length; i++)
{ {
if (src.Data[i].Equals(test.Data[0])) if (src.Data[i].Equals(test.Data[0]))
{ {
int j; int j;
for(j=1;j<test.Length;j++) for (j = 1; j < test.Length; j++)
if (!src.Data[i+j].Equals(test.Data[j])) if (!src.Data[i+j].Equals(test.Data[j]))
break; break;
if (j == test.Length) if (j == test.Length)
@ -4328,7 +4332,7 @@ namespace OpenSim.Region.ScriptEngine.Common
return; return;
} }
string[] buts = new string[buttons.Length]; string[] buts = new string[buttons.Length];
for(int i = 0; i < buttons.Length; i++) for (int i = 0; i < buttons.Length; i++)
{ {
if (buttons.Data[i].ToString() == String.Empty) if (buttons.Data[i].ToString() == String.Empty)
{ {
@ -4516,7 +4520,7 @@ namespace OpenSim.Region.ScriptEngine.Common
int face; int face;
LSL_Types.Vector3 v; LSL_Types.Vector3 v;
switch(code) switch (code)
{ {
case 6: // PRIM_POSITION case 6: // PRIM_POSITION
if (remain < 1) if (remain < 1)
@ -4826,12 +4830,12 @@ namespace OpenSim.Region.ScriptEngine.Common
LSL_Types.list res = new LSL_Types.list(); LSL_Types.list res = new LSL_Types.list();
int idx=0; int idx=0;
while(idx < rules.Length) while (idx < rules.Length)
{ {
int code=Convert.ToInt32(rules.Data[idx++]); int code=Convert.ToInt32(rules.Data[idx++]);
int remain=rules.Length-idx; int remain=rules.Length-idx;
switch(code) switch (code)
{ {
case 2: // PRIM_MATERIAL case 2: // PRIM_MATERIAL
res.Add(new LSL_Types.LSLInteger(m_host.Material)); res.Add(new LSL_Types.LSLInteger(m_host.Material));
@ -5339,18 +5343,19 @@ namespace OpenSim.Region.ScriptEngine.Common
// All entries are initially valid // All entries are initially valid
for(int i=0; i<mlen; i++) active[i] = true; for (int i = 0; i < mlen; i++)
active[i] = true;
offset[mlen] = srclen; offset[mlen] = srclen;
while(beginning<srclen) while (beginning < srclen)
{ {
best = mlen; // as bad as it gets best = mlen; // as bad as it gets
// Scan for separators // Scan for separators
for(j=0; j<seplen; j++) for (j = 0; j < seplen; j++)
{ {
if (active[j]) if (active[j])
{ {
@ -5359,7 +5364,8 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
// not present at all // not present at all
active[j] = false; active[j] = false;
} else }
else
{ {
// present and correct // present and correct
if (offset[j] < offset[best]) if (offset[j] < offset[best])
@ -5377,7 +5383,7 @@ namespace OpenSim.Region.ScriptEngine.Common
if (offset[best] != beginning) if (offset[best] != beginning)
{ {
for(j=seplen; (j<mlen) && (offset[best] > beginning); j++) for (j = seplen; (j < mlen) && (offset[best] > beginning); j++)
{ {
if (active[j]) if (active[j])
{ {
@ -6174,7 +6180,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
foreach (object o in args.Data) foreach (object o in args.Data)
{ {
switch(o.ToString()) switch (o.ToString())
{ {
case "1": case "1":
ret.Add(av.Firstname + " " + av.Lastname); ret.Add(av.Firstname + " " + av.Lastname);
@ -6207,9 +6213,9 @@ namespace OpenSim.Region.ScriptEngine.Common
SceneObjectPart obj = World.GetSceneObjectPart(key); SceneObjectPart obj = World.GetSceneObjectPart(key);
if (obj != null) if (obj != null)
{ {
foreach(object o in args.Data) foreach (object o in args.Data)
{ {
switch(o.ToString()) switch (o.ToString())
{ {
case "1": case "1":
ret.Add(obj.Name); ret.Add(obj.Name);

View File

@ -370,21 +370,21 @@ namespace OpenSim.Region.ScriptEngine.Common
LSL_Types.list llList2List(LSL_Types.list src, int start, int end); LSL_Types.list llList2List(LSL_Types.list src, int start, int end);
//wiki: llDeleteSubList(list src, integer start, integer end) //wiki: llDeleteSubList(list src, integer start, integer end)
LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end); LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end);
//wiki: integer llGetListEntryType( list src, integer index ) //wiki: integer llGetListEntryType(list src, integer index)
LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index); LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index);
//wiki: string llList2CSV( list src ) //wiki: string llList2CSV(list src)
string llList2CSV(LSL_Types.list src); string llList2CSV(LSL_Types.list src);
//wiki: list llCSV2List( string src ) //wiki: list llCSV2List(string src)
LSL_Types.list llCSV2List(string src); LSL_Types.list llCSV2List(string src);
//wiki: list llListRandomize( list src, integer stride ) //wiki: list llListRandomize(list src, integer stride)
LSL_Types.list llListRandomize(LSL_Types.list src, int stride); LSL_Types.list llListRandomize(LSL_Types.list src, int stride);
//wiki: list llList2ListStrided( list src, integer start, integer end, integer stride ) //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride)
LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride); LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride);
//wiki: vector llGetRegionCorner( ) //wiki: vector llGetRegionCorner()
LSL_Types.Vector3 llGetRegionCorner(); LSL_Types.Vector3 llGetRegionCorner();
//wiki: list llListInsertList( list dest, list src, integer start ) //wiki: list llListInsertList(list dest, list src, integer start)
LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start); LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start);
//wiki: integer llListFindList( list src, list test ) //wiki: integer llListFindList(list src, list test)
LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test); LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test);
//wiki: string llGetObjectName() //wiki: string llGetObjectName()
string llGetObjectName(); string llGetObjectName();
@ -479,7 +479,7 @@ namespace OpenSim.Region.ScriptEngine.Common
string llDumpList2String(LSL_Types.list src, string seperator); string llDumpList2String(LSL_Types.list src, string seperator);
//wiki: integer llScriptDanger(vector pos) //wiki: integer llScriptDanger(vector pos)
LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos); LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos);
//wiki: llDialog( key avatar, string message, list buttons, integer chat_channel ) //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel)
void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel); void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel);
//wiki: llVolumeDetect(integer detect) //wiki: llVolumeDetect(integer detect)
void llVolumeDetect(int detect); void llVolumeDetect(int detect);
@ -503,9 +503,9 @@ namespace OpenSim.Region.ScriptEngine.Common
void llCloseRemoteDataChannel(string channel); void llCloseRemoteDataChannel(string channel);
//wiki: string llMD5String(string src, integer nonce) //wiki: string llMD5String(string src, integer nonce)
string llMD5String(string src, int nonce); string llMD5String(string src, int nonce);
//wiki: llSetPrimitiveParams( list rules ) //wiki: llSetPrimitiveParams(list rules)
void llSetPrimitiveParams(LSL_Types.list rules); void llSetPrimitiveParams(LSL_Types.list rules);
//wiki: llSetLinkPrimitiveParams(integer linknumber, list rules ) //wiki: llSetLinkPrimitiveParams(integer linknumber, list rules)
void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules); void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules);
//wiki: string llStringToBase64(string str) //wiki: string llStringToBase64(string str)
string llStringToBase64(string str); string llStringToBase64(string str);
@ -519,7 +519,7 @@ namespace OpenSim.Region.ScriptEngine.Common
double llLog10(double val); double llLog10(double val);
//wiki: double llLog(double val) //wiki: double llLog(double val)
double llLog(double val); double llLog(double val);
//wiki: list llGetAnimationList( key id ) //wiki: list llGetAnimationList(key id)
LSL_Types.list llGetAnimationList(string id); LSL_Types.list llGetAnimationList(string id);
//wiki: llSetParcelMusicURL(string url) //wiki: llSetParcelMusicURL(string url)
void llSetParcelMusicURL(string url); void llSetParcelMusicURL(string url);
@ -541,7 +541,7 @@ namespace OpenSim.Region.ScriptEngine.Common
LSL_Types.LSLInteger llGetNumberOfPrims(); LSL_Types.LSLInteger llGetNumberOfPrims();
//wiki: key llGetNumberOfNotecardLines(string name) //wiki: key llGetNumberOfNotecardLines(string name)
string llGetNumberOfNotecardLines(string name); string llGetNumberOfNotecardLines(string name);
//wiki: list llGetBoundingBox( key object ) //wiki: list llGetBoundingBox(key object)
LSL_Types.list llGetBoundingBox(string obj); LSL_Types.list llGetBoundingBox(string obj);
//wiki: vector llGetGeometricCenter() //wiki: vector llGetGeometricCenter()
LSL_Types.Vector3 llGetGeometricCenter(); LSL_Types.Vector3 llGetGeometricCenter();
@ -557,7 +557,7 @@ namespace OpenSim.Region.ScriptEngine.Common
string llGetSimulatorHostname(); string llGetSimulatorHostname();
//llSetLocalRot(rotation rot) //llSetLocalRot(rotation rot)
void llSetLocalRot(LSL_Types.Quaternion rot); void llSetLocalRot(LSL_Types.Quaternion rot);
//wiki: list llParseStringKeepNulls( string src, list separators, list spacers ) //wiki: list llParseStringKeepNulls(string src, list separators, list spacers)
LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers); LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers);
//wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param)
void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity,
@ -584,14 +584,14 @@ namespace OpenSim.Region.ScriptEngine.Common
LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end); LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end);
//wiki: llLoadURL(key avatar_id, string message, string url) //wiki: llLoadURL(key avatar_id, string message, string url)
void llLoadURL(string avatar_id, string message, string url); void llLoadURL(string avatar_id, string message, string url);
//wiki: llParcelMediaCommandList( list commandList ) //wiki: llParcelMediaCommandList(list commandList)
void llParcelMediaCommandList(LSL_Types.list commandList); void llParcelMediaCommandList(LSL_Types.list commandList);
void llParcelMediaQuery(); void llParcelMediaQuery();
//wiki integer llModPow(integer a, integer b, integer c) //wiki integer llModPow(integer a, integer b, integer c)
LSL_Types.LSLInteger llModPow(int a, int b, int c); LSL_Types.LSLInteger llModPow(int a, int b, int c);
//wiki: integer llGetInventoryType(string name) //wiki: integer llGetInventoryType(string name)
LSL_Types.LSLInteger llGetInventoryType(string name); LSL_Types.LSLInteger llGetInventoryType(string name);
//wiki: llSetPayPrice( integer price, list quick_pay_buttons ) //wiki: llSetPayPrice(integer price, list quick_pay_buttons)
void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons); void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons);
//wiki: vector llGetCameraPos() //wiki: vector llGetCameraPos()
LSL_Types.Vector3 llGetCameraPos(); LSL_Types.Vector3 llGetCameraPos();
@ -613,11 +613,11 @@ namespace OpenSim.Region.ScriptEngine.Common
void llRemoveFromLandPassList(string avatar); void llRemoveFromLandPassList(string avatar);
//wiki: llRemoveFromLandBanList(key avatar) //wiki: llRemoveFromLandBanList(key avatar)
void llRemoveFromLandBanList(string avatar); void llRemoveFromLandBanList(string avatar);
//wiki: llSetCameraParams( list rules ) //wiki: llSetCameraParams(list rules)
void llSetCameraParams(LSL_Types.list rules); void llSetCameraParams(LSL_Types.list rules);
//wiki: llClearCameraParams() //wiki: llClearCameraParams()
void llClearCameraParams(); void llClearCameraParams();
//wiki: double llListStatistics( integer operation, list src ) //wiki: double llListStatistics(integer operation, list src)
double llListStatistics(int operation, LSL_Types.list src); double llListStatistics(int operation, LSL_Types.list src);
//wiki: integer llGetUnixTime() //wiki: integer llGetUnixTime()
LSL_Types.LSLInteger llGetUnixTime(); LSL_Types.LSLInteger llGetUnixTime();
@ -634,15 +634,15 @@ namespace OpenSim.Region.ScriptEngine.Common
void llResetLandPassList(); void llResetLandPassList();
//wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) //wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide)
LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide);
//wiki: list llGetParcelPrimOwners( vector pos ) //wiki: list llGetParcelPrimOwners(vector pos)
LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos); LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos);
//wiki: integer llGetObjectPrimCount(key object_id) //wiki: integer llGetObjectPrimCount(key object_id)
LSL_Types.LSLInteger llGetObjectPrimCount(string object_id); LSL_Types.LSLInteger llGetObjectPrimCount(string object_id);
//wiki: integer llGetParcelMaxPrims( vector pos, integer sim_wide ) //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide)
LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide);
//wiki: llGetParcelDetails(vector pos, list params) //wiki: llGetParcelDetails(vector pos, list params)
LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param);
//wiki: llSetLinkTexture(integer linknumber, string texture, integer face ) //wiki: llSetLinkTexture(integer linknumber, string texture, integer face)
void llSetLinkTexture(int linknumber, string texture, int face); void llSetLinkTexture(int linknumber, string texture, int face);
//wiki: string llStringTrim(string src, int type) //wiki: string llStringTrim(string src, int type)
string llStringTrim(string src, int type); string llStringTrim(string src, int type);

View File

@ -506,7 +506,7 @@ namespace OpenSim.Region.ScriptEngine.Common
int src; int src;
int dest=0; int dest=0;
for(src = 0 ; src < m_data.Length ; src++) for (src = 0; src < m_data.Length; src++)
{ {
if (src < start || src > end) if (src < start || src > end)
ret[dest++]=m_data[src]; ret[dest++]=m_data[src];
@ -624,9 +624,9 @@ namespace OpenSim.Region.ScriptEngine.Common
Array.Copy(Data, 0, ret, 0, Data.Length); Array.Copy(Data, 0, ret, 0, Data.Length);
keys=new string[Data.Length]; keys=new string[Data.Length];
int k;
for(k=0;k<Data.Length;k++) for (int k = 0; k < Data.Length; k++)
keys[k]=Data[k].ToString(); keys[k] = Data[k].ToString();
Array.Sort(keys, ret); Array.Sort(keys, ret);
@ -644,11 +644,11 @@ namespace OpenSim.Region.ScriptEngine.Common
int i; int i;
while(src < Data.Length) while (src < Data.Length)
{ {
Object[] o=new Object[stride]; Object[] o=new Object[stride];
for(i=0;i<stride;i++) for (i = 0; i < stride; i++)
{ {
if (src < Data.Length) if (src < Data.Length)
o[i]=Data[src++]; o[i]=Data[src++];
@ -672,11 +672,9 @@ namespace OpenSim.Region.ScriptEngine.Common
Object[] sorted=new Object[stride*vals.Length]; Object[] sorted=new Object[stride*vals.Length];
int j; for (i = 0; i < vals.Length; i++)
for (int j = 0; j < stride; j++)
for(i=0;i<vals.Length;i++) sorted[i*stride+j] = vals[i][j];
for(j=0;j<stride;j++)
sorted[i*stride+j]=vals[i][j];
return new list(sorted); return new list(sorted);
} }
@ -691,7 +689,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public string ToCSV() public string ToCSV()
{ {
string ret = ""; string ret = "";
foreach(object o in this.Data) foreach (object o in this.Data)
{ {
if (ret == "") if (ret == "")
{ {

View File

@ -340,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Common
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
LLUUID createdTexture = LLUUID createdTexture =
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
extraParams, timer, true, (byte) alpha ); extraParams, timer, true, (byte) alpha);
return createdTexture.ToString(); return createdTexture.ToString();
} }
else else

View File

@ -235,7 +235,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
// dot=dot(forward_dir,obj_dir) // dot=dot(forward_dir,obj_dir)
// mag_fwd = mag(forward_dir) // mag_fwd = mag(forward_dir)
// mag_obj = mag(obj_dir) // mag_obj = mag(obj_dir)
// ang = acos( dot /(mag_fwd*mag_obj)) // ang = acos(dot /(mag_fwd*mag_obj))
double ang_obj = 0; double ang_obj = 0;
try try
{ {

View File

@ -76,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// TODO: HOOK ALL EVENTS UP TO SERVER! // TODO: HOOK ALL EVENTS UP TO SERVER!
IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>();
if(money != null) if (money != null)
{ {
money.OnObjectPaid+=HandleObjectPaid; money.OnObjectPaid+=HandleObjectPaid;
} }
@ -91,7 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount)
{ {
SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID);
if(part != null) if (part != null)
{ {
money(part.LocalId, agentID, amount); money(part.LocalId, agentID, amount);
} }

View File

@ -297,10 +297,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// Send inner exception // Send inner exception
string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n'); string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n');
int line=0; int line=0;
foreach(string t in lines) foreach (string t in lines)
{ {
int idx=t.IndexOf("SecondLife.Script."); int idx=t.IndexOf("SecondLife.Script.");
if(idx != -1) if (idx != -1)
{ {
int colon=t.IndexOf(":"); int colon=t.IndexOf(":");
line=Convert.ToInt32(t.Substring(colon+1)); line=Convert.ToInt32(t.Substring(colon+1));

View File

@ -182,7 +182,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
if (DateTime.Now.Ticks - Last_ReReadConfigFilens > if (DateTime.Now.Ticks - Last_ReReadConfigFilens >
m_ScriptEngine.RefreshConfigFilens) m_ScriptEngine.RefreshConfigFilens)
{ {
//Console.WriteLine("Time passed: " + (DateTime.Now.Ticks - Last_ReReadConfigFilens) + ">" + m_ScriptEngine.RefreshConfigFilens ); //Console.WriteLine("Time passed: " + (DateTime.Now.Ticks - Last_ReReadConfigFilens) + ">" + m_ScriptEngine.RefreshConfigFilens);
// Its time to re-read config file // Its time to re-read config file
m_ScriptEngine.ReadConfig(); m_ScriptEngine.ReadConfig();
Last_ReReadConfigFilens = DateTime.Now.Ticks; // Reset time Last_ReReadConfigFilens = DateTime.Now.Ticks; // Reset time

View File

@ -53,14 +53,14 @@ namespace OpenSim.Tests.Common
{ {
throw new ArgumentException("Constraint cannot be used upon null values."); throw new ArgumentException("Constraint cannot be used upon null values.");
} }
if( valueToBeTested.GetType() != typeof(double)) if (valueToBeTested.GetType() != typeof(double))
{ {
throw new ArgumentException("Constraint cannot be used upon non double-values."); throw new ArgumentException("Constraint cannot be used upon non double-values.");
} }
_valueToBeTested = (double)valueToBeTested; _valueToBeTested = (double)valueToBeTested;
return IsWithinDoubleConstraint(_valueToBeTested, _baseValue ); return IsWithinDoubleConstraint(_valueToBeTested, _baseValue);
} }
public override void WriteDescriptionTo(MessageWriter writer) public override void WriteDescriptionTo(MessageWriter writer)

View File

@ -61,14 +61,9 @@ namespace OpenSim.Tests.Common
_valueToBeTested = (LLVector3) valueToBeTested; _valueToBeTested = (LLVector3) valueToBeTested;
if ( IsWithinDoubleConstraint(_valueToBeTested.X,_baseValue.X) && return (IsWithinDoubleConstraint(_valueToBeTested.X, _baseValue.X) &&
IsWithinDoubleConstraint(_valueToBeTested.Y,_baseValue.Y) && IsWithinDoubleConstraint(_valueToBeTested.Y, _baseValue.Y) &&
IsWithinDoubleConstraint(_valueToBeTested.Z,_baseValue.Z) ) IsWithinDoubleConstraint(_valueToBeTested.Z, _baseValue.Z));
{
return true;
}
return false;
} }
public override void WriteDescriptionTo(MessageWriter writer) public override void WriteDescriptionTo(MessageWriter writer)

View File

@ -147,13 +147,12 @@ namespace OpenSim.Test.Inventory
Assert.IsNotNull(folders, "Failed to get rootfolders for user"); Assert.IsNotNull(folders, "Failed to get rootfolders for user");
bool foundRoot = false; bool foundRoot = false;
foreach(InventoryFolderBase f in folders) { foreach (InventoryFolderBase f in folders)
{
// a root folder has a zero valued LLUUID // a root folder has a zero valued LLUUID
Assert.AreEqual(f.parentID, LLUUID.Zero, "non root folder returned"); Assert.AreEqual(f.parentID, LLUUID.Zero, "non root folder returned");
if (f.agentID == root.agentID)
if(f.agentID == root.agentID)
{ {
// we cannot have two different user specific root folders // we cannot have two different user specific root folders
Assert.IsFalse(foundRoot, "Two different user specific root folders returned"); Assert.IsFalse(foundRoot, "Two different user specific root folders returned");

View File

@ -407,7 +407,7 @@ namespace OpenSim.GUI
portBox1.Text = "13050"; portBox1.Text = "13050";
MessageBox.Show("Enter Usable port number, defaulting to 13050."); MessageBox.Show("Enter Usable port number, defaulting to 13050.");
} }
if(aPort < 13000) if (aPort < 13000)
{ {
portBox1.Text = "13000"; portBox1.Text = "13000";
MessageBox.Show("Enter Usable port number, defaulting to 13000."); MessageBox.Show("Enter Usable port number, defaulting to 13000.");

View File

@ -147,7 +147,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
foreach (ScenePresence pre in presences) foreach (ScenePresence pre in presences)
{ {
IClientAPI client = pre.ControllingClient; IClientAPI client = pre.ControllingClient;
//if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) {
if (client.IsActive) if (client.IsActive)
{ {
get_scene_presence_filter++; get_scene_presence_filter++;
@ -160,7 +160,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
foreach (ScenePresence pre in avatars) foreach (ScenePresence pre in avatars)
{ {
IClientAPI client = pre.ControllingClient; IClientAPI client = pre.ControllingClient;
//if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) {
if (client.IsActive) if (client.IsActive)
{ {
get_avatar_filter++; get_avatar_filter++;
@ -884,7 +884,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
// Because data changes by the physics simulation when the client doesn't move, // Because data changes by the physics simulation when the client doesn't move,
// if MovementFlag is false, It is necessary to synchronize. // if MovementFlag is false, It is necessary to synchronize.
//if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true)
if (client.IsActive) if (client.IsActive)
{ {
//m_log.Info("[SPLITSCENE] "+String.Format("Client moving in {0} {1}", scene.RegionInfo.RegionID, pre.AbsolutePosition)); //m_log.Info("[SPLITSCENE] "+String.Format("Client moving in {0} {1}", scene.RegionInfo.RegionID, pre.AbsolutePosition));

View File

@ -150,7 +150,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
state.ms_ptr.Read(packet, 0, state.header.numbytes); state.ms_ptr.Read(packet, 0, state.header.numbytes);
/* /*
for(int i=0; i<state.header.numbytes; i++) { for (int i=0; i<state.header.numbytes; i++) {
System.Console.Write(packet[i] + " "); System.Console.Write(packet[i] + " ");
} }
System.Console.WriteLine(); System.Console.WriteLine();