aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2007-12-03 07:26:27 +0000
committerJeff Ames2007-12-03 07:26:27 +0000
commit4c0ddacc160f3c25343eba73d2c2b026dfbbf67d (patch)
tree06dd3cbb394be8bf14616df3f18d04973a3a1a74
parent* Added XMLRPC Broadcast Alert method. (diff)
downloadopensim-SC-4c0ddacc160f3c25343eba73d2c2b026dfbbf67d.zip
opensim-SC-4c0ddacc160f3c25343eba73d2c2b026dfbbf67d.tar.gz
opensim-SC-4c0ddacc160f3c25343eba73d2c2b026dfbbf67d.tar.bz2
opensim-SC-4c0ddacc160f3c25343eba73d2c2b026dfbbf67d.tar.xz
minor meaningless changes
-rw-r--r--OpenSim/Framework/Communications/RestClient/RestClient.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs49
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
4 files changed, 34 insertions, 51 deletions
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index acb3fd4..7a23e78 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications
177 } 177 }
178 178
179 /// <summary> 179 /// <summary>
180 /// Build a Uri based on the intial Url, path elements and parameters 180 /// Build a Uri based on the initial Url, path elements and parameters
181 /// </summary> 181 /// </summary>
182 /// <returns>fully constructed Uri</returns> 182 /// <returns>fully constructed Uri</returns>
183 private Uri buildUri() 183 private Uri buildUri()
@@ -250,7 +250,7 @@ namespace OpenSim.Framework.Communications
250 } 250 }
251 251
252 /// <summary> 252 /// <summary>
253 /// Async method, invoked when the intial response if received from the server 253 /// Async method, invoked when the initial response if received from the server
254 /// </summary> 254 /// </summary>
255 /// <param name="ar"></param> 255 /// <param name="ar"></param>
256 private void ResponseIsReadyDelegate(IAsyncResult ar) 256 private void ResponseIsReadyDelegate(IAsyncResult ar)
diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
index e7ce957..dd3f75d 100644
--- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
+++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
@@ -5,6 +5,6 @@ namespace OpenSim.Region.Environment.Interfaces
5{ 5{
6 public interface IAvatarFactory : IRegionModule 6 public interface IAvatarFactory : IRegionModule
7 { 7 {
8 bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams); 8 bool TryGetInitialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams);
9 } 9 }
10} \ No newline at end of file 10} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index 7adfdc2..c11e039 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -14,20 +14,20 @@ namespace OpenSim.Region.Environment.Modules
14 private Scene m_scene = null; 14 private Scene m_scene = null;
15 private Dictionary<LLUUID, AvatarAppearance> m_avatarsClothes = new Dictionary<LLUUID, AvatarAppearance>(); 15 private Dictionary<LLUUID, AvatarAppearance> m_avatarsClothes = new Dictionary<LLUUID, AvatarAppearance>();
16 16
17 public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, 17 public bool TryGetInitialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables,
18 out byte[] visualParams) 18 out byte[] visualParams)
19 { 19 {
20 if (!m_avatarsClothes.ContainsKey(avatarId)) 20 if (m_avatarsClothes.ContainsKey(avatarId))
21 { 21 {
22 GetDefaultAvatarAppearance(out wearables, out visualParams); 22 visualParams = GetDefaultVisualParams();
23 AvatarAppearance wearing = new AvatarAppearance(wearables); 23 wearables = m_avatarsClothes[avatarId].IsWearing;
24 m_avatarsClothes[avatarId] = wearing;
25 return true; 24 return true;
26 } 25 }
27 else 26 else
28 { 27 {
29 visualParams = GetDefaultVisualParams(); 28 GetDefaultAvatarAppearance(out wearables, out visualParams);
30 wearables = m_avatarsClothes[avatarId].IsWearing; 29 AvatarAppearance wearing = new AvatarAppearance(wearables);
30 m_avatarsClothes[avatarId] = wearing;
31 return true; 31 return true;
32 } 32 }
33 } 33 }
@@ -76,29 +76,29 @@ namespace OpenSim.Region.Environment.Modules
76 IClientAPI clientView = (IClientAPI)sender; 76 IClientAPI clientView = (IClientAPI)sender;
77 //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs 77 //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs
78 // then store assetid and itemId and wearable type in a database 78 // then store assetid and itemId and wearable type in a database
79 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 79 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
80 {
81 if (wear.Type < 13)
80 { 82 {
81 if (wear.Type < 13) 83 LLUUID assetId;
84 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
85 if (profile != null)
82 { 86 {
83 LLUUID assetId; 87 InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID);
84 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); 88 if (baseItem != null)
85 if (profile != null)
86 { 89 {
87 InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); 90 assetId = baseItem.assetID;
88 if (baseItem != null) 91 //temporary dictionary storage. This should be storing to a database
92 if (m_avatarsClothes.ContainsKey(clientView.AgentId))
89 { 93 {
90 assetId = baseItem.assetID; 94 AvatarAppearance avWearing = m_avatarsClothes[clientView.AgentId];
91 //temporary dictionary storage. This should be storing to a database 95 avWearing.IsWearing[wear.Type].AssetID = assetId;
92 if (m_avatarsClothes.ContainsKey(clientView.AgentId)) 96 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
93 {
94 AvatarAppearance avWearing = m_avatarsClothes[clientView.AgentId];
95 avWearing.IsWearing[wear.Type].AssetID = assetId;
96 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
97 }
98 } 97 }
99 } 98 }
100 } 99 }
101 } 100 }
101 }
102 } 102 }
103 103
104 public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) 104 public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams)
@@ -155,5 +155,4 @@ namespace OpenSim.Region.Environment.Modules
155 } 155 }
156 } 156 }
157 } 157 }
158 158}
159} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 19e0064..38cfc8c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -251,7 +251,6 @@ namespace OpenSim.Region.Environment.Scenes
251 251
252 httpListener = httpServer; 252 httpListener = httpServer;
253 m_dumpAssetsToFile = dumpAssetsToFile; 253 m_dumpAssetsToFile = dumpAssetsToFile;
254
255 } 254 }
256 255
257 #endregion 256 #endregion
@@ -311,8 +310,6 @@ namespace OpenSim.Region.Environment.Scenes
311 m_restartTimer.Start(); 310 m_restartTimer.Start();
312 SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); 311 SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
313 } 312 }
314
315
316 } 313 }
317 314
318 public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) 315 public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e)
@@ -329,7 +326,6 @@ namespace OpenSim.Region.Environment.Scenes
329 m_restartTimer.AutoReset = false; 326 m_restartTimer.AutoReset = false;
330 RestartNow(); 327 RestartNow();
331 } 328 }
332
333 } 329 }
334 330
335 public void RestartNow() 331 public void RestartNow()
@@ -391,7 +387,6 @@ namespace OpenSim.Region.Environment.Scenes
391 avatar.ControllingClient.Stop(); 387 avatar.ControllingClient.Stop();
392 388
393 }); 389 });
394
395 390
396 m_heartbeatTimer.Close(); 391 m_heartbeatTimer.Close();
397 m_innerScene.Close(); 392 m_innerScene.Close();
@@ -407,7 +402,6 @@ namespace OpenSim.Region.Environment.Scenes
407 Modules.Clear(); 402 Modules.Clear();
408 403
409 base.Close(); 404 base.Close();
410
411 } 405 }
412 406
413 /// <summary> 407 /// <summary>
@@ -568,7 +562,6 @@ namespace OpenSim.Region.Environment.Scenes
568 } 562 }
569 }); 563 });
570 564
571
572 Terrain.ResetTaint(); 565 Terrain.ResetTaint();
573 } 566 }
574 } 567 }
@@ -631,7 +624,7 @@ namespace OpenSim.Region.Environment.Scenes
631 } 624 }
632 } 625 }
633 626
634 foreach(AssetBase asset in textures) 627 foreach (AssetBase asset in textures)
635 { 628 {
636 System.Drawing.Image image= OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data); 629 System.Drawing.Image image= OpenJPEGNet.OpenJPEG.DecodeToImage(asset.Data);
637 bitImages.Add(image); 630 bitImages.Add(image);
@@ -642,7 +635,7 @@ namespace OpenSim.Region.Environment.Scenes
642 System.Drawing.SolidBrush sea = new System.Drawing.SolidBrush(System.Drawing.Color.DarkBlue); 635 System.Drawing.SolidBrush sea = new System.Drawing.SolidBrush(System.Drawing.Color.DarkBlue);
643 g.FillRectangle(sea, 0, 0, 2560, 2560); 636 g.FillRectangle(sea, 0, 0, 2560, 2560);
644 637
645 for(int i =0; i<mapBlocks.Count; i++) 638 for (int i = 0; i < mapBlocks.Count; i++)
646 { 639 {
647 ushort x = (ushort) ((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10); 640 ushort x = (ushort) ((mapBlocks[i].X - this.RegionInfo.RegionLocX) + 10);
648 ushort y = (ushort) ((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10); 641 ushort y = (ushort) ((mapBlocks[i].Y - this.RegionInfo.RegionLocY) + 10);
@@ -692,7 +685,6 @@ namespace OpenSim.Region.Environment.Scenes
692 685
693 CreateTerrainTexture(false); 686 CreateTerrainTexture(false);
694 //CommsManager.GridService.RegisterRegion(RegionInfo); //hack to update the terrain texture in grid mode so it shows on world map 687 //CommsManager.GridService.RegisterRegion(RegionInfo); //hack to update the terrain texture in grid mode so it shows on world map
695
696 } 688 }
697 catch (Exception e) 689 catch (Exception e)
698 { 690 {
@@ -725,7 +717,6 @@ namespace OpenSim.Region.Environment.Scenes
725 asset.Temporary = temporary; 717 asset.Temporary = temporary;
726 AssetCache.AddAsset(asset); 718 AssetCache.AddAsset(asset);
727 } 719 }
728
729 720
730 #endregion 721 #endregion
731 722
@@ -795,7 +786,6 @@ namespace OpenSim.Region.Environment.Scenes
795 /// <param name="ownerID"></param> 786 /// <param name="ownerID"></param>
796 public virtual void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) 787 public virtual void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
797 { 788 {
798
799 // What we're *supposed* to do is raytrace from the camera position given by the client to the nearest collision 789 // What we're *supposed* to do is raytrace from the camera position given by the client to the nearest collision
800 // in the direction the client supplies (the ground level that we clicked) 790 // in the direction the client supplies (the ground level that we clicked)
801 // This function is pretty crappy right now.. so we're not affecting where the newly rezzed objects go 791 // This function is pretty crappy right now.. so we're not affecting where the newly rezzed objects go
@@ -813,7 +803,6 @@ namespace OpenSim.Region.Environment.Scenes
813 803
814 Ray rezRay = new Ray(CameraPosition, rayDirection); 804 Ray rezRay = new Ray(CameraPosition, rayDirection);
815 805
816
817 Vector3 RezDirectionFromCamera = rezRay.Direction; 806 Vector3 RezDirectionFromCamera = rezRay.Direction;
818 807
819 EntityIntersection rayTracing = m_innerScene.GetClosestIntersectingPrim(rezRay); 808 EntityIntersection rayTracing = m_innerScene.GetClosestIntersectingPrim(rezRay);
@@ -838,14 +827,12 @@ namespace OpenSim.Region.Environment.Scenes
838 827
839 MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString()); 828 MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString());
840 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); 829 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z);
841
842 } 830 }
843 else 831 else
844 { 832 {
845 // rez ON the ground, not IN the ground 833 // rez ON the ground, not IN the ground
846 pos.Z += 0.25F; 834 pos.Z += 0.25F;
847 } 835 }
848
849 836
850 SceneObjectGroup sceneOb = 837 SceneObjectGroup sceneOb =
851 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); 838 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
@@ -871,7 +858,6 @@ namespace OpenSim.Region.Environment.Scenes
871 new Quaternion(), UsePhysics); 858 new Quaternion(), UsePhysics);
872 // subscribe to physics events. 859 // subscribe to physics events.
873 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 860 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
874
875 } 861 }
876 } 862 }
877 } 863 }
@@ -1037,13 +1023,12 @@ namespace OpenSim.Region.Environment.Scenes
1037 protected void LoadAvatarAppearance(IClientAPI client, out byte[] visualParams, out AvatarWearable[] wearables) 1023 protected void LoadAvatarAppearance(IClientAPI client, out byte[] visualParams, out AvatarWearable[] wearables)
1038 { 1024 {
1039 if (m_AvatarFactory == null || 1025 if (m_AvatarFactory == null ||
1040 !m_AvatarFactory.TryGetIntialAvatarAppearance(client.AgentId, out wearables, out visualParams)) 1026 !m_AvatarFactory.TryGetInitialAvatarAppearance(client.AgentId, out wearables, out visualParams))
1041 { 1027 {
1042 AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams); 1028 AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams);
1043 } 1029 }
1044 } 1030 }
1045 1031
1046
1047 /// <summary> 1032 /// <summary>
1048 /// 1033 ///
1049 /// </summary> 1034 /// </summary>
@@ -1066,7 +1051,6 @@ namespace OpenSim.Region.Environment.Scenes
1066 } 1051 }
1067 }); 1052 });
1068 1053
1069
1070 ForEachScenePresence( 1054 ForEachScenePresence(
1071 delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); 1055 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
1072 1056
@@ -1096,8 +1080,6 @@ namespace OpenSim.Region.Environment.Scenes
1096 1080
1097 // Remove client agent from profile, so new logins will work 1081 // Remove client agent from profile, so new logins will work
1098 CommsManager.UserService.clearUserAgent(agentID); 1082 CommsManager.UserService.clearUserAgent(agentID);
1099
1100 return;
1101 } 1083 }
1102 1084
1103 public void NotifyMyCoarseLocationChange() 1085 public void NotifyMyCoarseLocationChange()
@@ -1223,6 +1205,7 @@ namespace OpenSim.Region.Environment.Scenes
1223 { 1205 {
1224 m_sceneGridService.EnableNeighbourChildAgents(presence); 1206 m_sceneGridService.EnableNeighbourChildAgents(presence);
1225 } 1207 }
1208
1226 public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region) 1209 public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region)
1227 { 1210 {
1228 m_sceneGridService.InformNeighborChildAgent(presence, region); 1211 m_sceneGridService.InformNeighborChildAgent(presence, region);
@@ -1281,6 +1264,7 @@ namespace OpenSim.Region.Environment.Scenes
1281 #endregion 1264 #endregion
1282 1265
1283 #region Module Methods 1266 #region Module Methods
1267
1284 public void AddModule(string name, IRegionModule module) 1268 public void AddModule(string name, IRegionModule module)
1285 { 1269 {
1286 if (!Modules.ContainsKey(name)) 1270 if (!Modules.ContainsKey(name))
@@ -1308,9 +1292,11 @@ namespace OpenSim.Region.Environment.Scenes
1308 return default(T); 1292 return default(T);
1309 } 1293 }
1310 } 1294 }
1295
1311 #endregion 1296 #endregion
1312 1297
1313 #region Other Methods 1298 #region Other Methods
1299
1314 public void SetTimePhase(int phase) 1300 public void SetTimePhase(int phase)
1315 { 1301 {
1316 m_timePhase = phase; 1302 m_timePhase = phase;
@@ -1343,7 +1329,6 @@ namespace OpenSim.Region.Environment.Scenes
1343 m_LandManager.landPrimCountTainted = false; 1329 m_LandManager.landPrimCountTainted = false;
1344 } 1330 }
1345 1331
1346
1347 public void addPrimsToParcelCounts() 1332 public void addPrimsToParcelCounts()
1348 { 1333 {
1349 foreach (EntityBase obj in Entities.Values) 1334 foreach (EntityBase obj in Entities.Values)
@@ -1409,7 +1394,6 @@ namespace OpenSim.Region.Environment.Scenes
1409 { 1394 {
1410 m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false); 1395 m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false);
1411 } 1396 }
1412
1413 } 1397 }
1414 1398
1415 public void handleGodlikeKickUser(LLUUID godid, LLUUID sessionid, LLUUID agentid, uint kickflags, byte[] reason) 1399 public void handleGodlikeKickUser(LLUUID godid, LLUUID sessionid, LLUUID agentid, uint kickflags, byte[] reason)