aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
1 files changed, 7 insertions, 23 deletions
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)