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.cs86
1 files changed, 37 insertions, 49 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1d688e3..a724ac0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -270,12 +270,12 @@ namespace OpenSim.Region.Environment.Scenes
270 270
271 RegisterDefaultSceneEvents(); 271 RegisterDefaultSceneEvents();
272 272
273 MainLog.Instance.Verbose("SCENE", "Creating new entitities instance"); 273 m_log.Info("[SCENE]: Creating new entitities instance");
274 Entities = new Dictionary<LLUUID, EntityBase>(); 274 Entities = new Dictionary<LLUUID, EntityBase>();
275 m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); 275 m_scenePresences = new Dictionary<LLUUID, ScenePresence>();
276 //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 276 //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
277 277
278 MainLog.Instance.Verbose("SCENE", "Creating LandMap"); 278 m_log.Info("[SCENE]: Creating LandMap");
279 Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); 279 Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY);
280 280
281 ScenePresence.LoadAnims(); 281 ScenePresence.LoadAnims();
@@ -365,16 +365,14 @@ namespace OpenSim.Region.Environment.Scenes
365 { 365 {
366 // This means that we're not booted up completely yet. 366 // This means that we're not booted up completely yet.
367 // This shouldn't happen too often anymore. 367 // This shouldn't happen too often anymore.
368 MainLog.Instance.Error("SCENE", 368 m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
369 "Couldn't inform client of regionup because we got a null reference exception");
370 } 369 }
371 } 370 }
372 else 371 else
373 { 372 {
374 MainLog.Instance.Verbose("INTERGRID", 373 m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() +
375 "Got notice about far away Region: " + otherRegion.RegionName.ToString() + 374 " at (" + otherRegion.RegionLocX.ToString() + ", " +
376 " at (" + otherRegion.RegionLocX.ToString() + ", " + 375 otherRegion.RegionLocY.ToString() + ")");
377 otherRegion.RegionLocY.ToString() + ")");
378 } 376 }
379 } 377 }
380 return true; 378 return true;
@@ -402,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes
402 m_RestartTimerCounter = 0; 400 m_RestartTimerCounter = 0;
403 m_restartTimer.AutoReset = true; 401 m_restartTimer.AutoReset = true;
404 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 402 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
405 MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); 403 m_log.Error("[REGION]: Restarting Region in " + (seconds/60) + " minutes");
406 m_restartTimer.Start(); 404 m_restartTimer.Start();
407 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); 405 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
408 //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); 406 //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
@@ -436,9 +434,9 @@ namespace OpenSim.Region.Environment.Scenes
436 // This causes the region to restart immediatley. 434 // This causes the region to restart immediatley.
437 public void RestartNow() 435 public void RestartNow()
438 { 436 {
439 MainLog.Instance.Error("REGION", "Closing"); 437 m_log.Error("[REGION]: Closing");
440 Close(); 438 Close();
441 MainLog.Instance.Error("REGION", "Firing Region Restart Message"); 439 m_log.Error("[REGION]: Firing Region Restart Message");
442 base.Restart(0); 440 base.Restart(0);
443 } 441 }
444 442
@@ -485,7 +483,7 @@ namespace OpenSim.Region.Environment.Scenes
485 if (m_scripts_enabled != !ScriptEngine) 483 if (m_scripts_enabled != !ScriptEngine)
486 { 484 {
487 // Tedd! Here's the method to disable the scripting engine! 485 // Tedd! Here's the method to disable the scripting engine!
488 MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine"); 486 m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
489 } 487 }
490 if (m_physics_enabled != !PhysicsEngine) 488 if (m_physics_enabled != !PhysicsEngine)
491 { 489 {
@@ -498,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes
498 // This is the method that shuts down the scene. 496 // This is the method that shuts down the scene.
499 public override void Close() 497 public override void Close()
500 { 498 {
501 MainLog.Instance.Warn("SCENE", "Closing down the single simulator: " + RegionInfo.RegionName); 499 m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName);
502 // Kick all ROOT agents with the message, 'The simulator is going down' 500 // Kick all ROOT agents with the message, 'The simulator is going down'
503 ForEachScenePresence(delegate(ScenePresence avatar) 501 ForEachScenePresence(delegate(ScenePresence avatar)
504 { 502 {
@@ -543,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes
543 /// </summary> 541 /// </summary>
544 public void StartTimer() 542 public void StartTimer()
545 { 543 {
546 MainLog.Instance.Debug("SCENE", "Starting timer"); 544 m_log.Debug("[SCENE]: Starting timer");
547 m_heartbeatTimer.Enabled = true; 545 m_heartbeatTimer.Enabled = true;
548 m_heartbeatTimer.Interval = (int) (m_timespan*1000); 546 m_heartbeatTimer.Interval = (int) (m_timespan*1000);
549 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); 547 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
@@ -649,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes
649 } 647 }
650 catch (Exception e) 648 catch (Exception e)
651 { 649 {
652 MainLog.Instance.Error("Scene", "Failed with exception " + e.ToString()); 650 m_log.Error("[Scene]: Failed with exception " + e.ToString());
653 } 651 }
654 finally 652 finally
655 { 653 {
@@ -848,7 +846,7 @@ namespace OpenSim.Region.Environment.Scenes
848 { 846 {
849 if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) 847 if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile))
850 { 848 {
851 MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); 849 m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain.");
852 Terrain.SetDefaultTerrain(); 850 Terrain.SetDefaultTerrain();
853 851
854 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 852 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
@@ -862,8 +860,7 @@ namespace OpenSim.Region.Environment.Scenes
862 } 860 }
863 catch 861 catch
864 { 862 {
865 MainLog.Instance.Verbose("TERRAIN", 863 m_log.Info("[TERRAIN]: No terrain found in database or default. Generating a new terrain.");
866 "No terrain found in database or default. Generating a new terrain.");
867 Terrain.SetDefaultTerrain(); 864 Terrain.SetDefaultTerrain();
868 } 865 }
869 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 866 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
@@ -879,7 +876,7 @@ namespace OpenSim.Region.Environment.Scenes
879 } 876 }
880 catch (Exception e) 877 catch (Exception e)
881 { 878 {
882 MainLog.Instance.Warn("terrain", "Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 879 m_log.Warn("[terrain]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString());
883 } 880 }
884 } 881 }
885 882
@@ -894,12 +891,12 @@ namespace OpenSim.Region.Environment.Scenes
894 { 891 {
895 if (dGridSettings["allow_forceful_banlines"] != "TRUE") 892 if (dGridSettings["allow_forceful_banlines"] != "TRUE")
896 { 893 {
897 MainLog.Instance.Verbose("GRID", "Grid is disabling forceful parcel banlists"); 894 m_log.Info("[GRID]: Grid is disabling forceful parcel banlists");
898 m_LandManager.allowedForcefulBans = false; 895 m_LandManager.allowedForcefulBans = false;
899 } 896 }
900 else 897 else
901 { 898 {
902 MainLog.Instance.Verbose("GRID", "Grid is allowing forceful parcel banlists"); 899 m_log.Info("[GRID]: Grid is allowing forceful parcel banlists");
903 m_LandManager.allowedForcefulBans = true; 900 m_LandManager.allowedForcefulBans = true;
904 } 901 }
905 } 902 }
@@ -929,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes
929 926
930 public void loadAllLandObjectsFromStorage() 927 public void loadAllLandObjectsFromStorage()
931 { 928 {
932 MainLog.Instance.Verbose("SCENE", "Loading land objects from storage"); 929 m_log.Info("[SCENE]: Loading land objects from storage");
933 List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); 930 List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID);
934 931
935 if (landData.Count == 0) 932 if (landData.Count == 0)
@@ -951,7 +948,7 @@ namespace OpenSim.Region.Environment.Scenes
951 /// </summary> 948 /// </summary>
952 public virtual void LoadPrimsFromStorage(bool m_permissions) 949 public virtual void LoadPrimsFromStorage(bool m_permissions)
953 { 950 {
954 MainLog.Instance.Verbose("SCENE", "Loading objects from datastore"); 951 m_log.Info("[SCENE]: Loading objects from datastore");
955 952
956 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); 953 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID);
957 foreach (SceneObjectGroup group in PrimsFromDB) 954 foreach (SceneObjectGroup group in PrimsFromDB)
@@ -964,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes
964 //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 961 //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
965 } 962 }
966 963
967 MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 964 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
968 } 965 }
969 966
970 967
@@ -999,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes
999 { 996 {
1000 pos = target.AbsolutePosition; 997 pos = target.AbsolutePosition;
1001 998
1002 //MainLog.Instance.Verbose("RAYTRACE", pos.ToString()); 999 //m_log.Info("[RAYTRACE]: " + pos.ToString());
1003 //EntityIntersection rayTracing = null; 1000 //EntityIntersection rayTracing = null;
1004 //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); 1001 //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
1005 //if (presence != null) 1002 //if (presence != null)
@@ -1038,14 +1035,10 @@ namespace OpenSim.Region.Environment.Scenes
1038 1035
1039 //Vector3 RezPoint = Newpos; 1036 //Vector3 RezPoint = Newpos;
1040 1037
1041 //MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString()); 1038 //m_log.Info("[REZINFO]: Possible Rez Point:" + RezPoint.ToString());
1042 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); 1039 //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z);
1043 //} 1040 //}
1044 1041
1045
1046
1047
1048
1049 return pos; 1042 return pos;
1050 } 1043 }
1051 else 1044 else
@@ -1061,18 +1054,14 @@ namespace OpenSim.Region.Environment.Scenes
1061 pos = RayEnd; 1054 pos = RayEnd;
1062 return pos; 1055 return pos;
1063 } 1056 }
1064
1065 } 1057 }
1066 1058
1067 public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, 1059 public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape,
1068 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 1060 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
1069 byte RayEndIsIntersection) 1061 byte RayEndIsIntersection)
1070 { 1062 {
1071 LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); 1063 LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection);
1072 1064
1073
1074
1075
1076 if (PermissionsMngr.CanRezObject(ownerID, pos)) 1065 if (PermissionsMngr.CanRezObject(ownerID, pos))
1077 { 1066 {
1078 // rez ON the ground, not IN the ground 1067 // rez ON the ground, not IN the ground
@@ -1364,7 +1353,7 @@ namespace OpenSim.Region.Environment.Scenes
1364 } 1353 }
1365 catch (Exception e) 1354 catch (Exception e)
1366 { 1355 {
1367 MainLog.Instance.Error("Scene.cs:RemoveClient exception: " + e.ToString()); 1356 m_log.Error("Scene.cs:RemoveClient exception: " + e.ToString());
1368 } 1357 }
1369 1358
1370 // Remove client agent from profile, so new logins will work 1359 // Remove client agent from profile, so new logins will work
@@ -1474,7 +1463,7 @@ namespace OpenSim.Region.Environment.Scenes
1474 1463
1475 if (m_capsHandlers.ContainsKey(agent.AgentID)) 1464 if (m_capsHandlers.ContainsKey(agent.AgentID))
1476 { 1465 {
1477 //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + 1466 //m_log.Warn("[client]: Adding duplicate CAPS entry for user " +
1478 // agent.AgentID.ToString()); 1467 // agent.AgentID.ToString());
1479 try 1468 try
1480 { 1469 {
@@ -1514,8 +1503,8 @@ namespace OpenSim.Region.Environment.Scenes
1514 } 1503 }
1515 catch (Exception e) 1504 catch (Exception e)
1516 { 1505 {
1517 MainLog.Instance.Verbose("SCENE", "Unable to do Agent Crossing."); 1506 m_log.Info("[SCENE]: Unable to do Agent Crossing.");
1518 MainLog.Instance.Debug("SCENE", e.ToString()); 1507 m_log.Debug("[SCENE]: " + e.ToString());
1519 } 1508 }
1520 //m_innerScene.SwapRootChildAgent(false); 1509 //m_innerScene.SwapRootChildAgent(false);
1521 } 1510 }
@@ -2158,14 +2147,14 @@ namespace OpenSim.Region.Environment.Scenes
2158 switch (showWhat) 2147 switch (showWhat)
2159 { 2148 {
2160 case "users": 2149 case "users":
2161 MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName); 2150 m_log.Error("Current Region: " + RegionInfo.RegionName);
2162 MainLog.Instance.Error( 2151 m_log.Error(
2163 String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", 2152 String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname",
2164 "Agent ID", "Session ID", "Circuit", "IP", "World")); 2153 "Agent ID", "Session ID", "Circuit", "IP", "World"));
2165 2154
2166 foreach (ScenePresence scenePrescence in GetAvatars()) 2155 foreach (ScenePresence scenePrescence in GetAvatars())
2167 { 2156 {
2168 MainLog.Instance.Error( 2157 m_log.Error(
2169 String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", 2158 String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
2170 scenePrescence.Firstname, 2159 scenePrescence.Firstname,
2171 scenePrescence.Lastname, 2160 scenePrescence.Lastname,
@@ -2177,12 +2166,12 @@ namespace OpenSim.Region.Environment.Scenes
2177 } 2166 }
2178 break; 2167 break;
2179 case "modules": 2168 case "modules":
2180 MainLog.Instance.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); 2169 m_log.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:");
2181 foreach (IRegionModule module in Modules.Values) 2170 foreach (IRegionModule module in Modules.Values)
2182 { 2171 {
2183 if (!module.IsSharedModule) 2172 if (!module.IsSharedModule)
2184 { 2173 {
2185 MainLog.Instance.Error("Region Module: " + module.Name); 2174 m_log.Error("Region Module: " + module.Name);
2186 } 2175 }
2187 } 2176 }
2188 break; 2177 break;
@@ -2250,11 +2239,10 @@ namespace OpenSim.Region.Environment.Scenes
2250 /// 2239 ///
2251 /// </summary> 2240 /// </summary>
2252 /// <param name="scriptEngine"></param> 2241 /// <param name="scriptEngine"></param>
2253 /// <param name="logger"></param> 2242 public void AddScriptEngine(ScriptEngineInterface scriptEngine)
2254 public void AddScriptEngine(ScriptEngineInterface scriptEngine, LogBase logger)
2255 { 2243 {
2256 ScriptEngines.Add(scriptEngine); 2244 ScriptEngines.Add(scriptEngine);
2257 scriptEngine.InitializeEngine(this, logger); 2245 scriptEngine.InitializeEngine(this);
2258 } 2246 }
2259 2247
2260 public void TriggerObjectChanged(uint localID, uint change) 2248 public void TriggerObjectChanged(uint localID, uint change)
@@ -2372,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes
2372 } 2360 }
2373 catch (Exception e) 2361 catch (Exception e)
2374 { 2362 {
2375 MainLog.Instance.Verbose("BUG", e.ToString()); 2363 m_log.Info("[BUG]: " + e.ToString());
2376 } 2364 }
2377 } 2365 }
2378 } 2366 }