diff options
author | Melanie | 2009-08-17 09:40:38 +0100 |
---|---|---|
committer | Melanie | 2009-08-17 09:40:38 +0100 |
commit | 644db1e5400504ec70b22c3e928873948f1247c3 (patch) | |
tree | 589f916ecf83f9208c2e7a63015b05388ba92fb4 /OpenSim | |
parent | Add the ability to use -console=rest to the region server. User (diff) | |
download | opensim-SC_OLD-644db1e5400504ec70b22c3e928873948f1247c3.zip opensim-SC_OLD-644db1e5400504ec70b22c3e928873948f1247c3.tar.gz opensim-SC_OLD-644db1e5400504ec70b22c3e928873948f1247c3.tar.bz2 opensim-SC_OLD-644db1e5400504ec70b22c3e928873948f1247c3.tar.xz |
Add System.Xml reference to the console project
Diffstat (limited to '')
5 files changed, 101 insertions, 32 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 12c2d86..e1d6f1b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1435,6 +1435,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1435 | /// <param name="map">heightmap</param> | 1435 | /// <param name="map">heightmap</param> |
1436 | public virtual void SendLayerData(float[] map) | 1436 | public virtual void SendLayerData(float[] map) |
1437 | { | 1437 | { |
1438 | DoSendLayerData((object)map); | ||
1438 | ThreadPool.QueueUserWorkItem(DoSendLayerData, map); | 1439 | ThreadPool.QueueUserWorkItem(DoSendLayerData, map); |
1439 | } | 1440 | } |
1440 | 1441 | ||
@@ -1450,16 +1451,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1450 | { | 1451 | { |
1451 | for (int y = 0; y < 16; y++) | 1452 | for (int y = 0; y < 16; y++) |
1452 | { | 1453 | { |
1453 | // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception | 1454 | for (int x = 0; x < 16; x += 4) |
1454 | // see http://opensimulator.org/mantis/view.php?id=1662 | 1455 | { |
1455 | //for (int x = 0; x < 16; x += 4) | 1456 | SendLayerPacket(LLHeightFieldMoronize(map), y, x); |
1456 | //{ | ||
1457 | // SendLayerPacket(map, y, x); | ||
1458 | // Thread.Sleep(150); | ||
1459 | //} | ||
1460 | for (int x = 0; x < 16; x++) | ||
1461 | { | ||
1462 | SendLayerData(x, y, LLHeightFieldMoronize(map)); | ||
1463 | Thread.Sleep(35); | 1457 | Thread.Sleep(35); |
1464 | } | 1458 | } |
1465 | } | 1459 | } |
@@ -1476,17 +1470,54 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1476 | /// <param name="map">heightmap</param> | 1470 | /// <param name="map">heightmap</param> |
1477 | /// <param name="px">X coordinate for patches 0..12</param> | 1471 | /// <param name="px">X coordinate for patches 0..12</param> |
1478 | /// <param name="py">Y coordinate for patches 0..15</param> | 1472 | /// <param name="py">Y coordinate for patches 0..15</param> |
1479 | // private void SendLayerPacket(float[] map, int y, int x) | 1473 | private void SendLayerPacket(float[] map, int y, int x) |
1480 | // { | 1474 | { |
1481 | // int[] patches = new int[4]; | 1475 | int[] patches = new int[4]; |
1482 | // patches[0] = x + 0 + y * 16; | 1476 | patches[0] = x + 0 + y * 16; |
1483 | // patches[1] = x + 1 + y * 16; | 1477 | patches[1] = x + 1 + y * 16; |
1484 | // patches[2] = x + 2 + y * 16; | 1478 | patches[2] = x + 2 + y * 16; |
1485 | // patches[3] = x + 3 + y * 16; | 1479 | patches[3] = x + 3 + y * 16; |
1486 | 1480 | ||
1487 | // Packet layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches); | 1481 | LayerDataPacket layerpack; |
1488 | // OutPacket(layerpack, ThrottleOutPacketType.Land); | 1482 | try |
1489 | // } | 1483 | { |
1484 | layerpack = TerrainCompressor.CreateLandPacket(map, patches); | ||
1485 | layerpack.Header.Zerocoded = true; | ||
1486 | layerpack.Header.Reliable = true; | ||
1487 | |||
1488 | if (layerpack.Length > 1000) // Oversize packet was created | ||
1489 | { | ||
1490 | for (int xa = 0 ; xa < 4 ; xa++) | ||
1491 | { | ||
1492 | // Send oversize packet in individual patches | ||
1493 | // | ||
1494 | SendLayerData(x+xa, y, map); | ||
1495 | } | ||
1496 | } | ||
1497 | else | ||
1498 | { | ||
1499 | OutPacket(layerpack, ThrottleOutPacketType.Land); | ||
1500 | } | ||
1501 | } | ||
1502 | catch (OverflowException e) | ||
1503 | { | ||
1504 | for (int xa = 0 ; xa < 4 ; xa++) | ||
1505 | { | ||
1506 | // Send oversize packet in individual patches | ||
1507 | // | ||
1508 | SendLayerData(x+xa, y, map); | ||
1509 | } | ||
1510 | } | ||
1511 | catch (IndexOutOfRangeException e) | ||
1512 | { | ||
1513 | for (int xa = 0 ; xa < 4 ; xa++) | ||
1514 | { | ||
1515 | // Bad terrain, send individual chunks | ||
1516 | // | ||
1517 | SendLayerData(x+xa, y, map); | ||
1518 | } | ||
1519 | } | ||
1520 | } | ||
1490 | 1521 | ||
1491 | /// <summary> | 1522 | /// <summary> |
1492 | /// Sends a specified patch to a client | 1523 | /// Sends a specified patch to a client |
@@ -1507,6 +1538,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1507 | 1538 | ||
1508 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(((map.Length==65536)? map : LLHeightFieldMoronize(map)), patches); | 1539 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(((map.Length==65536)? map : LLHeightFieldMoronize(map)), patches); |
1509 | layerpack.Header.Zerocoded = true; | 1540 | layerpack.Header.Zerocoded = true; |
1541 | layerpack.Header.Reliable = true; | ||
1510 | 1542 | ||
1511 | OutPacket(layerpack, ThrottleOutPacketType.Land); | 1543 | OutPacket(layerpack, ThrottleOutPacketType.Land); |
1512 | 1544 | ||
@@ -1556,7 +1588,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1556 | /// <param name="windSpeeds">16x16 array of wind speeds</param> | 1588 | /// <param name="windSpeeds">16x16 array of wind speeds</param> |
1557 | public virtual void SendWindData(Vector2[] windSpeeds) | 1589 | public virtual void SendWindData(Vector2[] windSpeeds) |
1558 | { | 1590 | { |
1559 | ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds); | 1591 | DoSendWindData((object)windSpeeds); |
1592 | // ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds); | ||
1560 | } | 1593 | } |
1561 | 1594 | ||
1562 | /// <summary> | 1595 | /// <summary> |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index aef1b94..47c7fe4 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
147 | { | 147 | { |
148 | // The timeout should always be significantly larger than the timeout for the grid server to request | 148 | // The timeout should always be significantly larger than the timeout for the grid server to request |
149 | // the initial status of the region before confirming registration. | 149 | // the initial status of the region before confirming registration. |
150 | GridResp = GridReq.Send(serversInfo.GridURL, 90000); | 150 | GridResp = GridReq.Send(serversInfo.GridURL, 9999999); |
151 | } | 151 | } |
152 | catch (Exception e) | 152 | catch (Exception e) |
153 | { | 153 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index fcc2673..2426393 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -48,6 +48,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
48 | private int m_saydistance = 30; | 48 | private int m_saydistance = 30; |
49 | private int m_shoutdistance = 100; | 49 | private int m_shoutdistance = 100; |
50 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
51 | private string m_adminprefix = String.Empty; | ||
51 | private List<Scene> m_scenes = new List<Scene>(); | 52 | private List<Scene> m_scenes = new List<Scene>(); |
52 | 53 | ||
53 | internal object m_syncy = new object(); | 54 | internal object m_syncy = new object(); |
@@ -76,6 +77,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); | 77 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); |
77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); | 78 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); |
78 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); | 79 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); |
80 | m_adminprefix = config.Configs["Chat"].GetString("admin_prefix", m_adminprefix); | ||
79 | } | 81 | } |
80 | 82 | ||
81 | public virtual void AddRegion(Scene scene) | 83 | public virtual void AddRegion(Scene scene) |
@@ -207,6 +209,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
207 | fromPos = avatar.AbsolutePosition; | 209 | fromPos = avatar.AbsolutePosition; |
208 | fromName = avatar.Name; | 210 | fromName = avatar.Name; |
209 | fromID = c.Sender.AgentId; | 211 | fromID = c.Sender.AgentId; |
212 | if (avatar.GodLevel > 100) | ||
213 | fromName = m_adminprefix + fromName; | ||
210 | 214 | ||
211 | break; | 215 | break; |
212 | 216 | ||
@@ -255,14 +259,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
255 | string fromName = c.From; | 259 | string fromName = c.From; |
256 | 260 | ||
257 | UUID fromID = UUID.Zero; | 261 | UUID fromID = UUID.Zero; |
262 | UUID ownerID = UUID.Zero; | ||
258 | ChatSourceType sourceType = ChatSourceType.Object; | 263 | ChatSourceType sourceType = ChatSourceType.Object; |
259 | if (null != c.Sender) | 264 | if (null != c.Sender) |
260 | { | 265 | { |
261 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); | 266 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); |
262 | fromID = c.Sender.AgentId; | 267 | fromID = c.Sender.AgentId; |
268 | ownerID = c.Sender.AgentId; | ||
263 | fromName = avatar.Name; | 269 | fromName = avatar.Name; |
264 | sourceType = ChatSourceType.Agent; | 270 | sourceType = ChatSourceType.Agent; |
265 | } | 271 | } |
272 | if (c.SenderObject != null) | ||
273 | { | ||
274 | SceneObjectPart senderObject = (SceneObjectPart)c.SenderObject; | ||
275 | fromID = senderObject.UUID; | ||
276 | ownerID = senderObject.OwnerID; | ||
277 | fromName = senderObject.Name; | ||
278 | } | ||
266 | 279 | ||
267 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 280 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
268 | 281 | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 75b3fe6..61ef20e 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -214,7 +214,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
214 | 214 | ||
215 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) | 215 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) |
216 | { | 216 | { |
217 | m_scene.Restart(timeInSeconds); | 217 | // m_scene.Restart(timeInSeconds); |
218 | remoteClient.SendBlueBoxMessage(UUID.Zero, "System", "Restart is not available"); | ||
218 | } | 219 | } |
219 | 220 | ||
220 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) | 221 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index b7030f1..80d7598 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -156,10 +156,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
156 | 156 | ||
157 | private const uint m_regionWidth = Constants.RegionSize; | 157 | private const uint m_regionWidth = Constants.RegionSize; |
158 | private const uint m_regionHeight = Constants.RegionSize; | 158 | private const uint m_regionHeight = Constants.RegionSize; |
159 | 159 | private bool IsLocked = false; | |
160 | private float ODE_STEPSIZE = 0.020f; | 160 | private float ODE_STEPSIZE = 0.020f; |
161 | private float metersInSpace = 29.9f; | 161 | private float metersInSpace = 29.9f; |
162 | 162 | private List<PhysicsActor> RemoveQueue; | |
163 | public float gravityx = 0f; | 163 | public float gravityx = 0f; |
164 | public float gravityy = 0f; | 164 | public float gravityy = 0f; |
165 | public float gravityz = -9.8f; | 165 | public float gravityz = -9.8f; |
@@ -376,6 +376,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
376 | // Initialize the mesh plugin | 376 | // Initialize the mesh plugin |
377 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | 377 | public override void Initialise(IMesher meshmerizer, IConfigSource config) |
378 | { | 378 | { |
379 | RemoveQueue = new List<PhysicsActor>(); | ||
379 | mesher = meshmerizer; | 380 | mesher = meshmerizer; |
380 | m_config = config; | 381 | m_config = config; |
381 | // Defaults | 382 | // Defaults |
@@ -2047,13 +2048,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2047 | { | 2048 | { |
2048 | if (prim is OdePrim) | 2049 | if (prim is OdePrim) |
2049 | { | 2050 | { |
2050 | lock (OdeLock) | 2051 | if (!IsLocked) //Fix a deadlock situation.. have we been locked by Simulate? |
2051 | { | 2052 | { |
2052 | OdePrim p = (OdePrim) prim; | 2053 | lock (OdeLock) |
2054 | { | ||
2055 | OdePrim p = (OdePrim)prim; | ||
2053 | 2056 | ||
2054 | p.setPrimForRemoval(); | 2057 | p.setPrimForRemoval(); |
2055 | AddPhysicsActorTaint(prim); | 2058 | AddPhysicsActorTaint(prim); |
2056 | //RemovePrimThreadLocked(p); | 2059 | //RemovePrimThreadLocked(p); |
2060 | } | ||
2061 | } | ||
2062 | else | ||
2063 | { | ||
2064 | //Add the prim to a queue which will be removed when Simulate has finished what it's doing. | ||
2065 | RemoveQueue.Add(prim); | ||
2057 | } | 2066 | } |
2058 | } | 2067 | } |
2059 | } | 2068 | } |
@@ -2575,7 +2584,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2575 | DeleteRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks | 2584 | DeleteRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks |
2576 | CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks | 2585 | CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks |
2577 | } | 2586 | } |
2578 | 2587 | IsLocked = true; | |
2579 | lock (OdeLock) | 2588 | lock (OdeLock) |
2580 | { | 2589 | { |
2581 | // Process 10 frames if the sim is running normal.. | 2590 | // Process 10 frames if the sim is running normal.. |
@@ -2988,6 +2997,19 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2988 | d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); | 2997 | d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); |
2989 | } | 2998 | } |
2990 | } | 2999 | } |
3000 | IsLocked = false; | ||
3001 | if (RemoveQueue.Count > 0) | ||
3002 | { | ||
3003 | do | ||
3004 | { | ||
3005 | if (RemoveQueue[0] != null) | ||
3006 | { | ||
3007 | RemovePrimThreadLocked((OdePrim)RemoveQueue[0]); | ||
3008 | } | ||
3009 | RemoveQueue.RemoveAt(0); | ||
3010 | } | ||
3011 | while (RemoveQueue.Count > 0); | ||
3012 | } | ||
2991 | 3013 | ||
2992 | return fps; | 3014 | return fps; |
2993 | } | 3015 | } |