diff options
author | Jeff Ames | 2008-05-14 05:11:23 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-14 05:11:23 +0000 |
commit | c995d60d37032db3198b8496e186aa7a892dc7a8 (patch) | |
tree | 826147e66f61c812897d9b0acdb16ebfeb30d4d3 | |
parent | * Added 3 warnings in response to the warnings. Adam, read the warnings. (diff) | |
download | opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.zip opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.gz opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.bz2 opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.xz |
Formatting cleanup.
62 files changed, 283 insertions, 291 deletions
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs index da90f10..b71a966 100644 --- a/OpenSim/Data/Base/BaseDataReader.cs +++ b/OpenSim/Data/Base/BaseDataReader.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Data.Base | |||
117 | return m_source.GetGuid(m_source.GetOrdinal(name)); | 117 | return m_source.GetGuid(m_source.GetOrdinal(name)); |
118 | } | 118 | } |
119 | 119 | ||
120 | public UInt32 GetUInt32(string name ) | 120 | public UInt32 GetUInt32(string name) |
121 | { | 121 | { |
122 | return (UInt32)GetInt32(name); | 122 | return (UInt32)GetInt32(name); |
123 | } | 123 | } |
@@ -129,9 +129,9 @@ namespace OpenSim.Data.Base | |||
129 | return int32; | 129 | return int32; |
130 | } | 130 | } |
131 | 131 | ||
132 | public Int64 GetInt64(string name) | 132 | public Int64 GetInt64(string name) |
133 | { | 133 | { |
134 | int ordinal = m_source.GetOrdinal( name ); | 134 | int ordinal = m_source.GetOrdinal(name); |
135 | long int64 = m_source.GetInt64(ordinal); | 135 | long int64 = m_source.GetInt64(ordinal); |
136 | return int64; | 136 | return int64; |
137 | } | 137 | } |
diff --git a/OpenSim/Data/Base/BaseTableMapper.cs b/OpenSim/Data/Base/BaseTableMapper.cs index ad60009..649b228 100644 --- a/OpenSim/Data/Base/BaseTableMapper.cs +++ b/OpenSim/Data/Base/BaseTableMapper.cs | |||
@@ -125,7 +125,7 @@ namespace OpenSim.Data.Base | |||
125 | 125 | ||
126 | // HACK: This is a temporary function used by TryGetValue(). | 126 | // HACK: This is a temporary function used by TryGetValue(). |
127 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain | 127 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain |
128 | // a using() block. This has been fixed in SVN, so the next | 128 | // a using block. This has been fixed in SVN, so the next |
129 | // mono release should work. | 129 | // mono release should work. |
130 | private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success) | 130 | private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success) |
131 | { | 131 | { |
@@ -137,7 +137,7 @@ namespace OpenSim.Data.Base | |||
137 | { | 137 | { |
138 | if (reader.Read()) | 138 | if (reader.Read()) |
139 | { | 139 | { |
140 | result = FromReader( CreateReader(reader)); | 140 | result = FromReader(CreateReader(reader)); |
141 | success = true; | 141 | success = true; |
142 | } | 142 | } |
143 | else | 143 | else |
@@ -165,7 +165,7 @@ namespace OpenSim.Data.Base | |||
165 | 165 | ||
166 | // HACK: This is a temporary function used by Remove(). | 166 | // HACK: This is a temporary function used by Remove(). |
167 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain | 167 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain |
168 | // a using() block. This has been fixed in SVN, so the next | 168 | // a using block. This has been fixed in SVN, so the next |
169 | // mono release should work. | 169 | // mono release should work. |
170 | protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted) | 170 | protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted) |
171 | { | 171 | { |
@@ -215,7 +215,7 @@ namespace OpenSim.Data.Base | |||
215 | 215 | ||
216 | // HACK: This is a temporary function used by Update(). | 216 | // HACK: This is a temporary function used by Update(). |
217 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain | 217 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain |
218 | // a using() block. This has been fixed in SVN, so the next | 218 | // a using block. This has been fixed in SVN, so the next |
219 | // mono release should work. | 219 | // mono release should work. |
220 | protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated) | 220 | protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated) |
221 | { | 221 | { |
@@ -246,7 +246,7 @@ namespace OpenSim.Data.Base | |||
246 | 246 | ||
247 | // HACK: This is a temporary function used by Add(). | 247 | // HACK: This is a temporary function used by Add(). |
248 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain | 248 | // Due to a bug in mono 1.2.6, delegate blocks cannot contain |
249 | // a using() block. This has been fixed in SVN, so the next | 249 | // a using block. This has been fixed in SVN, so the next |
250 | // mono release should work. | 250 | // mono release should work. |
251 | protected void TryAdd(DbConnection connection, TRowMapper value, ref int added) | 251 | protected void TryAdd(DbConnection connection, TRowMapper value, ref int added) |
252 | { | 252 | { |
diff --git a/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs b/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs index 4c807b1..bd683f3 100644 --- a/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs +++ b/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Data.MSSQLMapper | |||
46 | 46 | ||
47 | public override object ConvertToDbType(object value) | 47 | public override object ConvertToDbType(object value) |
48 | { | 48 | { |
49 | if( value is UInt32 ) | 49 | if (value is UInt32) |
50 | { | 50 | { |
51 | UInt32 tmpVal = (UInt32) value; | 51 | UInt32 tmpVal = (UInt32) value; |
52 | Int64 result = Convert.ToInt64(tmpVal); | 52 | Int64 result = Convert.ToInt64(tmpVal); |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 1f95aad..4455c3b 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -512,7 +512,7 @@ namespace OpenSim.Data.MySQL | |||
512 | retval.FirstLifeImage = tmp; | 512 | retval.FirstLifeImage = tmp; |
513 | } | 513 | } |
514 | 514 | ||
515 | if(reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) | 515 | if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) |
516 | { | 516 | { |
517 | retval.WebLoginKey = LLUUID.Zero; | 517 | retval.WebLoginKey = LLUUID.Zero; |
518 | } | 518 | } |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index b448715..ab34f15 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Data.MySQL | |||
69 | string settingPort = iniFile.ParseFileReadValue("port"); | 69 | string settingPort = iniFile.ParseFileReadValue("port"); |
70 | 70 | ||
71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); | 71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); |
72 | if( m_usersTableName == null ) | 72 | if (m_usersTableName == null) |
73 | { | 73 | { |
74 | m_usersTableName = "users"; | 74 | m_usersTableName = "users"; |
75 | } | 75 | } |
diff --git a/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs b/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs index 37b94fa..b7940b8 100644 --- a/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs +++ b/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Data.MySQLMapper | |||
52 | 52 | ||
53 | public override BaseDataReader CreateReader(IDataReader reader) | 53 | public override BaseDataReader CreateReader(IDataReader reader) |
54 | { | 54 | { |
55 | return new MySQLDataReader( reader ); | 55 | return new MySQLDataReader(reader); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | } \ No newline at end of file | 58 | } \ No newline at end of file |
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index e52f633..875f4e5 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -97,14 +97,14 @@ namespace OpenSim.Data.NHibernate | |||
97 | string regex = @"no such table: Assets"; | 97 | string regex = @"no such table: Assets"; |
98 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 98 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
99 | try { | 99 | try { |
100 | using(ISession session = factory.OpenSession()) { | 100 | using (ISession session = factory.OpenSession()) { |
101 | session.Load(typeof(AssetBase), LLUUID.Zero); | 101 | session.Load(typeof(AssetBase), LLUUID.Zero); |
102 | } | 102 | } |
103 | } catch (ObjectNotFoundException) { | 103 | } catch (ObjectNotFoundException) { |
104 | // yes, we know it's not there, but that's ok | 104 | // yes, we know it's not there, but that's ok |
105 | } catch (ADOException e) { | 105 | } catch (ADOException e) { |
106 | Match m = RE.Match(e.ToString()); | 106 | Match m = RE.Match(e.ToString()); |
107 | if(m.Success) { | 107 | if (m.Success) { |
108 | // We don't have this table, so create it. | 108 | // We don't have this table, so create it. |
109 | new SchemaExport(cfg).Create(true, true); | 109 | new SchemaExport(cfg).Create(true, true); |
110 | } | 110 | } |
@@ -113,7 +113,7 @@ namespace OpenSim.Data.NHibernate | |||
113 | 113 | ||
114 | override public AssetBase FetchAsset(LLUUID uuid) | 114 | override public AssetBase FetchAsset(LLUUID uuid) |
115 | { | 115 | { |
116 | using(ISession session = factory.OpenSession()) { | 116 | using (ISession session = factory.OpenSession()) { |
117 | try { | 117 | try { |
118 | return session.Load(typeof(AssetBase), uuid) as AssetBase; | 118 | return session.Load(typeof(AssetBase), uuid) as AssetBase; |
119 | } catch { | 119 | } catch { |
@@ -125,8 +125,8 @@ namespace OpenSim.Data.NHibernate | |||
125 | override public void CreateAsset(AssetBase asset) | 125 | override public void CreateAsset(AssetBase asset) |
126 | { | 126 | { |
127 | if (!ExistsAsset(asset.FullID)) { | 127 | if (!ExistsAsset(asset.FullID)) { |
128 | using(ISession session = factory.OpenSession()) { | 128 | using (ISession session = factory.OpenSession()) { |
129 | using(ITransaction transaction = session.BeginTransaction()) { | 129 | using (ITransaction transaction = session.BeginTransaction()) { |
130 | session.Save(asset); | 130 | session.Save(asset); |
131 | transaction.Commit(); | 131 | transaction.Commit(); |
132 | } | 132 | } |
@@ -137,8 +137,8 @@ namespace OpenSim.Data.NHibernate | |||
137 | override public void UpdateAsset(AssetBase asset) | 137 | override public void UpdateAsset(AssetBase asset) |
138 | { | 138 | { |
139 | if (ExistsAsset(asset.FullID)) { | 139 | if (ExistsAsset(asset.FullID)) { |
140 | using(ISession session = factory.OpenSession()) { | 140 | using (ISession session = factory.OpenSession()) { |
141 | using(ITransaction transaction = session.BeginTransaction()) { | 141 | using (ITransaction transaction = session.BeginTransaction()) { |
142 | session.Update(asset); | 142 | session.Update(asset); |
143 | transaction.Commit(); | 143 | transaction.Commit(); |
144 | } | 144 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index f8e3655..6ee1b4a 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -95,14 +95,14 @@ namespace OpenSim.Data.NHibernate | |||
95 | string regex = @"no such table: Inventory"; | 95 | string regex = @"no such table: Inventory"; |
96 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 96 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
97 | try { | 97 | try { |
98 | using(ISession session = factory.OpenSession()) { | 98 | using (ISession session = factory.OpenSession()) { |
99 | session.Load(typeof(InventoryItemBase), LLUUID.Zero); | 99 | session.Load(typeof(InventoryItemBase), LLUUID.Zero); |
100 | } | 100 | } |
101 | } catch (ObjectNotFoundException) { | 101 | } catch (ObjectNotFoundException) { |
102 | // yes, we know it's not there, but that's ok | 102 | // yes, we know it's not there, but that's ok |
103 | } catch (ADOException e) { | 103 | } catch (ADOException e) { |
104 | Match m = RE.Match(e.ToString()); | 104 | Match m = RE.Match(e.ToString()); |
105 | if(m.Success) { | 105 | if (m.Success) { |
106 | // We don't have this table, so create it. | 106 | // We don't have this table, so create it. |
107 | new SchemaExport(cfg).Create(true, true); | 107 | new SchemaExport(cfg).Create(true, true); |
108 | } | 108 | } |
@@ -125,7 +125,7 @@ namespace OpenSim.Data.NHibernate | |||
125 | /// <returns>A class containing item information</returns> | 125 | /// <returns>A class containing item information</returns> |
126 | public InventoryItemBase getInventoryItem(LLUUID item) | 126 | public InventoryItemBase getInventoryItem(LLUUID item) |
127 | { | 127 | { |
128 | using(ISession session = factory.OpenSession()) { | 128 | using (ISession session = factory.OpenSession()) { |
129 | try { | 129 | try { |
130 | return session.Load(typeof(InventoryItemBase), item) as InventoryItemBase; | 130 | return session.Load(typeof(InventoryItemBase), item) as InventoryItemBase; |
131 | } catch { | 131 | } catch { |
@@ -142,8 +142,8 @@ namespace OpenSim.Data.NHibernate | |||
142 | public void addInventoryItem(InventoryItemBase item) | 142 | public void addInventoryItem(InventoryItemBase item) |
143 | { | 143 | { |
144 | if (!ExistsItem(item.ID)) { | 144 | if (!ExistsItem(item.ID)) { |
145 | using(ISession session = factory.OpenSession()) { | 145 | using (ISession session = factory.OpenSession()) { |
146 | using(ITransaction transaction = session.BeginTransaction()) { | 146 | using (ITransaction transaction = session.BeginTransaction()) { |
147 | session.Save(item); | 147 | session.Save(item); |
148 | transaction.Commit(); | 148 | transaction.Commit(); |
149 | } | 149 | } |
@@ -161,8 +161,8 @@ namespace OpenSim.Data.NHibernate | |||
161 | public void updateInventoryItem(InventoryItemBase item) | 161 | public void updateInventoryItem(InventoryItemBase item) |
162 | { | 162 | { |
163 | if (ExistsItem(item.ID)) { | 163 | if (ExistsItem(item.ID)) { |
164 | using(ISession session = factory.OpenSession()) { | 164 | using (ISession session = factory.OpenSession()) { |
165 | using(ITransaction transaction = session.BeginTransaction()) { | 165 | using (ITransaction transaction = session.BeginTransaction()) { |
166 | session.Update(item); | 166 | session.Update(item); |
167 | transaction.Commit(); | 167 | transaction.Commit(); |
168 | } | 168 | } |
@@ -178,8 +178,8 @@ namespace OpenSim.Data.NHibernate | |||
178 | /// <param name="item"></param> | 178 | /// <param name="item"></param> |
179 | public void deleteInventoryItem(LLUUID itemID) | 179 | public void deleteInventoryItem(LLUUID itemID) |
180 | { | 180 | { |
181 | using(ISession session = factory.OpenSession()) { | 181 | using (ISession session = factory.OpenSession()) { |
182 | using(ITransaction transaction = session.BeginTransaction()) { | 182 | using (ITransaction transaction = session.BeginTransaction()) { |
183 | session.Delete(itemID); | 183 | session.Delete(itemID); |
184 | transaction.Commit(); | 184 | transaction.Commit(); |
185 | } | 185 | } |
@@ -194,7 +194,7 @@ namespace OpenSim.Data.NHibernate | |||
194 | /// <returns>A class containing folder information</returns> | 194 | /// <returns>A class containing folder information</returns> |
195 | public InventoryFolderBase getInventoryFolder(LLUUID folder) | 195 | public InventoryFolderBase getInventoryFolder(LLUUID folder) |
196 | { | 196 | { |
197 | using(ISession session = factory.OpenSession()) { | 197 | using (ISession session = factory.OpenSession()) { |
198 | try { | 198 | try { |
199 | return session.Load(typeof(InventoryFolderBase), folder) as InventoryFolderBase; | 199 | return session.Load(typeof(InventoryFolderBase), folder) as InventoryFolderBase; |
200 | } catch { | 200 | } catch { |
@@ -211,8 +211,8 @@ namespace OpenSim.Data.NHibernate | |||
211 | public void addInventoryFolder(InventoryFolderBase folder) | 211 | public void addInventoryFolder(InventoryFolderBase folder) |
212 | { | 212 | { |
213 | if (!ExistsFolder(folder.ID)) { | 213 | if (!ExistsFolder(folder.ID)) { |
214 | using(ISession session = factory.OpenSession()) { | 214 | using (ISession session = factory.OpenSession()) { |
215 | using(ITransaction transaction = session.BeginTransaction()) { | 215 | using (ITransaction transaction = session.BeginTransaction()) { |
216 | session.Save(folder); | 216 | session.Save(folder); |
217 | transaction.Commit(); | 217 | transaction.Commit(); |
218 | } | 218 | } |
@@ -230,8 +230,8 @@ namespace OpenSim.Data.NHibernate | |||
230 | public void updateInventoryFolder(InventoryFolderBase folder) | 230 | public void updateInventoryFolder(InventoryFolderBase folder) |
231 | { | 231 | { |
232 | if (ExistsFolder(folder.ID)) { | 232 | if (ExistsFolder(folder.ID)) { |
233 | using(ISession session = factory.OpenSession()) { | 233 | using (ISession session = factory.OpenSession()) { |
234 | using(ITransaction transaction = session.BeginTransaction()) { | 234 | using (ITransaction transaction = session.BeginTransaction()) { |
235 | session.Update(folder); | 235 | session.Update(folder); |
236 | transaction.Commit(); | 236 | transaction.Commit(); |
237 | } | 237 | } |
@@ -247,8 +247,8 @@ namespace OpenSim.Data.NHibernate | |||
247 | /// <param name="folder"></param> | 247 | /// <param name="folder"></param> |
248 | public void deleteInventoryFolder(LLUUID folderID) | 248 | public void deleteInventoryFolder(LLUUID folderID) |
249 | { | 249 | { |
250 | using(ISession session = factory.OpenSession()) { | 250 | using (ISession session = factory.OpenSession()) { |
251 | using(ITransaction transaction = session.BeginTransaction()) { | 251 | using (ITransaction transaction = session.BeginTransaction()) { |
252 | session.Delete(folderID.ToString()); | 252 | session.Delete(folderID.ToString()); |
253 | transaction.Commit(); | 253 | transaction.Commit(); |
254 | } | 254 | } |
@@ -324,10 +324,10 @@ namespace OpenSim.Data.NHibernate | |||
324 | /// <returns>A List of InventoryItemBase items</returns> | 324 | /// <returns>A List of InventoryItemBase items</returns> |
325 | public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) | 325 | public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) |
326 | { | 326 | { |
327 | using(ISession session = factory.OpenSession()) { | 327 | using (ISession session = factory.OpenSession()) { |
328 | // try { | 328 | // try { |
329 | ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); | 329 | ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); |
330 | criteria.Add(Expression.Eq("Folder", folderID) ); | 330 | criteria.Add(Expression.Eq("Folder", folderID)); |
331 | List<InventoryItemBase> list = new List<InventoryItemBase>(); | 331 | List<InventoryItemBase> list = new List<InventoryItemBase>(); |
332 | foreach (InventoryItemBase item in criteria.List()) | 332 | foreach (InventoryItemBase item in criteria.List()) |
333 | { | 333 | { |
@@ -348,11 +348,11 @@ namespace OpenSim.Data.NHibernate | |||
348 | // see InventoryItemBase.getUserRootFolder | 348 | // see InventoryItemBase.getUserRootFolder |
349 | public InventoryFolderBase getUserRootFolder(LLUUID user) | 349 | public InventoryFolderBase getUserRootFolder(LLUUID user) |
350 | { | 350 | { |
351 | using(ISession session = factory.OpenSession()) { | 351 | using (ISession session = factory.OpenSession()) { |
352 | // try { | 352 | // try { |
353 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 353 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
354 | criteria.Add(Expression.Eq("ParentID", LLUUID.Zero) ); | 354 | criteria.Add(Expression.Eq("ParentID", LLUUID.Zero)); |
355 | criteria.Add(Expression.Eq("Owner", user) ); | 355 | criteria.Add(Expression.Eq("Owner", user)); |
356 | foreach (InventoryFolderBase folder in criteria.List()) | 356 | foreach (InventoryFolderBase folder in criteria.List()) |
357 | { | 357 | { |
358 | return folder; | 358 | return folder; |
@@ -372,10 +372,10 @@ namespace OpenSim.Data.NHibernate | |||
372 | /// <param name="parentID">ID of parent</param> | 372 | /// <param name="parentID">ID of parent</param> |
373 | private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) | 373 | private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) |
374 | { | 374 | { |
375 | using(ISession session = factory.OpenSession()) { | 375 | using (ISession session = factory.OpenSession()) { |
376 | // try { | 376 | // try { |
377 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 377 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
378 | criteria.Add(Expression.Eq("ParentID", parentID) ); | 378 | criteria.Add(Expression.Eq("ParentID", parentID)); |
379 | foreach (InventoryFolderBase item in criteria.List()) | 379 | foreach (InventoryFolderBase item in criteria.List()) |
380 | { | 380 | { |
381 | folders.Add(item); | 381 | folders.Add(item); |
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index e680840..2c84ef9 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -88,14 +88,14 @@ namespace OpenSim.Data.NHibernate | |||
88 | string regex = @"no such table: UserProfiles"; | 88 | string regex = @"no such table: UserProfiles"; |
89 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 89 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
90 | try { | 90 | try { |
91 | using(ISession session = factory.OpenSession()) { | 91 | using (ISession session = factory.OpenSession()) { |
92 | session.Load(typeof(UserProfileData), LLUUID.Zero); | 92 | session.Load(typeof(UserProfileData), LLUUID.Zero); |
93 | } | 93 | } |
94 | } catch (ObjectNotFoundException) { | 94 | } catch (ObjectNotFoundException) { |
95 | // yes, we know it's not there, but that's ok | 95 | // yes, we know it's not there, but that's ok |
96 | } catch (ADOException e) { | 96 | } catch (ADOException e) { |
97 | Match m = RE.Match(e.ToString()); | 97 | Match m = RE.Match(e.ToString()); |
98 | if(m.Success) { | 98 | if (m.Success) { |
99 | // We don't have this table, so create it. | 99 | // We don't have this table, so create it. |
100 | new SchemaExport(cfg).Create(true, true); | 100 | new SchemaExport(cfg).Create(true, true); |
101 | } | 101 | } |
@@ -106,7 +106,7 @@ namespace OpenSim.Data.NHibernate | |||
106 | { | 106 | { |
107 | UserProfileData user = null; | 107 | UserProfileData user = null; |
108 | try { | 108 | try { |
109 | using(ISession session = factory.OpenSession()) { | 109 | using (ISession session = factory.OpenSession()) { |
110 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 110 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
111 | } | 111 | } |
112 | // BUG: CATCHALL IS BAD. | 112 | // BUG: CATCHALL IS BAD. |
@@ -119,7 +119,7 @@ namespace OpenSim.Data.NHibernate | |||
119 | { | 119 | { |
120 | UserProfileData user; | 120 | UserProfileData user; |
121 | // TODO: I'm sure I'll have to do something silly here | 121 | // TODO: I'm sure I'll have to do something silly here |
122 | using(ISession session = factory.OpenSession()) { | 122 | using (ISession session = factory.OpenSession()) { |
123 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 123 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
124 | user.CurrentAgent = GetAgentByUUID(uuid); | 124 | user.CurrentAgent = GetAgentByUUID(uuid); |
125 | } | 125 | } |
@@ -129,8 +129,8 @@ namespace OpenSim.Data.NHibernate | |||
129 | override public void AddNewUserProfile(UserProfileData profile) | 129 | override public void AddNewUserProfile(UserProfileData profile) |
130 | { | 130 | { |
131 | if (!ExistsUser(profile.ID)) { | 131 | if (!ExistsUser(profile.ID)) { |
132 | using(ISession session = factory.OpenSession()) { | 132 | using (ISession session = factory.OpenSession()) { |
133 | using(ITransaction transaction = session.BeginTransaction()) { | 133 | using (ITransaction transaction = session.BeginTransaction()) { |
134 | session.Save(profile); | 134 | session.Save(profile); |
135 | SetAgentData(profile.ID, profile.CurrentAgent, session); | 135 | SetAgentData(profile.ID, profile.CurrentAgent, session); |
136 | // TODO: save agent | 136 | // TODO: save agent |
@@ -166,8 +166,8 @@ namespace OpenSim.Data.NHibernate | |||
166 | override public bool UpdateUserProfile(UserProfileData profile) | 166 | override public bool UpdateUserProfile(UserProfileData profile) |
167 | { | 167 | { |
168 | if (ExistsUser(profile.ID)) { | 168 | if (ExistsUser(profile.ID)) { |
169 | using(ISession session = factory.OpenSession()) { | 169 | using (ISession session = factory.OpenSession()) { |
170 | using(ITransaction transaction = session.BeginTransaction()) { | 170 | using (ITransaction transaction = session.BeginTransaction()) { |
171 | session.Update(profile); | 171 | session.Update(profile); |
172 | SetAgentData(profile.ID, profile.CurrentAgent, session); | 172 | SetAgentData(profile.ID, profile.CurrentAgent, session); |
173 | transaction.Commit(); | 173 | transaction.Commit(); |
@@ -183,8 +183,8 @@ namespace OpenSim.Data.NHibernate | |||
183 | 183 | ||
184 | override public void AddNewUserAgent(UserAgentData agent) | 184 | override public void AddNewUserAgent(UserAgentData agent) |
185 | { | 185 | { |
186 | using(ISession session = factory.OpenSession()) { | 186 | using (ISession session = factory.OpenSession()) { |
187 | using(ITransaction transaction = session.BeginTransaction()) { | 187 | using (ITransaction transaction = session.BeginTransaction()) { |
188 | session.Save(agent); | 188 | session.Save(agent); |
189 | transaction.Commit(); | 189 | transaction.Commit(); |
190 | } | 190 | } |
@@ -193,8 +193,8 @@ namespace OpenSim.Data.NHibernate | |||
193 | 193 | ||
194 | public void UpdateUserAgent(UserAgentData agent) | 194 | public void UpdateUserAgent(UserAgentData agent) |
195 | { | 195 | { |
196 | using(ISession session = factory.OpenSession()) { | 196 | using (ISession session = factory.OpenSession()) { |
197 | using(ITransaction transaction = session.BeginTransaction()) { | 197 | using (ITransaction transaction = session.BeginTransaction()) { |
198 | session.Update(agent); | 198 | session.Update(agent); |
199 | transaction.Commit(); | 199 | transaction.Commit(); |
200 | } | 200 | } |
@@ -206,7 +206,7 @@ namespace OpenSim.Data.NHibernate | |||
206 | override public UserAgentData GetAgentByUUID(LLUUID uuid) | 206 | override public UserAgentData GetAgentByUUID(LLUUID uuid) |
207 | { | 207 | { |
208 | try { | 208 | try { |
209 | using(ISession session = factory.OpenSession()) { | 209 | using (ISession session = factory.OpenSession()) { |
210 | return session.Load(typeof(UserAgentData), uuid) as UserAgentData; | 210 | return session.Load(typeof(UserAgentData), uuid) as UserAgentData; |
211 | } | 211 | } |
212 | } catch { | 212 | } catch { |
@@ -216,7 +216,7 @@ namespace OpenSim.Data.NHibernate | |||
216 | 216 | ||
217 | override public UserProfileData GetUserByName(string fname, string lname) | 217 | override public UserProfileData GetUserByName(string fname, string lname) |
218 | { | 218 | { |
219 | using(ISession session = factory.OpenSession()) { | 219 | using (ISession session = factory.OpenSession()) { |
220 | ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); | 220 | ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); |
221 | criteria.Add(Expression.Eq("FirstName", fname)); | 221 | criteria.Add(Expression.Eq("FirstName", fname)); |
222 | criteria.Add(Expression.Eq("SurName", lname)); | 222 | criteria.Add(Expression.Eq("SurName", lname)); |
@@ -247,11 +247,11 @@ namespace OpenSim.Data.NHibernate | |||
247 | 247 | ||
248 | if (querysplit.Length == 2) | 248 | if (querysplit.Length == 2) |
249 | { | 249 | { |
250 | using(ISession session = factory.OpenSession()) { | 250 | using (ISession session = factory.OpenSession()) { |
251 | ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); | 251 | ICriteria criteria = session.CreateCriteria(typeof(UserProfileData)); |
252 | criteria.Add(Expression.Like("FirstName", querysplit[0])); | 252 | criteria.Add(Expression.Like("FirstName", querysplit[0])); |
253 | criteria.Add(Expression.Like("SurName", querysplit[1])); | 253 | criteria.Add(Expression.Like("SurName", querysplit[1])); |
254 | foreach(UserProfileData profile in criteria.List()) | 254 | foreach (UserProfileData profile in criteria.List()) |
255 | { | 255 | { |
256 | AvatarPickerAvatar user = new AvatarPickerAvatar(); | 256 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
257 | user.AvatarID = profile.ID; | 257 | user.AvatarID = profile.ID; |
@@ -280,7 +280,7 @@ namespace OpenSim.Data.NHibernate | |||
280 | { | 280 | { |
281 | UserAppearance appearance; | 281 | UserAppearance appearance; |
282 | // TODO: I'm sure I'll have to do something silly here | 282 | // TODO: I'm sure I'll have to do something silly here |
283 | using(ISession session = factory.OpenSession()) { | 283 | using (ISession session = factory.OpenSession()) { |
284 | appearance = session.Load(typeof(UserAppearance), user) as UserAppearance; | 284 | appearance = session.Load(typeof(UserAppearance), user) as UserAppearance; |
285 | } | 285 | } |
286 | return appearance; | 286 | return appearance; |
@@ -289,7 +289,7 @@ namespace OpenSim.Data.NHibernate | |||
289 | private bool ExistsAppearance(LLUUID uuid) | 289 | private bool ExistsAppearance(LLUUID uuid) |
290 | { | 290 | { |
291 | UserAppearance appearance; | 291 | UserAppearance appearance; |
292 | using(ISession session = factory.OpenSession()) { | 292 | using (ISession session = factory.OpenSession()) { |
293 | appearance = session.Load(typeof(UserAppearance), uuid) as UserAppearance; | 293 | appearance = session.Load(typeof(UserAppearance), uuid) as UserAppearance; |
294 | } | 294 | } |
295 | return (appearance == null) ? false : true; | 295 | return (appearance == null) ? false : true; |
@@ -299,8 +299,8 @@ namespace OpenSim.Data.NHibernate | |||
299 | override public void UpdateUserAppearance(LLUUID user, UserAppearance appearance) | 299 | override public void UpdateUserAppearance(LLUUID user, UserAppearance appearance) |
300 | { | 300 | { |
301 | bool exists = ExistsAppearance(user); | 301 | bool exists = ExistsAppearance(user); |
302 | using(ISession session = factory.OpenSession()) { | 302 | using (ISession session = factory.OpenSession()) { |
303 | using(ITransaction transaction = session.BeginTransaction()) { | 303 | using (ITransaction transaction = session.BeginTransaction()) { |
304 | if (exists) { | 304 | if (exists) { |
305 | session.Update(appearance); | 305 | session.Update(appearance); |
306 | } else { | 306 | } else { |
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs index fe49978..cb3d33d 100644 --- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs +++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs | |||
@@ -143,7 +143,7 @@ namespace OpenSim.Data | |||
143 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 143 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
144 | 144 | ||
145 | PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); | 145 | PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); |
146 | mapper.FillObject( reader ); | 146 | mapper.FillObject(reader); |
147 | 147 | ||
148 | return mapper; | 148 | return mapper; |
149 | } | 149 | } |
@@ -162,7 +162,7 @@ namespace OpenSim.Data | |||
162 | 162 | ||
163 | private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) | 163 | private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) |
164 | { | 164 | { |
165 | PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper( m_schema, primitiveBaseShape ); | 165 | PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, primitiveBaseShape); |
166 | mapper.SceneObjectPartId = sceneObjectPartId; | 166 | mapper.SceneObjectPartId = sceneObjectPartId; |
167 | return mapper; | 167 | return mapper; |
168 | } | 168 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index fa5d5e2..f3a4bd1 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Data.SQLite | |||
155 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 155 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
156 | using (IDataReader reader = cmd.ExecuteReader()) | 156 | using (IDataReader reader = cmd.ExecuteReader()) |
157 | { | 157 | { |
158 | if(reader.Read()) | 158 | if (reader.Read()) |
159 | { | 159 | { |
160 | reader.Close(); | 160 | reader.Close(); |
161 | return true; | 161 | return true; |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 399b3b9..705f369 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
196 | /// <param name="restMethod"></param> | 196 | /// <param name="restMethod"></param> |
197 | public void DeregisterHandlers() | 197 | public void DeregisterHandlers() |
198 | { | 198 | { |
199 | foreach(string capsName in m_capsHandlers.Caps) | 199 | foreach (string capsName in m_capsHandlers.Caps) |
200 | { | 200 | { |
201 | m_capsHandlers.Remove(capsName); | 201 | m_capsHandlers.Remove(capsName); |
202 | } | 202 | } |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs index 13361c7..e869267 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs | |||
@@ -37,7 +37,7 @@ using libsecondlife; | |||
37 | namespace OpenSim.Framework.Communications.Capabilities | 37 | namespace OpenSim.Framework.Communications.Capabilities |
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// Borrowed from (a older version of ) libsl for now, as their new llsd code doesn't work we our decoding code. | 40 | /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code. |
41 | /// </summary> | 41 | /// </summary> |
42 | public static class LLSD | 42 | public static class LLSD |
43 | { | 43 | { |
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 018b51f..82002c2 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -31,7 +31,7 @@ namespace OpenSim.Framework | |||
31 | { | 31 | { |
32 | public delegate void restart(RegionInfo thisRegion); | 32 | public delegate void restart(RegionInfo thisRegion); |
33 | 33 | ||
34 | //public delegate void regionup ( RegionInfo thisRegion ); | 34 | //public delegate void regionup (RegionInfo thisRegion); |
35 | 35 | ||
36 | public enum RegionStatus : int | 36 | public enum RegionStatus : int |
37 | { | 37 | { |
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index 5eac9de..af8efe8 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs | |||
@@ -163,7 +163,7 @@ namespace OpenSim.Framework | |||
163 | { | 163 | { |
164 | PacketType type=packet.Type; | 164 | PacketType type=packet.Type; |
165 | 165 | ||
166 | if(pool[type] == null) | 166 | if (pool[type] == null) |
167 | { | 167 | { |
168 | pool[type] = new Stack(); | 168 | pool[type] = new Stack(); |
169 | } | 169 | } |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 88c9ea6..8380633 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -122,7 +122,7 @@ namespace OpenSim.Framework | |||
122 | get | 122 | get |
123 | { | 123 | { |
124 | // Old one defaults to IPv6 | 124 | // Old one defaults to IPv6 |
125 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); | 125 | //return new IPEndPoint(Dns.GetHostAddresses(m_externalHostName)[0], m_internalEndPoint.Port); |
126 | 126 | ||
127 | IPAddress ia = null; | 127 | IPAddress ia = null; |
128 | // If it is already an IP, don't resolve it - just return directly | 128 | // If it is already an IP, don't resolve it - just return directly |
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs index 97aa8db..a87d5ef 100644 --- a/OpenSim/Framework/SerializableRegionInfo.cs +++ b/OpenSim/Framework/SerializableRegionInfo.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Framework | |||
116 | get | 116 | get |
117 | { | 117 | { |
118 | // Old one defaults to IPv6 | 118 | // Old one defaults to IPv6 |
119 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); | 119 | //return new IPEndPoint(Dns.GetHostAddresses(m_externalHostName)[0], m_internalEndPoint.Port); |
120 | 120 | ||
121 | IPAddress ia = null; | 121 | IPAddress ia = null; |
122 | // If it is already an IP, don't resolve it - just return directly | 122 | // If it is already an IP, don't resolve it - just return directly |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 2f495a9..f36b2fb 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -412,7 +412,7 @@ namespace OpenSim.Framework.Servers | |||
412 | 412 | ||
413 | public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response) | 413 | public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response) |
414 | { | 414 | { |
415 | switch( request.HttpMethod ) | 415 | switch (request.HttpMethod) |
416 | { | 416 | { |
417 | case "OPTIONS": | 417 | case "OPTIONS": |
418 | response.StatusCode = 200; | 418 | response.StatusCode = 200; |
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index b8ad83a..344309d 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -54,9 +54,9 @@ namespace OpenSim.Framework.Servers | |||
54 | /// </summary> | 54 | /// </summary> |
55 | public virtual void Shutdown() | 55 | public virtual void Shutdown() |
56 | { | 56 | { |
57 | if(m_console != null) | 57 | if (m_console != null) |
58 | { | 58 | { |
59 | m_console.Close(); | 59 | m_console.Close(); |
60 | } | 60 | } |
61 | Environment.Exit(0); | 61 | Environment.Exit(0); |
62 | } | 62 | } |
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Servers | |||
112 | /// </summary> | 112 | /// </summary> |
113 | private void Notice(string msg) | 113 | private void Notice(string msg) |
114 | { | 114 | { |
115 | if(m_console != null) | 115 | if (m_console != null) |
116 | { | 116 | { |
117 | m_console.Notice(msg); | 117 | m_console.Notice(msg); |
118 | } | 118 | } |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 84a515c..c2c212c 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -371,7 +371,7 @@ namespace OpenSim.Grid.GridServer | |||
371 | catch (FormatException e) | 371 | catch (FormatException e) |
372 | { | 372 | { |
373 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); | 373 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); |
374 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString() ); | 374 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); |
375 | } | 375 | } |
376 | 376 | ||
377 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); | 377 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); |
@@ -406,7 +406,7 @@ namespace OpenSim.Grid.GridServer | |||
406 | { | 406 | { |
407 | DataResponse insertResponse; | 407 | DataResponse insertResponse; |
408 | 408 | ||
409 | if( existingSim == null ) | 409 | if (existingSim == null) |
410 | { | 410 | { |
411 | insertResponse = kvp.Value.AddProfile(sim); | 411 | insertResponse = kvp.Value.AddProfile(sim); |
412 | } | 412 | } |
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index aeaead5..88a9561 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Grid.GridServer | |||
87 | 87 | ||
88 | AddHttpHandlers(); | 88 | AddHttpHandlers(); |
89 | 89 | ||
90 | LoadGridPlugins( ); | 90 | LoadGridPlugins(); |
91 | 91 | ||
92 | m_httpServer.Start(); | 92 | m_httpServer.Start(); |
93 | 93 | ||
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs index da359a7..b6b2b64 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs | |||
@@ -39,7 +39,7 @@ namespace OpenGridServices.Manager | |||
39 | 39 | ||
40 | protected virtual void OnResponse(object o, Gtk.ResponseArgs args) | 40 | protected virtual void OnResponse(object o, Gtk.ResponseArgs args) |
41 | { | 41 | { |
42 | switch(args.ResponseId) { | 42 | switch (args.ResponseId) { |
43 | case Gtk.ResponseType.Ok: | 43 | case Gtk.ResponseType.Ok: |
44 | MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); | 44 | MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); |
45 | break; | 45 | break; |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs index 995dd8c..a386fa8 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs | |||
@@ -55,7 +55,7 @@ namespace OpenGridServices.Manager | |||
55 | LoginParams.Add(LoginParamsHT); | 55 | LoginParams.Add(LoginParamsHT); |
56 | XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); | 56 | XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); |
57 | XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); | 57 | XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); |
58 | if(GridResp.IsFault) { | 58 | if (GridResp.IsFault) { |
59 | connected=false; | 59 | connected=false; |
60 | return false; | 60 | return false; |
61 | } else { | 61 | } else { |
@@ -87,14 +87,15 @@ namespace OpenGridServices.Manager | |||
87 | // TODO - ERROR! | 87 | // TODO - ERROR! |
88 | } | 88 | } |
89 | 89 | ||
90 | for(int i=0; i<=rootnode.ChildNodes.Count; i++) | 90 | for (int i = 0; i <= rootnode.ChildNodes.Count; i++) |
91 | { | 91 | { |
92 | if(rootnode.ChildNodes.Item(i).Name != "region") { | 92 | if (rootnode.ChildNodes.Item(i).Name != "region") |
93 | { | ||
93 | // TODO - ERROR! | 94 | // TODO - ERROR! |
94 | } else { | 95 | } |
96 | else | ||
97 | { | ||
95 | TempRegionData = new RegionBlock(); | 98 | TempRegionData = new RegionBlock(); |
96 | |||
97 | |||
98 | } | 99 | } |
99 | } | 100 | } |
100 | } | 101 | } |
@@ -112,8 +113,8 @@ namespace OpenGridServices.Manager | |||
112 | ShutdownParamsHT["session_id"]=this.SessionID.ToString(); | 113 | ShutdownParamsHT["session_id"]=this.SessionID.ToString(); |
113 | ShutdownParams.Add(ShutdownParamsHT); | 114 | ShutdownParams.Add(ShutdownParamsHT); |
114 | XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); | 115 | XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); |
115 | XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL,3000); | 116 | XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL, 3000); |
116 | if(GridResp.IsFault) { | 117 | if (GridResp.IsFault) { |
117 | return false; | 118 | return false; |
118 | } else { | 119 | } else { |
119 | connected=false; | 120 | connected=false; |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs index 33e577d..6b7a5ab 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs | |||
@@ -45,7 +45,7 @@ namespace OpenGridServices.Manager | |||
45 | 45 | ||
46 | public static void DoMainLoop() | 46 | public static void DoMainLoop() |
47 | { | 47 | { |
48 | while(!QuitReq) | 48 | while (!QuitReq) |
49 | { | 49 | { |
50 | Application.RunIteration(); | 50 | Application.RunIteration(); |
51 | } | 51 | } |
@@ -57,15 +57,15 @@ namespace OpenGridServices.Manager | |||
57 | string cmd; | 57 | string cmd; |
58 | char[] sep = new char[1]; | 58 | char[] sep = new char[1]; |
59 | sep[0]=' '; | 59 | sep[0]=' '; |
60 | while(!QuitReq) | 60 | while (!QuitReq) |
61 | { | 61 | { |
62 | operation=PendingOperations.Dequeue(); | 62 | operation=PendingOperations.Dequeue(); |
63 | Console.WriteLine(operation); | 63 | Console.WriteLine(operation); |
64 | cmd = operation.Split(sep)[0]; | 64 | cmd = operation.Split(sep)[0]; |
65 | switch(cmd) { | 65 | switch (cmd) { |
66 | case "connect_to_gridserver": | 66 | case "connect_to_gridserver": |
67 | win.SetStatus("Connecting to grid server..."); | 67 | win.SetStatus("Connecting to grid server..."); |
68 | if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) { | 68 | if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3])) { |
69 | win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); | 69 | win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); |
70 | win.SetGridServerConnected(true); | 70 | win.SetGridServerConnected(true); |
71 | Thread.Sleep(3000); | 71 | Thread.Sleep(3000); |
@@ -78,7 +78,7 @@ namespace OpenGridServices.Manager | |||
78 | 78 | ||
79 | case "restart_gridserver": | 79 | case "restart_gridserver": |
80 | win.SetStatus("Restarting grid server..."); | 80 | win.SetStatus("Restarting grid server..."); |
81 | if(gridserverConn.RestartServer()) { | 81 | if (gridserverConn.RestartServer()) { |
82 | win.SetStatus("Restarted server OK"); | 82 | win.SetStatus("Restarted server OK"); |
83 | Thread.Sleep(3000); | 83 | Thread.Sleep(3000); |
84 | win.SetStatus(""); | 84 | win.SetStatus(""); |
@@ -89,7 +89,7 @@ namespace OpenGridServices.Manager | |||
89 | 89 | ||
90 | case "shutdown_gridserver": | 90 | case "shutdown_gridserver": |
91 | win.SetStatus("Shutting down grid server..."); | 91 | win.SetStatus("Shutting down grid server..."); |
92 | if(gridserverConn.ShutdownServer()) { | 92 | if (gridserverConn.ShutdownServer()) { |
93 | win.SetStatus("Grid server shutdown"); | 93 | win.SetStatus("Grid server shutdown"); |
94 | win.SetGridServerConnected(false); | 94 | win.SetGridServerConnected(false); |
95 | Thread.Sleep(3000); | 95 | Thread.Sleep(3000); |
diff --git a/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 764c1ab..3411465 100644 --- a/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -364,21 +364,21 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
364 | List<string> llList2List(List<string> src, int start, int end); | 364 | List<string> llList2List(List<string> src, int start, int end); |
365 | //wiki: llDeleteSubList(list src, integer start, integer end) | 365 | //wiki: llDeleteSubList(list src, integer start, integer end) |
366 | List<string> llDeleteSubList(List<string> src, int start, int end); | 366 | List<string> llDeleteSubList(List<string> src, int start, int end); |
367 | //wiki: integer llGetListEntryType( list src, integer index ) | 367 | //wiki: integer llGetListEntryType(list src, integer index) |
368 | int llGetListEntryType(List<string> src, int index); | 368 | int llGetListEntryType(List<string> src, int index); |
369 | //wiki: string llList2CSV( list src ) | 369 | //wiki: string llList2CSV(list src) |
370 | string llList2CSV(List<string> src); | 370 | string llList2CSV(List<string> src); |
371 | //wiki: list llCSV2List( string src ) | 371 | //wiki: list llCSV2List(string src) |
372 | List<string> llCSV2List(string src); | 372 | List<string> llCSV2List(string src); |
373 | //wiki: list llListRandomize( list src, integer stride ) | 373 | //wiki: list llListRandomize(list src, integer stride) |
374 | List<string> llListRandomize(List<string> src, int stride); | 374 | List<string> llListRandomize(List<string> src, int stride); |
375 | //wiki: list llList2ListStrided( list src, integer start, integer end, integer stride ) | 375 | //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride) |
376 | List<string> llList2ListStrided(List<string> src, int start, int end, int stride); | 376 | List<string> llList2ListStrided(List<string> src, int start, int end, int stride); |
377 | //wiki: vector llGetRegionCorner( ) | 377 | //wiki: vector llGetRegionCorner() |
378 | LSL_Types.Vector3 llGetRegionCorner(); | 378 | LSL_Types.Vector3 llGetRegionCorner(); |
379 | //wiki: list llListInsertList( list dest, list src, integer start ) | 379 | //wiki: list llListInsertList(list dest, list src, integer start) |
380 | List<string> llListInsertList(List<string> dest, List<string> src, int start); | 380 | List<string> llListInsertList(List<string> dest, List<string> src, int start); |
381 | //wiki: integer llListFindList( list src, list test ) | 381 | //wiki: integer llListFindList(list src, list test) |
382 | int llListFindList(List<string> src, List<string> test); | 382 | int llListFindList(List<string> src, List<string> test); |
383 | //wiki: string llGetObjectName() | 383 | //wiki: string llGetObjectName() |
384 | string llGetObjectName(); | 384 | string llGetObjectName(); |
@@ -469,7 +469,7 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
469 | void llDumpList2String(); | 469 | void llDumpList2String(); |
470 | //wiki: integer llScriptDanger(vector pos) | 470 | //wiki: integer llScriptDanger(vector pos) |
471 | void llScriptDanger(LSL_Types.Vector3 pos); | 471 | void llScriptDanger(LSL_Types.Vector3 pos); |
472 | //wiki: llDialog( key avatar, string message, list buttons, integer chat_channel ) | 472 | //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel) |
473 | void llDialog(string avatar, string message, List<string> buttons, int chat_channel); | 473 | void llDialog(string avatar, string message, List<string> buttons, int chat_channel); |
474 | //wiki: llVolumeDetect(integer detect) | 474 | //wiki: llVolumeDetect(integer detect) |
475 | void llVolumeDetect(int detect); | 475 | void llVolumeDetect(int detect); |
@@ -493,7 +493,7 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
493 | void llCloseRemoteDataChannel(string channel); | 493 | void llCloseRemoteDataChannel(string channel); |
494 | //wiki: string llMD5String(string src, integer nonce) | 494 | //wiki: string llMD5String(string src, integer nonce) |
495 | string llMD5String(string src, int nonce); | 495 | string llMD5String(string src, int nonce); |
496 | //wiki: llSetPrimitiveParams( list rules ) | 496 | //wiki: llSetPrimitiveParams(list rules) |
497 | void llSetPrimitiveParams(List<string> rules); | 497 | void llSetPrimitiveParams(List<string> rules); |
498 | //wiki: string llStringToBase64(string str) | 498 | //wiki: string llStringToBase64(string str) |
499 | string llStringToBase64(string str); | 499 | string llStringToBase64(string str); |
@@ -507,7 +507,7 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
507 | double llLog10(double val); | 507 | double llLog10(double val); |
508 | //wiki: double llLog(double val) | 508 | //wiki: double llLog(double val) |
509 | double llLog(double val); | 509 | double llLog(double val); |
510 | //wiki: list llGetAnimationList( key id ) | 510 | //wiki: list llGetAnimationList(key id) |
511 | List<string> llGetAnimationList(string id); | 511 | List<string> llGetAnimationList(string id); |
512 | //wiki: llSetParcelMusicURL(string url) | 512 | //wiki: llSetParcelMusicURL(string url) |
513 | void llSetParcelMusicURL(string url); | 513 | void llSetParcelMusicURL(string url); |
@@ -529,7 +529,7 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
529 | int llGetNumberOfPrims(); | 529 | int llGetNumberOfPrims(); |
530 | //wiki: key llGetNumberOfNotecardLines(string name) | 530 | //wiki: key llGetNumberOfNotecardLines(string name) |
531 | string llGetNumberOfNotecardLines(string name); | 531 | string llGetNumberOfNotecardLines(string name); |
532 | //wiki: list llGetBoundingBox( key object ) | 532 | //wiki: list llGetBoundingBox(key object) |
533 | List<string> llGetBoundingBox(string obj); | 533 | List<string> llGetBoundingBox(string obj); |
534 | //wiki: vector llGetGeometricCenter() | 534 | //wiki: vector llGetGeometricCenter() |
535 | LSL_Types.Vector3 llGetGeometricCenter(); | 535 | LSL_Types.Vector3 llGetGeometricCenter(); |
@@ -544,7 +544,7 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
544 | string llGetSimulatorHostname(); | 544 | string llGetSimulatorHostname(); |
545 | //llSetLocalRot(rotation rot) | 545 | //llSetLocalRot(rotation rot) |
546 | void llSetLocalRot(LSL_Types.Quaternion rot); | 546 | void llSetLocalRot(LSL_Types.Quaternion rot); |
547 | //wiki: list llParseStringKeepNulls( string src, list separators, list spacers ) | 547 | //wiki: list llParseStringKeepNulls(string src, list separators, list spacers) |
548 | List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers); | 548 | List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers); |
549 | //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) | 549 | //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) |
550 | void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, | 550 | void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, |
@@ -571,14 +571,14 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
571 | void llListReplaceList(); | 571 | void llListReplaceList(); |
572 | //wiki: llLoadURL(key avatar_id, string message, string url) | 572 | //wiki: llLoadURL(key avatar_id, string message, string url) |
573 | void llLoadURL(string avatar_id, string message, string url); | 573 | void llLoadURL(string avatar_id, string message, string url); |
574 | //wiki: llParcelMediaCommandList( list commandList ) | 574 | //wiki: llParcelMediaCommandList(list commandList) |
575 | void llParcelMediaCommandList(List<string> commandList); | 575 | void llParcelMediaCommandList(List<string> commandList); |
576 | void llParcelMediaQuery(); | 576 | void llParcelMediaQuery(); |
577 | //wiki integer llModPow(integer a, integer b, integer c) | 577 | //wiki integer llModPow(integer a, integer b, integer c) |
578 | int llModPow(int a, int b, int c); | 578 | int llModPow(int a, int b, int c); |
579 | //wiki: integer llGetInventoryType(string name) | 579 | //wiki: integer llGetInventoryType(string name) |
580 | int llGetInventoryType(string name); | 580 | int llGetInventoryType(string name); |
581 | //wiki: llSetPayPrice( integer price, list quick_pay_buttons ) | 581 | //wiki: llSetPayPrice(integer price, list quick_pay_buttons) |
582 | void llSetPayPrice(int price, List<string> quick_pay_buttons); | 582 | void llSetPayPrice(int price, List<string> quick_pay_buttons); |
583 | //wiki: vector llGetCameraPos() | 583 | //wiki: vector llGetCameraPos() |
584 | LSL_Types.Vector3 llGetCameraPos(); | 584 | LSL_Types.Vector3 llGetCameraPos(); |
@@ -600,11 +600,11 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
600 | void llRemoveFromLandPassList(string avatar); | 600 | void llRemoveFromLandPassList(string avatar); |
601 | //wiki: llRemoveFromLandBanList(key avatar) | 601 | //wiki: llRemoveFromLandBanList(key avatar) |
602 | void llRemoveFromLandBanList(string avatar); | 602 | void llRemoveFromLandBanList(string avatar); |
603 | //wiki: llSetCameraParams( list rules ) | 603 | //wiki: llSetCameraParams(list rules) |
604 | void llSetCameraParams(List<string> rules); | 604 | void llSetCameraParams(List<string> rules); |
605 | //wiki: llClearCameraParams() | 605 | //wiki: llClearCameraParams() |
606 | void llClearCameraParams(); | 606 | void llClearCameraParams(); |
607 | //wiki: double llListStatistics( integer operation, list src ) | 607 | //wiki: double llListStatistics(integer operation, list src) |
608 | double llListStatistics(int operation, List<string> src); | 608 | double llListStatistics(int operation, List<string> src); |
609 | //wiki: integer llGetUnixTime() | 609 | //wiki: integer llGetUnixTime() |
610 | int llGetUnixTime(); | 610 | int llGetUnixTime(); |
@@ -621,11 +621,11 @@ namespace OpenSim.Grid.ScriptEngine.Common | |||
621 | void llResetLandPassList(); | 621 | void llResetLandPassList(); |
622 | //wiki integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) | 622 | //wiki integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) |
623 | int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); | 623 | int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); |
624 | //wiki: list llGetParcelPrimOwners( vector pos ) | 624 | //wiki: list llGetParcelPrimOwners(vector pos) |
625 | List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos); | 625 | List<string> llGetParcelPrimOwners(LSL_Types.Vector3 pos); |
626 | //wiki: integer llGetObjectPrimCount(key object_id) | 626 | //wiki: integer llGetObjectPrimCount(key object_id) |
627 | int llGetObjectPrimCount(string object_id); | 627 | int llGetObjectPrimCount(string object_id); |
628 | //wiki: integer llGetParcelMaxPrims( vector pos, integer sim_wide ) | 628 | //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide) |
629 | int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); | 629 | int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); |
630 | //wiki list llGetParcelDetails(vector pos, list params) | 630 | //wiki list llGetParcelDetails(vector pos, list params) |
631 | List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param); | 631 | List<string> llGetParcelDetails(LSL_Types.Vector3 pos, List<string> param); |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 3b5ecb5..64d3493 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -1333,7 +1333,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler | |||
1333 | if (chunk.Count > 0) | 1333 | if (chunk.Count > 0) |
1334 | tmp.Add(chunk); | 1334 | tmp.Add(chunk); |
1335 | 1335 | ||
1336 | // Decreate (<- what kind of word is that? :D ) array back into a list | 1336 | // Decreate (<- what kind of word is that? :D) array back into a list |
1337 | int rnd; | 1337 | int rnd; |
1338 | List<string> ret = new List<string>(); | 1338 | List<string> ret = new List<string>(); |
1339 | while (tmp.Count > 0) | 1339 | while (tmp.Count > 0) |
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index 2162403..0f29bbe 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs | |||
@@ -65,7 +65,7 @@ namespace OpenUser.Config.UserConfigDb4o | |||
65 | { | 65 | { |
66 | db = Db4oFactory.OpenFile("openuser.yap"); | 66 | db = Db4oFactory.OpenFile("openuser.yap"); |
67 | IObjectSet result = db.Get(typeof(DbUserConfig)); | 67 | IObjectSet result = db.Get(typeof(DbUserConfig)); |
68 | if(result.Count==1) | 68 | if (result.Count == 1) |
69 | { | 69 | { |
70 | m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); | 70 | m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); |
71 | foreach (DbUserConfig cfg in result) | 71 | foreach (DbUserConfig cfg in result) |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index e1ccd02..7cd2431 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -266,8 +266,8 @@ namespace OpenSim.Grid.UserServer | |||
266 | float positionZ, string firstname, string lastname) | 266 | float positionZ, string firstname, string lastname) |
267 | { | 267 | { |
268 | 268 | ||
269 | m_messagesService.TellMessageServersAboutUser( agentID, sessionID, RegionID, regionhandle, positionX, | 269 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, |
270 | positionY, positionZ, firstname, lastname); | 270 | positionY, positionZ, firstname, lastname); |
271 | } | 271 | } |
272 | } | 272 | } |
273 | } | 273 | } |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 28f5c4c..4e9728e 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -159,7 +159,7 @@ namespace OpenSim.Grid.UserServer | |||
159 | ulong regionhandle, float positionX, float positionY, | 159 | ulong regionhandle, float positionX, float positionY, |
160 | float positionZ, string firstname, string lastname) | 160 | float positionZ, string firstname, string lastname) |
161 | { | 161 | { |
162 | // Loop over registered Message Servers ( AND THERE WILL BE MORE THEN ONE :D ) | 162 | // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D) |
163 | lock (MessageServers) | 163 | lock (MessageServers) |
164 | { | 164 | { |
165 | if (MessageServers.Count > 0) | 165 | if (MessageServers.Count > 0) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b8f055e..af20687 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1204,11 +1204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1204 | 1204 | ||
1205 | public void SendPayPrice(LLUUID objectID, int[] payPrice) | 1205 | public void SendPayPrice(LLUUID objectID, int[] payPrice) |
1206 | { | 1206 | { |
1207 | if(payPrice[0] == 0 && | 1207 | if (payPrice[0] == 0 && |
1208 | payPrice[1] == 0 && | 1208 | payPrice[1] == 0 && |
1209 | payPrice[2] == 0 && | 1209 | payPrice[2] == 0 && |
1210 | payPrice[3] == 0 && | 1210 | payPrice[3] == 0 && |
1211 | payPrice[4] == 0) | 1211 | payPrice[4] == 0) |
1212 | return; | 1212 | return; |
1213 | 1213 | ||
1214 | PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply); | 1214 | PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply); |
@@ -3094,7 +3094,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3094 | return true; | 3094 | return true; |
3095 | } | 3095 | } |
3096 | 3096 | ||
3097 | |||
3098 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) | 3097 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) |
3099 | { | 3098 | { |
3100 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); | 3099 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); |
@@ -3108,13 +3107,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3108 | 3107 | ||
3109 | OutPacket(scriptQuestion, ThrottleOutPacketType.Task); | 3108 | OutPacket(scriptQuestion, ThrottleOutPacketType.Task); |
3110 | } | 3109 | } |
3110 | |||
3111 | private void InitDefaultAnimations() | 3111 | private void InitDefaultAnimations() |
3112 | { | 3112 | { |
3113 | } | 3113 | } |
3114 | 3114 | ||
3115 | public LLUUID GetDefaultAnimation(string name) | 3115 | public LLUUID GetDefaultAnimation(string name) |
3116 | { | 3116 | { |
3117 | if(m_defaultAnimations.ContainsKey(name)) | 3117 | if (m_defaultAnimations.ContainsKey(name)) |
3118 | return m_defaultAnimations[name]; | 3118 | return m_defaultAnimations[name]; |
3119 | return LLUUID.Zero; | 3119 | return LLUUID.Zero; |
3120 | } | 3120 | } |
@@ -3318,8 +3318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3318 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; | 3318 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; |
3319 | if (handlerUpdatePrimGroupScale != null) | 3319 | if (handlerUpdatePrimGroupScale != null) |
3320 | { | 3320 | { |
3321 | 3321 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | |
3322 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); | ||
3323 | handlerUpdatePrimGroupScale(localId, scale5, this); | 3322 | handlerUpdatePrimGroupScale(localId, scale5, this); |
3324 | handlerUpdateVector = OnUpdatePrimGroupPosition; | 3323 | handlerUpdateVector = OnUpdatePrimGroupPosition; |
3325 | 3324 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 95510e1..5f83b50 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -369,7 +369,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
369 | protected virtual void AddNewClient(Packet packet) | 369 | protected virtual void AddNewClient(Packet packet) |
370 | { | 370 | { |
371 | //Slave regions don't accept new clients | 371 | //Slave regions don't accept new clients |
372 | if(m_localScene.Region_Status != RegionStatus.SlaveScene) | 372 | if (m_localScene.Region_Status != RegionStatus.SlaveScene) |
373 | { | 373 | { |
374 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; | 374 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; |
375 | lock (clientCircuits) | 375 | lock (clientCircuits) |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index c48292a..b2550af 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Communications.Local | |||
91 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); | 91 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); |
92 | if (!m_regions.ContainsKey(regionInfo.RegionHandle)) | 92 | if (!m_regions.ContainsKey(regionInfo.RegionHandle)) |
93 | { | 93 | { |
94 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); | 94 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle); |
95 | m_regions.Add(regionInfo.RegionHandle, regionInfo); | 95 | m_regions.Add(regionInfo.RegionHandle, regionInfo); |
96 | 96 | ||
97 | RegionCommsListener regionHost = new RegionCommsListener(); | 97 | RegionCommsListener regionHost = new RegionCommsListener(); |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Communications.Local | |||
180 | 180 | ||
181 | public RegionInfo RequestClosestRegion(string regionName) | 181 | public RegionInfo RequestClosestRegion(string regionName) |
182 | { | 182 | { |
183 | foreach(RegionInfo regInfo in m_regions.Values) | 183 | foreach (RegionInfo regInfo in m_regions.Values) |
184 | { | 184 | { |
185 | if (regInfo.RegionName == regionName) return regInfo; | 185 | if (regInfo.RegionName == regionName) return regInfo; |
186 | } | 186 | } |
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index c7ee233..1b50bbd 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs | |||
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer | |||
171 | { | 171 | { |
172 | if (Data.Length < 1000) | 172 | if (Data.Length < 1000) |
173 | { | 173 | { |
174 | // for now (testing ) we only support files under 1000 bytes | 174 | // for now (testing) we only support files under 1000 bytes |
175 | byte[] transferData = new byte[Data.Length + 4]; | 175 | byte[] transferData = new byte[Data.Length + 4]; |
176 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); | 176 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); |
177 | Array.Copy(Data, 0, transferData, 4, Data.Length); | 177 | Array.Copy(Data, 0, transferData, 4, Data.Length); |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 0236e5f..b319370 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -278,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
278 | list.Add(entry.AgentID); | 278 | list.Add(entry.AgentID); |
279 | } | 279 | } |
280 | } | 280 | } |
281 | if(list.Count == 0) | 281 | if (list.Count == 0) |
282 | { | 282 | { |
283 | list.Add(LLUUID.Zero); | 283 | list.Add(LLUUID.Zero); |
284 | } | 284 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 2900b8c..44f5c2d 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
220 | } | 220 | } |
221 | protected void DebugPermissionInformation(string permissionCalled) | 221 | protected void DebugPermissionInformation(string permissionCalled) |
222 | { | 222 | { |
223 | if(m_debugPermissions) | 223 | if (m_debugPermissions) |
224 | m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); | 224 | m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); |
225 | } | 225 | } |
226 | 226 | ||
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
240 | if (user != LLUUID.Zero) | 240 | if (user != LLUUID.Zero) |
241 | { | 241 | { |
242 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; | 242 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; |
243 | foreach(LLUUID estatemanager in estatemanagers) | 243 | foreach (LLUUID estatemanager in estatemanagers) |
244 | { | 244 | { |
245 | if (estatemanager == user) | 245 | if (estatemanager == user) |
246 | return true; | 246 | return true; |
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index 0314562..beb74ce 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Environment.Modules | |||
65 | private double d_day_length = 4; // A VW day is 4 RW hours long | 65 | private double d_day_length = 4; // A VW day is 4 RW hours long |
66 | private int d_year_length = 60; // There are 60 VW days in a VW year | 66 | private int d_year_length = 60; // There are 60 VW days in a VW year |
67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 | 67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 |
68 | private double d_longitude = -73.53; | 68 | private double d_longitude = -73.53; |
69 | private double d_latitude = 41.29; | 69 | private double d_latitude = 41.29; |
70 | 70 | ||
71 | // Frame counter | 71 | // Frame counter |
@@ -155,48 +155,44 @@ namespace OpenSim.Region.Environment.Modules | |||
155 | m_longitude = d_longitude; | 155 | m_longitude = d_longitude; |
156 | } | 156 | } |
157 | 157 | ||
158 | switch(m_mode) | 158 | switch (m_mode) |
159 | { | 159 | { |
160 | case "T1": | ||
161 | default: | ||
162 | case "SL": | ||
163 | // Time taken to complete a cycle (day and season) | ||
160 | 164 | ||
161 | case "T1" : | 165 | SecondsPerSunCycle = (uint) (m_day_length * 60 * 60); |
166 | SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length); | ||
162 | 167 | ||
163 | default : | 168 | // Ration of real-to-virtual time |
164 | 169 | ||
165 | case "SL" : | 170 | VWTimeRatio = 24/m_day_length; |
166 | // Time taken to complete a cycle (day and season) | ||
167 | 171 | ||
168 | SecondsPerSunCycle = (uint) (m_day_length * 60 * 60); | 172 | // Speed of rotation needed to complete a cycle in the |
169 | SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length); | 173 | // designated period (day and season) |
170 | 174 | ||
171 | // Ration of real-to-virtual time | 175 | SunSpeed = SunCycle/SecondsPerSunCycle; |
176 | SeasonSpeed = SeasonalCycle/SecondsPerYear; | ||
172 | 177 | ||
173 | VWTimeRatio = 24/m_day_length; | 178 | // Horizon translation |
174 | 179 | ||
175 | // Speed of rotation needed to complete a cycle in the | 180 | HorizonShift = m_day_night; // Z axis translation |
176 | // designated period (day and season) | 181 | HoursToRadians = (SunCycle/24)*VWTimeRatio; |
177 | 182 | ||
178 | SunSpeed = SunCycle/SecondsPerSunCycle; | 183 | // Insert our event handling hooks |
179 | SeasonSpeed = SeasonalCycle/SecondsPerYear; | ||
180 | 184 | ||
181 | // Horizon translation | 185 | scene.EventManager.OnFrame += SunUpdate; |
186 | scene.EventManager.OnNewClient += SunToClient; | ||
182 | 187 | ||
183 | HorizonShift = m_day_night; // Z axis translation | 188 | ready = true; |
184 | HoursToRadians = (SunCycle/24)*VWTimeRatio; | ||
185 | 189 | ||
186 | // Insert our event handling hooks | 190 | m_log.Debug("[SUN] Mode is "+m_mode); |
187 | 191 | m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); | |
188 | scene.EventManager.OnFrame += SunUpdate; | 192 | m_log.Debug("[SUN] Axis offset is "+m_day_night); |
189 | scene.EventManager.OnNewClient += SunToClient; | 193 | m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); |
190 | |||
191 | ready = true; | ||
192 | |||
193 | m_log.Debug("[SUN] Mode is "+m_mode); | ||
194 | m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); | ||
195 | m_log.Debug("[SUN] Axis offset is "+m_day_night); | ||
196 | m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); | ||
197 | 194 | ||
198 | break; | 195 | break; |
199 | |||
200 | } | 196 | } |
201 | } | 197 | } |
202 | 198 | ||
@@ -224,21 +220,20 @@ namespace OpenSim.Region.Environment.Modules | |||
224 | 220 | ||
225 | public void SunToClient(IClientAPI client) | 221 | public void SunToClient(IClientAPI client) |
226 | { | 222 | { |
227 | if(m_mode != "T1") | 223 | if (m_mode != "T1") |
228 | { | 224 | { |
229 | if(ready) | 225 | if (ready) |
230 | { | 226 | { |
231 | GenSunPos(); // Generate shared values once | 227 | GenSunPos(); // Generate shared values once |
232 | client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); | 228 | client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); |
233 | m_log.Debug("[SUN] Initial update for new client"); | 229 | m_log.Debug("[SUN] Initial update for new client"); |
234 | } | 230 | } |
235 | } | 231 | } |
236 | } | 232 | } |
237 | 233 | ||
238 | public void SunUpdate() | 234 | public void SunUpdate() |
239 | { | 235 | { |
240 | 236 | if (((m_frame++%m_frame_mod) != 0) || !ready) | |
241 | if(((m_frame++%m_frame_mod) != 0) || !ready) | ||
242 | { | 237 | { |
243 | return; | 238 | return; |
244 | } | 239 | } |
@@ -253,7 +248,6 @@ namespace OpenSim.Region.Environment.Modules | |||
253 | 248 | ||
254 | // set estate settings for region access to sun position | 249 | // set estate settings for region access to sun position |
255 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; | 250 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; |
256 | |||
257 | } | 251 | } |
258 | 252 | ||
259 | /// <summary> | 253 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 49ce341..efd258d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -596,7 +596,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
596 | ScenePresence presence; | 596 | ScenePresence presence; |
597 | TryGetAvatar(remoteClient.AgentId, out presence); | 597 | TryGetAvatar(remoteClient.AgentId, out presence); |
598 | byte[] data = null; | 598 | byte[] data = null; |
599 | if(invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum | 599 | if (invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum |
600 | { | 600 | { |
601 | LLVector3 pos=presence.AbsolutePosition; | 601 | LLVector3 pos=presence.AbsolutePosition; |
602 | string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", | 602 | 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 | |||
996 | permissionToDelete = false; //Just taking copy! | 996 | permissionToDelete = false; //Just taking copy! |
997 | 997 | ||
998 | } | 998 | } |
999 | else if(DeRezPacket.AgentBlock.Destination == 4) //Take | 999 | else if (DeRezPacket.AgentBlock.Destination == 4) //Take |
1000 | { | 1000 | { |
1001 | // Take | 1001 | // Take |
1002 | permissionToTake = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | 1002 | permissionToTake = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index c9274dd..f922f1f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -452,7 +452,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
452 | d); | 452 | d); |
453 | } | 453 | } |
454 | 454 | ||
455 | public delegate void SendCloseChildAgentDelegate( LLUUID agentID, List<ulong> regionlst); | 455 | public delegate void SendCloseChildAgentDelegate(LLUUID agentID, List<ulong> regionlst); |
456 | 456 | ||
457 | /// <summary> | 457 | /// <summary> |
458 | /// This Closes child agents on neighboring regions | 458 | /// This Closes child agents on neighboring regions |
@@ -568,7 +568,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
568 | // assume local regions are always up | 568 | // assume local regions are always up |
569 | destRegionUp = true; | 569 | destRegionUp = true; |
570 | } | 570 | } |
571 | if(destRegionUp) | 571 | |
572 | if (destRegionUp) | ||
572 | { | 573 | { |
573 | avatar.Close(); | 574 | avatar.Close(); |
574 | 575 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs index 285ee0d..99d19df 100644 --- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs +++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
51 | 51 | ||
52 | public void addCheckRezObject(CanRezObject delegateFunc) | 52 | public void addCheckRezObject(CanRezObject delegateFunc) |
53 | { | 53 | { |
54 | if(!CanRezObjectCheckFunctions.Contains(delegateFunc)) | 54 | if (!CanRezObjectCheckFunctions.Contains(delegateFunc)) |
55 | CanRezObjectCheckFunctions.Add(delegateFunc); | 55 | CanRezObjectCheckFunctions.Add(delegateFunc); |
56 | } | 56 | } |
57 | public void removeCheckRezObject(CanRezObject delegateFunc) | 57 | public void removeCheckRezObject(CanRezObject delegateFunc) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 8603ccc..1f1f39f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
313 | { | 313 | { |
314 | foreach (Scene mscene in m_localScenes) | 314 | foreach (Scene mscene in m_localScenes) |
315 | { | 315 | { |
316 | if((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) && | 316 | if ((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) && |
317 | (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)) | 317 | (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)) |
318 | { | 318 | { |
319 | scene = mscene; | 319 | scene = mscene; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 1dbac52..9a9314c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
263 | { | 263 | { |
264 | foreach (TaskInventoryItem item in m_taskInventory.Values) | 264 | foreach (TaskInventoryItem item in m_taskInventory.Values) |
265 | { | 265 | { |
266 | if(item.Name == name) | 266 | if (item.Name == name) |
267 | return true; | 267 | return true; |
268 | } | 268 | } |
269 | return false; | 269 | return false; |
@@ -271,14 +271,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
271 | 271 | ||
272 | private string FindAvailableInventoryName(string name) | 272 | private string FindAvailableInventoryName(string name) |
273 | { | 273 | { |
274 | if(!InventoryContainsName(name)) | 274 | if (!InventoryContainsName(name)) |
275 | return name; | 275 | return name; |
276 | 276 | ||
277 | int suffix=1; | 277 | int suffix=1; |
278 | while(suffix < 256) | 278 | while (suffix < 256) |
279 | { | 279 | { |
280 | string tryName=String.Format("{0} {1}", name, suffix); | 280 | string tryName=String.Format("{0} {1}", name, suffix); |
281 | if(!InventoryContainsName(tryName)) | 281 | if (!InventoryContainsName(tryName)) |
282 | return tryName; | 282 | return tryName; |
283 | suffix++; | 283 | suffix++; |
284 | } | 284 | } |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
296 | item.ParentPartID = UUID; | 296 | item.ParentPartID = UUID; |
297 | 297 | ||
298 | string name=FindAvailableInventoryName(item.Name); | 298 | string name=FindAvailableInventoryName(item.Name); |
299 | if(name == String.Empty) | 299 | if (name == String.Empty) |
300 | return; | 300 | return; |
301 | 301 | ||
302 | item.Name=name; | 302 | item.Name=name; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9502627..6c5a68d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -2049,7 +2049,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2049 | data[pos] = (byte)pTexAnim.SizeY; pos++; | 2049 | data[pos] = (byte)pTexAnim.SizeY; pos++; |
2050 | 2050 | ||
2051 | Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); | 2051 | Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); |
2052 | Helpers.FloatToBytes(pTexAnim.Length ).CopyTo(data, pos + 4); | 2052 | Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); |
2053 | Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); | 2053 | Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); |
2054 | 2054 | ||
2055 | m_TextureAnimation = data; | 2055 | m_TextureAnimation = data; |
@@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2495 | (int) (color.x*0xff), | 2495 | (int) (color.x*0xff), |
2496 | (int) (color.y*0xff), | 2496 | (int) (color.y*0xff), |
2497 | (int) (color.z*0xff)); | 2497 | (int) (color.z*0xff)); |
2498 | SetText( text ); | 2498 | SetText(text); |
2499 | } | 2499 | } |
2500 | 2500 | ||
2501 | public int registerTargetWaypoint(LLVector3 target, float tolerance) | 2501 | public int registerTargetWaypoint(LLVector3 target, float tolerance) |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 6f0fbdf..2901a97 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1263,7 +1263,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1263 | //bool colliding = (m_physicsActor.IsColliding==true); | 1263 | //bool colliding = (m_physicsActor.IsColliding==true); |
1264 | //if (controlland) | 1264 | //if (controlland) |
1265 | // m_log.Info("[AGENT]: landCommand"); | 1265 | // m_log.Info("[AGENT]: landCommand"); |
1266 | //if (colliding ) | 1266 | //if (colliding) |
1267 | // m_log.Info("[AGENT]: colliding"); | 1267 | // m_log.Info("[AGENT]: colliding"); |
1268 | //if (m_physicsActor.Flying && colliding && controlland) | 1268 | //if (m_physicsActor.Flying && colliding && controlland) |
1269 | //{ | 1269 | //{ |
diff --git a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs index 656f12e..6a18091 100644 --- a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs +++ b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
60 | float cpu = m_counter.NextValue()/40f; | 60 | float cpu = m_counter.NextValue()/40f; |
61 | LLVector3 size = new LLVector3(cpu, cpu, cpu); | 61 | LLVector3 size = new LLVector3(cpu, cpu, cpu); |
62 | 62 | ||
63 | RootPart.Resize( size ); | 63 | RootPart.Resize(size); |
64 | 64 | ||
65 | base.UpdateMovement(); | 65 | base.UpdateMovement(); |
66 | } | 66 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs index 6e9fe6d..81abb3f 100644 --- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs +++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs | |||
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
103 | 103 | ||
104 | for (int i = 0; i < (objs*objs*objs); i++) | 104 | for (int i = 0; i < (objs*objs*objs); i++) |
105 | { | 105 | { |
106 | LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / ( objs )) * 4, (i / (objs*objs)) * 4); | 106 | LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4); |
107 | ComplexObject complexObject = | 107 | ComplexObject complexObject = |
108 | new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), | 108 | new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), |
109 | pos + posOffset); | 109 | pos + posOffset); |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 102a1e6..ddfb5a4 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -729,7 +729,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
729 | { | 729 | { |
730 | prim.UpdateKinetics(); | 730 | prim.UpdateKinetics(); |
731 | } | 731 | } |
732 | //if(this._simFlatPlanet!=null) this._simFlatPlanet.Restore(); | 732 | //if (this._simFlatPlanet!=null) this._simFlatPlanet.Restore(); |
733 | } | 733 | } |
734 | 734 | ||
735 | public override void GetResults() | 735 | public override void GetResults() |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index d48a97e..5008927 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
162 | } | 162 | } |
163 | 163 | ||
164 | // each simplex still in the list belongs to the hull of the region in question | 164 | // each simplex still in the list belongs to the hull of the region in question |
165 | // The new vertex (yes, we still deal with verices here :-) ) forms a triangle | 165 | // The new vertex (yes, we still deal with verices here :-)) forms a triangle |
166 | // with each of these simplices. Build the new triangles and add them to the list | 166 | // with each of these simplices. Build the new triangles and add them to the list |
167 | foreach (Simplex s in simplices) | 167 | foreach (Simplex s in simplices) |
168 | { | 168 | { |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index cf9dc5d..d1f1074 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
79 | public bool m_returnCollisions = false; | 79 | public bool m_returnCollisions = false; |
80 | 80 | ||
81 | // Default we're a Geometry | 81 | // Default we're a Geometry |
82 | private CollisionCategories m_collisionCategories = (CollisionCategories.Geom ); | 82 | private CollisionCategories m_collisionCategories = (CollisionCategories.Geom); |
83 | 83 | ||
84 | // Default, Collide with Other Geometries, spaces and Bodies | 84 | // Default, Collide with Other Geometries, spaces and Bodies |
85 | private CollisionCategories m_collisionFlags = m_default_collisionFlags; | 85 | private CollisionCategories m_collisionFlags = m_default_collisionFlags; |
@@ -1170,9 +1170,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1170 | 1170 | ||
1171 | if (m_usePID) | 1171 | if (m_usePID) |
1172 | { | 1172 | { |
1173 | |||
1174 | // If we're using the PID controller, then we have no gravity | 1173 | // If we're using the PID controller, then we have no gravity |
1175 | fz = ((9.8f) * this.Mass ); | 1174 | fz = 9.8f * this.Mass; |
1176 | 1175 | ||
1177 | // no lock; for now it's only called from within Simulate() | 1176 | // no lock; for now it's only called from within Simulate() |
1178 | 1177 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 4050f36..61b577e 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
137 | 137 | ||
138 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 138 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) |
139 | { | 139 | { |
140 | if(inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) | 140 | if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) |
141 | { | 141 | { |
142 | invItemID=inv.Key; | 142 | invItemID=inv.Key; |
143 | break; | 143 | break; |
@@ -152,9 +152,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
152 | m_host.AddScriptLPS(1); | 152 | m_host.AddScriptLPS(1); |
153 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 153 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) |
154 | { | 154 | { |
155 | if(inv.Value.Name == name) | 155 | if (inv.Value.Name == name) |
156 | { | 156 | { |
157 | if(inv.Value.Type != type) | 157 | if (inv.Value.Type != type) |
158 | return LLUUID.Zero; | 158 | return LLUUID.Zero; |
159 | 159 | ||
160 | return inv.Value.AssetID.ToString(); | 160 | return inv.Value.AssetID.ToString(); |
@@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
168 | m_host.AddScriptLPS(1); | 168 | m_host.AddScriptLPS(1); |
169 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 169 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) |
170 | { | 170 | { |
171 | if(inv.Value.Name == name) | 171 | if (inv.Value.Name == name) |
172 | { | 172 | { |
173 | return inv.Value.AssetID.ToString(); | 173 | return inv.Value.AssetID.ToString(); |
174 | } | 174 | } |
@@ -362,11 +362,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
362 | double x,y,z,s; | 362 | double x,y,z,s; |
363 | 363 | ||
364 | double c1 = Math.Cos(v.y / 2); | 364 | double c1 = Math.Cos(v.y / 2); |
365 | double s1 = Math.Sin(v.y / 2 ); | 365 | double s1 = Math.Sin(v.y / 2); |
366 | double c2 = Math.Cos(v.z / 2 ); | 366 | double c2 = Math.Cos(v.z / 2); |
367 | double s2 = Math.Sin(v.z / 2 ); | 367 | double s2 = Math.Sin(v.z / 2); |
368 | double c3 = Math.Cos(v.x / 2 ); | 368 | double c3 = Math.Cos(v.x / 2); |
369 | double s3 = Math.Sin(v.x / 2 ); | 369 | double s3 = Math.Sin(v.x / 2); |
370 | 370 | ||
371 | double c1c2 = c1 * c2; | 371 | double c1c2 = c1 * c2; |
372 | double s1s2 = s1 * s2; | 372 | double s1s2 = s1 * s2; |
@@ -2900,7 +2900,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2900 | { | 2900 | { |
2901 | rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); | 2901 | rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); |
2902 | 2902 | ||
2903 | llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot) ); | 2903 | llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot)); |
2904 | llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); | 2904 | llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); |
2905 | 2905 | ||
2906 | // convert back and forth between quaternion <-> vector and angle | 2906 | // convert back and forth between quaternion <-> vector and angle |
@@ -3339,14 +3339,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3339 | if (src.Data.Length > 0) | 3339 | if (src.Data.Length > 0) |
3340 | { | 3340 | { |
3341 | ret = src.Data[x++].ToString(); | 3341 | ret = src.Data[x++].ToString(); |
3342 | for(;x<src.Data.Length;x++) | 3342 | for (; x < src.Data.Length; x++) |
3343 | { | 3343 | { |
3344 | ret += ", "+src.Data[x].ToString(); | 3344 | ret += ", "+src.Data[x].ToString(); |
3345 | } | 3345 | } |
3346 | } | 3346 | } |
3347 | 3347 | ||
3348 | return ret; | 3348 | return ret; |
3349 | |||
3350 | } | 3349 | } |
3351 | 3350 | ||
3352 | /// <summary> | 3351 | /// <summary> |
@@ -3367,9 +3366,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3367 | 3366 | ||
3368 | m_host.AddScriptLPS(1); | 3367 | m_host.AddScriptLPS(1); |
3369 | 3368 | ||
3370 | for(int i=0; i<src.Length; i++) | 3369 | for (int i = 0; i < src.Length; i++) |
3371 | { | 3370 | { |
3372 | switch(src[i]) | 3371 | switch (src[i]) |
3373 | { | 3372 | { |
3374 | case '<' : | 3373 | case '<' : |
3375 | parens++; | 3374 | parens++; |
@@ -3435,15 +3434,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3435 | 3434 | ||
3436 | if (src.Length != stride && src.Length%stride == 0) | 3435 | if (src.Length != stride && src.Length%stride == 0) |
3437 | { | 3436 | { |
3438 | |||
3439 | chunkk = src.Length/stride; | 3437 | chunkk = src.Length/stride; |
3440 | 3438 | ||
3441 | chunks = new int[chunkk]; | 3439 | chunks = new int[chunkk]; |
3442 | 3440 | ||
3443 | for(int i=0;i<chunkk;i++) | 3441 | for (int i = 0; i < chunkk; i++) |
3444 | chunks[i] = i; | 3442 | chunks[i] = i; |
3445 | 3443 | ||
3446 | for(int i=0; i<chunkk-1; i++) | 3444 | for (int i = 0; i < chunkk - 1; i++) |
3447 | { | 3445 | { |
3448 | // randomly select 2 chunks | 3446 | // randomly select 2 chunks |
3449 | index1 = rand.Next(rand.Next(65536)); | 3447 | index1 = rand.Next(rand.Next(65536)); |
@@ -3461,10 +3459,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3461 | 3459 | ||
3462 | result = new LSL_Types.list(); | 3460 | result = new LSL_Types.list(); |
3463 | 3461 | ||
3464 | for(int i=0; i<chunkk; i++) | 3462 | for (int i = 0; i < chunkk; i++) |
3465 | for(int j=0;j<stride;j++) | 3463 | { |
3464 | for (int j = 0; j < stride; j++) | ||
3465 | { | ||
3466 | result.Add(src.Data[chunks[i]*stride+j]); | 3466 | result.Add(src.Data[chunks[i]*stride+j]); |
3467 | 3467 | } | |
3468 | } | ||
3468 | } | 3469 | } |
3469 | else { | 3470 | else { |
3470 | object[] array = new object[src.Length]; | 3471 | object[] array = new object[src.Length]; |
@@ -3540,25 +3541,28 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3540 | stride = 1; | 3541 | stride = 1; |
3541 | 3542 | ||
3542 | if (stride > 0) | 3543 | if (stride > 0) |
3543 | for(int i=0;i<src.Length;i+=stride) | 3544 | { |
3545 | for (int i = 0; i < src.Length; i += stride) | ||
3544 | { | 3546 | { |
3545 | if (i<=ei[0] && i>=si[0]) | 3547 | if (i<=ei[0] && i>=si[0]) |
3546 | result.Add(src.Data[i]); | 3548 | result.Add(src.Data[i]); |
3547 | if (twopass && i>=si[1] && i<=ei[1]) | 3549 | if (twopass && i>=si[1] && i<=ei[1]) |
3548 | result.Add(src.Data[i]); | 3550 | result.Add(src.Data[i]); |
3549 | } | 3551 | } |
3552 | } | ||
3550 | else if (stride < 0) | 3553 | else if (stride < 0) |
3551 | for(int i=src.Length-1;i>=0;i+=stride) | 3554 | { |
3555 | for (int i = src.Length - 1; i >= 0; i += stride) | ||
3552 | { | 3556 | { |
3553 | if (i<=ei[0] && i>=si[0]) | 3557 | if (i <= ei[0] && i >= si[0]) |
3554 | result.Add(src.Data[i]); | 3558 | result.Add(src.Data[i]); |
3555 | if (twopass && i>=si[1] && i<=ei[1]) | 3559 | if (twopass && i >= si[1] && i <= ei[1]) |
3556 | result.Add(src.Data[i]); | 3560 | result.Add(src.Data[i]); |
3557 | } | 3561 | } |
3562 | } | ||
3558 | } | 3563 | } |
3559 | 3564 | ||
3560 | return result; | 3565 | return result; |
3561 | |||
3562 | } | 3566 | } |
3563 | 3567 | ||
3564 | public LSL_Types.Vector3 llGetRegionCorner() | 3568 | public LSL_Types.Vector3 llGetRegionCorner() |
@@ -3635,12 +3639,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3635 | 3639 | ||
3636 | if (src.Length != 0 && test.Length != 0) | 3640 | if (src.Length != 0 && test.Length != 0) |
3637 | { | 3641 | { |
3638 | for(int i=0; i< length; i++) | 3642 | for (int i = 0; i < length; i++) |
3639 | { | 3643 | { |
3640 | if (src.Data[i].Equals(test.Data[0])) | 3644 | if (src.Data[i].Equals(test.Data[0])) |
3641 | { | 3645 | { |
3642 | int j; | 3646 | int j; |
3643 | for(j=1;j<test.Length;j++) | 3647 | for (j = 1; j < test.Length; j++) |
3644 | if (!src.Data[i+j].Equals(test.Data[j])) | 3648 | if (!src.Data[i+j].Equals(test.Data[j])) |
3645 | break; | 3649 | break; |
3646 | if (j == test.Length) | 3650 | if (j == test.Length) |
@@ -4328,7 +4332,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4328 | return; | 4332 | return; |
4329 | } | 4333 | } |
4330 | string[] buts = new string[buttons.Length]; | 4334 | string[] buts = new string[buttons.Length]; |
4331 | for(int i = 0; i < buttons.Length; i++) | 4335 | for (int i = 0; i < buttons.Length; i++) |
4332 | { | 4336 | { |
4333 | if (buttons.Data[i].ToString() == String.Empty) | 4337 | if (buttons.Data[i].ToString() == String.Empty) |
4334 | { | 4338 | { |
@@ -4516,7 +4520,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4516 | int face; | 4520 | int face; |
4517 | LSL_Types.Vector3 v; | 4521 | LSL_Types.Vector3 v; |
4518 | 4522 | ||
4519 | switch(code) | 4523 | switch (code) |
4520 | { | 4524 | { |
4521 | case 6: // PRIM_POSITION | 4525 | case 6: // PRIM_POSITION |
4522 | if (remain < 1) | 4526 | if (remain < 1) |
@@ -4826,12 +4830,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4826 | 4830 | ||
4827 | LSL_Types.list res = new LSL_Types.list(); | 4831 | LSL_Types.list res = new LSL_Types.list(); |
4828 | int idx=0; | 4832 | int idx=0; |
4829 | while(idx < rules.Length) | 4833 | while (idx < rules.Length) |
4830 | { | 4834 | { |
4831 | int code=Convert.ToInt32(rules.Data[idx++]); | 4835 | int code=Convert.ToInt32(rules.Data[idx++]); |
4832 | int remain=rules.Length-idx; | 4836 | int remain=rules.Length-idx; |
4833 | 4837 | ||
4834 | switch(code) | 4838 | switch (code) |
4835 | { | 4839 | { |
4836 | case 2: // PRIM_MATERIAL | 4840 | case 2: // PRIM_MATERIAL |
4837 | res.Add(new LSL_Types.LSLInteger(m_host.Material)); | 4841 | res.Add(new LSL_Types.LSLInteger(m_host.Material)); |
@@ -5339,19 +5343,20 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5339 | 5343 | ||
5340 | // All entries are initially valid | 5344 | // All entries are initially valid |
5341 | 5345 | ||
5342 | for(int i=0; i<mlen; i++) active[i] = true; | 5346 | for (int i = 0; i < mlen; i++) |
5347 | active[i] = true; | ||
5343 | 5348 | ||
5344 | offset[mlen] = srclen; | 5349 | offset[mlen] = srclen; |
5345 | 5350 | ||
5346 | while(beginning<srclen) | 5351 | while (beginning < srclen) |
5347 | { | 5352 | { |
5348 | 5353 | ||
5349 | best = mlen; // as bad as it gets | 5354 | best = mlen; // as bad as it gets |
5350 | 5355 | ||
5351 | // Scan for separators | 5356 | // Scan for separators |
5352 | 5357 | ||
5353 | for(j=0; j<seplen; j++) | 5358 | for (j = 0; j < seplen; j++) |
5354 | { | 5359 | { |
5355 | if (active[j]) | 5360 | if (active[j]) |
5356 | { | 5361 | { |
5357 | // scan all of the markers | 5362 | // scan all of the markers |
@@ -5359,7 +5364,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5359 | { | 5364 | { |
5360 | // not present at all | 5365 | // not present at all |
5361 | active[j] = false; | 5366 | active[j] = false; |
5362 | } else | 5367 | } |
5368 | else | ||
5363 | { | 5369 | { |
5364 | // present and correct | 5370 | // present and correct |
5365 | if (offset[j] < offset[best]) | 5371 | if (offset[j] < offset[best]) |
@@ -5377,7 +5383,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5377 | 5383 | ||
5378 | if (offset[best] != beginning) | 5384 | if (offset[best] != beginning) |
5379 | { | 5385 | { |
5380 | for(j=seplen; (j<mlen) && (offset[best] > beginning); j++) | 5386 | for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) |
5381 | { | 5387 | { |
5382 | if (active[j]) | 5388 | if (active[j]) |
5383 | { | 5389 | { |
@@ -6174,7 +6180,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6174 | { | 6180 | { |
6175 | foreach (object o in args.Data) | 6181 | foreach (object o in args.Data) |
6176 | { | 6182 | { |
6177 | switch(o.ToString()) | 6183 | switch (o.ToString()) |
6178 | { | 6184 | { |
6179 | case "1": | 6185 | case "1": |
6180 | ret.Add(av.Firstname + " " + av.Lastname); | 6186 | ret.Add(av.Firstname + " " + av.Lastname); |
@@ -6207,9 +6213,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6207 | SceneObjectPart obj = World.GetSceneObjectPart(key); | 6213 | SceneObjectPart obj = World.GetSceneObjectPart(key); |
6208 | if (obj != null) | 6214 | if (obj != null) |
6209 | { | 6215 | { |
6210 | foreach(object o in args.Data) | 6216 | foreach (object o in args.Data) |
6211 | { | 6217 | { |
6212 | switch(o.ToString()) | 6218 | switch (o.ToString()) |
6213 | { | 6219 | { |
6214 | case "1": | 6220 | case "1": |
6215 | ret.Add(obj.Name); | 6221 | ret.Add(obj.Name); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 369f6a7..d824f0c 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -370,21 +370,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
370 | LSL_Types.list llList2List(LSL_Types.list src, int start, int end); | 370 | LSL_Types.list llList2List(LSL_Types.list src, int start, int end); |
371 | //wiki: llDeleteSubList(list src, integer start, integer end) | 371 | //wiki: llDeleteSubList(list src, integer start, integer end) |
372 | LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end); | 372 | LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end); |
373 | //wiki: integer llGetListEntryType( list src, integer index ) | 373 | //wiki: integer llGetListEntryType(list src, integer index) |
374 | LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index); | 374 | LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index); |
375 | //wiki: string llList2CSV( list src ) | 375 | //wiki: string llList2CSV(list src) |
376 | string llList2CSV(LSL_Types.list src); | 376 | string llList2CSV(LSL_Types.list src); |
377 | //wiki: list llCSV2List( string src ) | 377 | //wiki: list llCSV2List(string src) |
378 | LSL_Types.list llCSV2List(string src); | 378 | LSL_Types.list llCSV2List(string src); |
379 | //wiki: list llListRandomize( list src, integer stride ) | 379 | //wiki: list llListRandomize(list src, integer stride) |
380 | LSL_Types.list llListRandomize(LSL_Types.list src, int stride); | 380 | LSL_Types.list llListRandomize(LSL_Types.list src, int stride); |
381 | //wiki: list llList2ListStrided( list src, integer start, integer end, integer stride ) | 381 | //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride) |
382 | LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride); | 382 | LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride); |
383 | //wiki: vector llGetRegionCorner( ) | 383 | //wiki: vector llGetRegionCorner() |
384 | LSL_Types.Vector3 llGetRegionCorner(); | 384 | LSL_Types.Vector3 llGetRegionCorner(); |
385 | //wiki: list llListInsertList( list dest, list src, integer start ) | 385 | //wiki: list llListInsertList(list dest, list src, integer start) |
386 | LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start); | 386 | LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start); |
387 | //wiki: integer llListFindList( list src, list test ) | 387 | //wiki: integer llListFindList(list src, list test) |
388 | LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test); | 388 | LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test); |
389 | //wiki: string llGetObjectName() | 389 | //wiki: string llGetObjectName() |
390 | string llGetObjectName(); | 390 | string llGetObjectName(); |
@@ -479,7 +479,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
479 | string llDumpList2String(LSL_Types.list src, string seperator); | 479 | string llDumpList2String(LSL_Types.list src, string seperator); |
480 | //wiki: integer llScriptDanger(vector pos) | 480 | //wiki: integer llScriptDanger(vector pos) |
481 | LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos); | 481 | LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos); |
482 | //wiki: llDialog( key avatar, string message, list buttons, integer chat_channel ) | 482 | //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel) |
483 | void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel); | 483 | void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel); |
484 | //wiki: llVolumeDetect(integer detect) | 484 | //wiki: llVolumeDetect(integer detect) |
485 | void llVolumeDetect(int detect); | 485 | void llVolumeDetect(int detect); |
@@ -503,9 +503,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
503 | void llCloseRemoteDataChannel(string channel); | 503 | void llCloseRemoteDataChannel(string channel); |
504 | //wiki: string llMD5String(string src, integer nonce) | 504 | //wiki: string llMD5String(string src, integer nonce) |
505 | string llMD5String(string src, int nonce); | 505 | string llMD5String(string src, int nonce); |
506 | //wiki: llSetPrimitiveParams( list rules ) | 506 | //wiki: llSetPrimitiveParams(list rules) |
507 | void llSetPrimitiveParams(LSL_Types.list rules); | 507 | void llSetPrimitiveParams(LSL_Types.list rules); |
508 | //wiki: llSetLinkPrimitiveParams(integer linknumber, list rules ) | 508 | //wiki: llSetLinkPrimitiveParams(integer linknumber, list rules) |
509 | void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules); | 509 | void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules); |
510 | //wiki: string llStringToBase64(string str) | 510 | //wiki: string llStringToBase64(string str) |
511 | string llStringToBase64(string str); | 511 | string llStringToBase64(string str); |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
519 | double llLog10(double val); | 519 | double llLog10(double val); |
520 | //wiki: double llLog(double val) | 520 | //wiki: double llLog(double val) |
521 | double llLog(double val); | 521 | double llLog(double val); |
522 | //wiki: list llGetAnimationList( key id ) | 522 | //wiki: list llGetAnimationList(key id) |
523 | LSL_Types.list llGetAnimationList(string id); | 523 | LSL_Types.list llGetAnimationList(string id); |
524 | //wiki: llSetParcelMusicURL(string url) | 524 | //wiki: llSetParcelMusicURL(string url) |
525 | void llSetParcelMusicURL(string url); | 525 | void llSetParcelMusicURL(string url); |
@@ -541,7 +541,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
541 | LSL_Types.LSLInteger llGetNumberOfPrims(); | 541 | LSL_Types.LSLInteger llGetNumberOfPrims(); |
542 | //wiki: key llGetNumberOfNotecardLines(string name) | 542 | //wiki: key llGetNumberOfNotecardLines(string name) |
543 | string llGetNumberOfNotecardLines(string name); | 543 | string llGetNumberOfNotecardLines(string name); |
544 | //wiki: list llGetBoundingBox( key object ) | 544 | //wiki: list llGetBoundingBox(key object) |
545 | LSL_Types.list llGetBoundingBox(string obj); | 545 | LSL_Types.list llGetBoundingBox(string obj); |
546 | //wiki: vector llGetGeometricCenter() | 546 | //wiki: vector llGetGeometricCenter() |
547 | LSL_Types.Vector3 llGetGeometricCenter(); | 547 | LSL_Types.Vector3 llGetGeometricCenter(); |
@@ -557,7 +557,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
557 | string llGetSimulatorHostname(); | 557 | string llGetSimulatorHostname(); |
558 | //llSetLocalRot(rotation rot) | 558 | //llSetLocalRot(rotation rot) |
559 | void llSetLocalRot(LSL_Types.Quaternion rot); | 559 | void llSetLocalRot(LSL_Types.Quaternion rot); |
560 | //wiki: list llParseStringKeepNulls( string src, list separators, list spacers ) | 560 | //wiki: list llParseStringKeepNulls(string src, list separators, list spacers) |
561 | LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers); | 561 | LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers); |
562 | //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) | 562 | //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) |
563 | void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, | 563 | void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, |
@@ -584,14 +584,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
584 | LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end); | 584 | LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end); |
585 | //wiki: llLoadURL(key avatar_id, string message, string url) | 585 | //wiki: llLoadURL(key avatar_id, string message, string url) |
586 | void llLoadURL(string avatar_id, string message, string url); | 586 | void llLoadURL(string avatar_id, string message, string url); |
587 | //wiki: llParcelMediaCommandList( list commandList ) | 587 | //wiki: llParcelMediaCommandList(list commandList) |
588 | void llParcelMediaCommandList(LSL_Types.list commandList); | 588 | void llParcelMediaCommandList(LSL_Types.list commandList); |
589 | void llParcelMediaQuery(); | 589 | void llParcelMediaQuery(); |
590 | //wiki integer llModPow(integer a, integer b, integer c) | 590 | //wiki integer llModPow(integer a, integer b, integer c) |
591 | LSL_Types.LSLInteger llModPow(int a, int b, int c); | 591 | LSL_Types.LSLInteger llModPow(int a, int b, int c); |
592 | //wiki: integer llGetInventoryType(string name) | 592 | //wiki: integer llGetInventoryType(string name) |
593 | LSL_Types.LSLInteger llGetInventoryType(string name); | 593 | LSL_Types.LSLInteger llGetInventoryType(string name); |
594 | //wiki: llSetPayPrice( integer price, list quick_pay_buttons ) | 594 | //wiki: llSetPayPrice(integer price, list quick_pay_buttons) |
595 | void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons); | 595 | void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons); |
596 | //wiki: vector llGetCameraPos() | 596 | //wiki: vector llGetCameraPos() |
597 | LSL_Types.Vector3 llGetCameraPos(); | 597 | LSL_Types.Vector3 llGetCameraPos(); |
@@ -613,11 +613,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
613 | void llRemoveFromLandPassList(string avatar); | 613 | void llRemoveFromLandPassList(string avatar); |
614 | //wiki: llRemoveFromLandBanList(key avatar) | 614 | //wiki: llRemoveFromLandBanList(key avatar) |
615 | void llRemoveFromLandBanList(string avatar); | 615 | void llRemoveFromLandBanList(string avatar); |
616 | //wiki: llSetCameraParams( list rules ) | 616 | //wiki: llSetCameraParams(list rules) |
617 | void llSetCameraParams(LSL_Types.list rules); | 617 | void llSetCameraParams(LSL_Types.list rules); |
618 | //wiki: llClearCameraParams() | 618 | //wiki: llClearCameraParams() |
619 | void llClearCameraParams(); | 619 | void llClearCameraParams(); |
620 | //wiki: double llListStatistics( integer operation, list src ) | 620 | //wiki: double llListStatistics(integer operation, list src) |
621 | double llListStatistics(int operation, LSL_Types.list src); | 621 | double llListStatistics(int operation, LSL_Types.list src); |
622 | //wiki: integer llGetUnixTime() | 622 | //wiki: integer llGetUnixTime() |
623 | LSL_Types.LSLInteger llGetUnixTime(); | 623 | LSL_Types.LSLInteger llGetUnixTime(); |
@@ -634,15 +634,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
634 | void llResetLandPassList(); | 634 | void llResetLandPassList(); |
635 | //wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) | 635 | //wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) |
636 | LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); | 636 | LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); |
637 | //wiki: list llGetParcelPrimOwners( vector pos ) | 637 | //wiki: list llGetParcelPrimOwners(vector pos) |
638 | LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos); | 638 | LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos); |
639 | //wiki: integer llGetObjectPrimCount(key object_id) | 639 | //wiki: integer llGetObjectPrimCount(key object_id) |
640 | LSL_Types.LSLInteger llGetObjectPrimCount(string object_id); | 640 | LSL_Types.LSLInteger llGetObjectPrimCount(string object_id); |
641 | //wiki: integer llGetParcelMaxPrims( vector pos, integer sim_wide ) | 641 | //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide) |
642 | LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); | 642 | LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); |
643 | //wiki: llGetParcelDetails(vector pos, list params) | 643 | //wiki: llGetParcelDetails(vector pos, list params) |
644 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); | 644 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); |
645 | //wiki: llSetLinkTexture(integer linknumber, string texture, integer face ) | 645 | //wiki: llSetLinkTexture(integer linknumber, string texture, integer face) |
646 | void llSetLinkTexture(int linknumber, string texture, int face); | 646 | void llSetLinkTexture(int linknumber, string texture, int face); |
647 | //wiki: string llStringTrim(string src, int type) | 647 | //wiki: string llStringTrim(string src, int type) |
648 | string llStringTrim(string src, int type); | 648 | string llStringTrim(string src, int type); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 14ee319..c3a36dd 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -506,7 +506,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
506 | int src; | 506 | int src; |
507 | int dest=0; | 507 | int dest=0; |
508 | 508 | ||
509 | for(src = 0 ; src < m_data.Length ; src++) | 509 | for (src = 0; src < m_data.Length; src++) |
510 | { | 510 | { |
511 | if (src < start || src > end) | 511 | if (src < start || src > end) |
512 | ret[dest++]=m_data[src]; | 512 | ret[dest++]=m_data[src]; |
@@ -624,9 +624,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
624 | Array.Copy(Data, 0, ret, 0, Data.Length); | 624 | Array.Copy(Data, 0, ret, 0, Data.Length); |
625 | 625 | ||
626 | keys=new string[Data.Length]; | 626 | keys=new string[Data.Length]; |
627 | int k; | 627 | |
628 | for(k=0;k<Data.Length;k++) | 628 | for (int k = 0; k < Data.Length; k++) |
629 | keys[k]=Data[k].ToString(); | 629 | keys[k] = Data[k].ToString(); |
630 | 630 | ||
631 | Array.Sort(keys, ret); | 631 | Array.Sort(keys, ret); |
632 | 632 | ||
@@ -644,11 +644,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
644 | 644 | ||
645 | int i; | 645 | int i; |
646 | 646 | ||
647 | while(src < Data.Length) | 647 | while (src < Data.Length) |
648 | { | 648 | { |
649 | Object[] o=new Object[stride]; | 649 | Object[] o=new Object[stride]; |
650 | 650 | ||
651 | for(i=0;i<stride;i++) | 651 | for (i = 0; i < stride; i++) |
652 | { | 652 | { |
653 | if (src < Data.Length) | 653 | if (src < Data.Length) |
654 | o[i]=Data[src++]; | 654 | o[i]=Data[src++]; |
@@ -672,11 +672,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
672 | 672 | ||
673 | Object[] sorted=new Object[stride*vals.Length]; | 673 | Object[] sorted=new Object[stride*vals.Length]; |
674 | 674 | ||
675 | int j; | 675 | for (i = 0; i < vals.Length; i++) |
676 | 676 | for (int j = 0; j < stride; j++) | |
677 | for(i=0;i<vals.Length;i++) | 677 | sorted[i*stride+j] = vals[i][j]; |
678 | for(j=0;j<stride;j++) | ||
679 | sorted[i*stride+j]=vals[i][j]; | ||
680 | 678 | ||
681 | return new list(sorted); | 679 | return new list(sorted); |
682 | } | 680 | } |
@@ -691,7 +689,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
691 | public string ToCSV() | 689 | public string ToCSV() |
692 | { | 690 | { |
693 | string ret = ""; | 691 | string ret = ""; |
694 | foreach(object o in this.Data) | 692 | foreach (object o in this.Data) |
695 | { | 693 | { |
696 | if (ret == "") | 694 | if (ret == "") |
697 | { | 695 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 5c7f862..2b6f6d9 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -340,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
340 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 340 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
341 | LLUUID createdTexture = | 341 | LLUUID createdTexture = |
342 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, | 342 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, |
343 | extraParams, timer, true, (byte) alpha ); | 343 | extraParams, timer, true, (byte) alpha); |
344 | return createdTexture.ToString(); | 344 | return createdTexture.ToString(); |
345 | } | 345 | } |
346 | else | 346 | else |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index 1210b77..4311836 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -235,7 +235,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
235 | // dot=dot(forward_dir,obj_dir) | 235 | // dot=dot(forward_dir,obj_dir) |
236 | // mag_fwd = mag(forward_dir) | 236 | // mag_fwd = mag(forward_dir) |
237 | // mag_obj = mag(obj_dir) | 237 | // mag_obj = mag(obj_dir) |
238 | // ang = acos( dot /(mag_fwd*mag_obj)) | 238 | // ang = acos(dot /(mag_fwd*mag_obj)) |
239 | double ang_obj = 0; | 239 | double ang_obj = 0; |
240 | try | 240 | try |
241 | { | 241 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 214f7c9..f2afe0f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
76 | 76 | ||
77 | // TODO: HOOK ALL EVENTS UP TO SERVER! | 77 | // TODO: HOOK ALL EVENTS UP TO SERVER! |
78 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); | 78 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); |
79 | if(money != null) | 79 | if (money != null) |
80 | { | 80 | { |
81 | money.OnObjectPaid+=HandleObjectPaid; | 81 | money.OnObjectPaid+=HandleObjectPaid; |
82 | } | 82 | } |
@@ -91,7 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
91 | private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) | 91 | private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) |
92 | { | 92 | { |
93 | SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); | 93 | SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); |
94 | if(part != null) | 94 | if (part != null) |
95 | { | 95 | { |
96 | money(part.LocalId, agentID, amount); | 96 | money(part.LocalId, agentID, amount); |
97 | } | 97 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 3dbd88c..997f46f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -297,10 +297,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
297 | // Send inner exception | 297 | // Send inner exception |
298 | string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n'); | 298 | string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n'); |
299 | int line=0; | 299 | int line=0; |
300 | foreach(string t in lines) | 300 | foreach (string t in lines) |
301 | { | 301 | { |
302 | int idx=t.IndexOf("SecondLife.Script."); | 302 | int idx=t.IndexOf("SecondLife.Script."); |
303 | if(idx != -1) | 303 | if (idx != -1) |
304 | { | 304 | { |
305 | int colon=t.IndexOf(":"); | 305 | int colon=t.IndexOf(":"); |
306 | line=Convert.ToInt32(t.Substring(colon+1)); | 306 | line=Convert.ToInt32(t.Substring(colon+1)); |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 3320ddb..715e465 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -182,7 +182,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
182 | if (DateTime.Now.Ticks - Last_ReReadConfigFilens > | 182 | if (DateTime.Now.Ticks - Last_ReReadConfigFilens > |
183 | m_ScriptEngine.RefreshConfigFilens) | 183 | m_ScriptEngine.RefreshConfigFilens) |
184 | { | 184 | { |
185 | //Console.WriteLine("Time passed: " + (DateTime.Now.Ticks - Last_ReReadConfigFilens) + ">" + m_ScriptEngine.RefreshConfigFilens ); | 185 | //Console.WriteLine("Time passed: " + (DateTime.Now.Ticks - Last_ReReadConfigFilens) + ">" + m_ScriptEngine.RefreshConfigFilens); |
186 | // Its time to re-read config file | 186 | // Its time to re-read config file |
187 | m_ScriptEngine.ReadConfig(); | 187 | m_ScriptEngine.ReadConfig(); |
188 | Last_ReReadConfigFilens = DateTime.Now.Ticks; // Reset time | 188 | Last_ReReadConfigFilens = DateTime.Now.Ticks; // Reset time |
diff --git a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs index 3363c54..a766549 100644 --- a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs +++ b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs | |||
@@ -53,14 +53,14 @@ namespace OpenSim.Tests.Common | |||
53 | { | 53 | { |
54 | throw new ArgumentException("Constraint cannot be used upon null values."); | 54 | throw new ArgumentException("Constraint cannot be used upon null values."); |
55 | } | 55 | } |
56 | if( valueToBeTested.GetType() != typeof(double)) | 56 | if (valueToBeTested.GetType() != typeof(double)) |
57 | { | 57 | { |
58 | throw new ArgumentException("Constraint cannot be used upon non double-values."); | 58 | throw new ArgumentException("Constraint cannot be used upon non double-values."); |
59 | } | 59 | } |
60 | 60 | ||
61 | _valueToBeTested = (double)valueToBeTested; | 61 | _valueToBeTested = (double)valueToBeTested; |
62 | 62 | ||
63 | return IsWithinDoubleConstraint(_valueToBeTested, _baseValue ); | 63 | return IsWithinDoubleConstraint(_valueToBeTested, _baseValue); |
64 | } | 64 | } |
65 | 65 | ||
66 | public override void WriteDescriptionTo(MessageWriter writer) | 66 | public override void WriteDescriptionTo(MessageWriter writer) |
diff --git a/OpenSim/Tests/Common/VectorToleranceConstraint.cs b/OpenSim/Tests/Common/VectorToleranceConstraint.cs index cc96615..2b60db3 100644 --- a/OpenSim/Tests/Common/VectorToleranceConstraint.cs +++ b/OpenSim/Tests/Common/VectorToleranceConstraint.cs | |||
@@ -61,14 +61,9 @@ namespace OpenSim.Tests.Common | |||
61 | 61 | ||
62 | _valueToBeTested = (LLVector3) valueToBeTested; | 62 | _valueToBeTested = (LLVector3) valueToBeTested; |
63 | 63 | ||
64 | if ( IsWithinDoubleConstraint(_valueToBeTested.X,_baseValue.X) && | 64 | return (IsWithinDoubleConstraint(_valueToBeTested.X, _baseValue.X) && |
65 | IsWithinDoubleConstraint(_valueToBeTested.Y,_baseValue.Y) && | 65 | IsWithinDoubleConstraint(_valueToBeTested.Y, _baseValue.Y) && |
66 | IsWithinDoubleConstraint(_valueToBeTested.Z,_baseValue.Z) ) | 66 | IsWithinDoubleConstraint(_valueToBeTested.Z, _baseValue.Z)); |
67 | { | ||
68 | return true; | ||
69 | } | ||
70 | |||
71 | return false; | ||
72 | } | 67 | } |
73 | 68 | ||
74 | public override void WriteDescriptionTo(MessageWriter writer) | 69 | public override void WriteDescriptionTo(MessageWriter writer) |
diff --git a/OpenSim/Tests/Inventory/TestInventory.cs b/OpenSim/Tests/Inventory/TestInventory.cs index c1351d9..3083c89 100644 --- a/OpenSim/Tests/Inventory/TestInventory.cs +++ b/OpenSim/Tests/Inventory/TestInventory.cs | |||
@@ -147,13 +147,12 @@ namespace OpenSim.Test.Inventory | |||
147 | Assert.IsNotNull(folders, "Failed to get rootfolders for user"); | 147 | Assert.IsNotNull(folders, "Failed to get rootfolders for user"); |
148 | 148 | ||
149 | bool foundRoot = false; | 149 | bool foundRoot = false; |
150 | foreach(InventoryFolderBase f in folders) { | 150 | foreach (InventoryFolderBase f in folders) |
151 | 151 | { | |
152 | // a root folder has a zero valued LLUUID | 152 | // a root folder has a zero valued LLUUID |
153 | Assert.AreEqual(f.parentID, LLUUID.Zero, "non root folder returned"); | 153 | Assert.AreEqual(f.parentID, LLUUID.Zero, "non root folder returned"); |
154 | 154 | ||
155 | 155 | if (f.agentID == root.agentID) | |
156 | if(f.agentID == root.agentID) | ||
157 | { | 156 | { |
158 | // we cannot have two different user specific root folders | 157 | // we cannot have two different user specific root folders |
159 | Assert.IsFalse(foundRoot, "Two different user specific root folders returned"); | 158 | Assert.IsFalse(foundRoot, "Two different user specific root folders returned"); |
diff --git a/OpenSim/Tools/OpenSim.GUI/Main.cs b/OpenSim/Tools/OpenSim.GUI/Main.cs index adb331b..9467312 100644 --- a/OpenSim/Tools/OpenSim.GUI/Main.cs +++ b/OpenSim/Tools/OpenSim.GUI/Main.cs | |||
@@ -407,7 +407,7 @@ namespace OpenSim.GUI | |||
407 | portBox1.Text = "13050"; | 407 | portBox1.Text = "13050"; |
408 | MessageBox.Show("Enter Usable port number, defaulting to 13050."); | 408 | MessageBox.Show("Enter Usable port number, defaulting to 13050."); |
409 | } | 409 | } |
410 | if(aPort < 13000) | 410 | if (aPort < 13000) |
411 | { | 411 | { |
412 | portBox1.Text = "13000"; | 412 | portBox1.Text = "13000"; |
413 | MessageBox.Show("Enter Usable port number, defaulting to 13000."); | 413 | MessageBox.Show("Enter Usable port number, defaulting to 13000."); |
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs index 3ef0ef7..2732751 100644 --- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs +++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
147 | foreach (ScenePresence pre in presences) | 147 | foreach (ScenePresence pre in presences) |
148 | { | 148 | { |
149 | IClientAPI client = pre.ControllingClient; | 149 | IClientAPI client = pre.ControllingClient; |
150 | //if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { | 150 | //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { |
151 | if (client.IsActive) | 151 | if (client.IsActive) |
152 | { | 152 | { |
153 | get_scene_presence_filter++; | 153 | get_scene_presence_filter++; |
@@ -160,7 +160,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
160 | foreach (ScenePresence pre in avatars) | 160 | foreach (ScenePresence pre in avatars) |
161 | { | 161 | { |
162 | IClientAPI client = pre.ControllingClient; | 162 | IClientAPI client = pre.ControllingClient; |
163 | //if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { | 163 | //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) { |
164 | if (client.IsActive) | 164 | if (client.IsActive) |
165 | { | 165 | { |
166 | get_avatar_filter++; | 166 | get_avatar_filter++; |
@@ -884,7 +884,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
884 | 884 | ||
885 | // Because data changes by the physics simulation when the client doesn't move, | 885 | // Because data changes by the physics simulation when the client doesn't move, |
886 | // if MovementFlag is false, It is necessary to synchronize. | 886 | // if MovementFlag is false, It is necessary to synchronize. |
887 | //if(pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) | 887 | //if (pre.MovementFlag!=0 && client.PacketProcessingEnabled==true) |
888 | if (client.IsActive) | 888 | if (client.IsActive) |
889 | { | 889 | { |
890 | //m_log.Info("[SPLITSCENE] "+String.Format("Client moving in {0} {1}", scene.RegionInfo.RegionID, pre.AbsolutePosition)); | 890 | //m_log.Info("[SPLITSCENE] "+String.Format("Client moving in {0} {1}", scene.RegionInfo.RegionID, pre.AbsolutePosition)); |
diff --git a/ThirdParty/3Di/LoadBalancer/TcpServer.cs b/ThirdParty/3Di/LoadBalancer/TcpServer.cs index 9722a1b..eb57b2d 100644 --- a/ThirdParty/3Di/LoadBalancer/TcpServer.cs +++ b/ThirdParty/3Di/LoadBalancer/TcpServer.cs | |||
@@ -150,7 +150,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer | |||
150 | state.ms_ptr.Read(packet, 0, state.header.numbytes); | 150 | state.ms_ptr.Read(packet, 0, state.header.numbytes); |
151 | 151 | ||
152 | /* | 152 | /* |
153 | for(int i=0; i<state.header.numbytes; i++) { | 153 | for (int i=0; i<state.header.numbytes; i++) { |
154 | System.Console.Write(packet[i] + " "); | 154 | System.Console.Write(packet[i] + " "); |
155 | } | 155 | } |
156 | System.Console.WriteLine(); | 156 | System.Console.WriteLine(); |