aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-21 02:17:24 +0000
committerTeravus Ovares2007-11-21 02:17:24 +0000
commit7cb38712d5ad6781e672e4f1c8500ecd88d85f3e (patch)
tree5203c9901fdbba5ec8d9a21880d7895f593af540 /OpenSim/Region/Environment
parentfix for mantis #2 from Justin Casey (IBM) (diff)
downloadopensim-SC_OLD-7cb38712d5ad6781e672e4f1c8500ecd88d85f3e.zip
opensim-SC_OLD-7cb38712d5ad6781e672e4f1c8500ecd88d85f3e.tar.gz
opensim-SC_OLD-7cb38712d5ad6781e672e4f1c8500ecd88d85f3e.tar.bz2
opensim-SC_OLD-7cb38712d5ad6781e672e4f1c8500ecd88d85f3e.tar.xz
* Did some initial work for prim crossing. Just glue so far.
* Added the child_get_tasks OpenSim.ini flag for testing the UDP packet sending code and packet throttler. This flag gets purposely disabled in grid mode. This flag also has the consequence that you can see the prim in neighboring regions without going into them. Be warned, this causes tons of dropped packets.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs18
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs25
4 files changed, 43 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index a78e4f6..82cec82 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules
181 foreach (Scene m_scene in m_scenes) 181 foreach (Scene m_scene in m_scenes)
182 { 182 {
183 m_scene.ForEachScenePresence(delegate(ScenePresence presence) 183 m_scene.ForEachScenePresence(delegate(ScenePresence presence)
184 { 184 {
185 if (!presence.IsChildAgent) 185 if (!presence.IsChildAgent)
186 { 186 {
187 int dis = -100000; 187 int dis = -100000;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 405f2e3..90306f2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 69
70 private readonly Mutex updateLock; 70 private readonly Mutex updateLock;
71 public bool m_physicalPrim; 71 public bool m_physicalPrim;
72 public bool m_sendTasksToChild;
72 protected ModuleLoader m_moduleLoader; 73 protected ModuleLoader m_moduleLoader;
73 protected StorageManager m_storageManager; 74 protected StorageManager m_storageManager;
74 protected AgentCircuitManager m_authenticateHandler; 75 protected AgentCircuitManager m_authenticateHandler;
@@ -197,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes
197 198
198 public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, 199 public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
199 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, 200 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
200 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim) 201 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SendTasksToChild)
201 { 202 {
202 updateLock = new Mutex(false); 203 updateLock = new Mutex(false);
203 204
@@ -213,6 +214,7 @@ namespace OpenSim.Region.Environment.Scenes
213 m_datastore = m_regInfo.DataStore; 214 m_datastore = m_regInfo.DataStore;
214 RegisterRegionWithComms(); 215 RegisterRegionWithComms();
215 m_physicalPrim = physicalPrim; 216 m_physicalPrim = physicalPrim;
217 m_sendTasksToChild = SendTasksToChild;
216 218
217 m_LandManager = new LandManager(this, m_regInfo); 219 m_LandManager = new LandManager(this, m_regInfo);
218 m_estateManager = new EstateManager(this, m_regInfo); 220 m_estateManager = new EstateManager(this, m_regInfo);
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 4d4f78f..ad7ff58 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -20,6 +20,8 @@ namespace OpenSim.Region.Environment.Scenes
20 public event AgentCrossing OnAvatarCrossingIntoRegion; 20 public event AgentCrossing OnAvatarCrossingIntoRegion;
21 public event ExpectUserDelegate OnExpectUser; 21 public event ExpectUserDelegate OnExpectUser;
22 public event CloseAgentConnection OnCloseAgentConnection; 22 public event CloseAgentConnection OnCloseAgentConnection;
23 public event PrimCrossing OnPrimCrossingIntoRegion;
24
23 25
24 public SceneCommunicationService(CommunicationsManager commsMan) 26 public SceneCommunicationService(CommunicationsManager commsMan)
25 { 27 {
@@ -34,7 +36,10 @@ namespace OpenSim.Region.Environment.Scenes
34 { 36 {
35 regionCommsHost.OnExpectUser += NewUserConnection; 37 regionCommsHost.OnExpectUser += NewUserConnection;
36 regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; 38 regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing;
39 regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing;
37 regionCommsHost.OnCloseAgentConnection += CloseConnection; 40 regionCommsHost.OnCloseAgentConnection += CloseConnection;
41
42
38 } 43 }
39 } 44 }
40 45
@@ -42,6 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
42 { 47 {
43 regionCommsHost.OnExpectUser -= NewUserConnection; 48 regionCommsHost.OnExpectUser -= NewUserConnection;
44 regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; 49 regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing;
50 regionCommsHost.OnPrimCrossingIntoRegion -= PrimCrossing;
45 regionCommsHost.OnCloseAgentConnection -= CloseConnection; 51 regionCommsHost.OnCloseAgentConnection -= CloseConnection;
46 m_commsProvider.GridService.DeregisterRegion(m_regionInfo); 52 m_commsProvider.GridService.DeregisterRegion(m_regionInfo);
47 regionCommsHost = null; 53 regionCommsHost = null;
@@ -68,6 +74,13 @@ namespace OpenSim.Region.Environment.Scenes
68 OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying); 74 OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying);
69 } 75 }
70 } 76 }
77 protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
78 {
79 if (OnPrimCrossingIntoRegion != null)
80 {
81 OnPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical);
82 }
83 }
71 84
72 protected void CloseConnection(ulong regionHandle, LLUUID agentID) 85 protected void CloseConnection(ulong regionHandle, LLUUID agentID)
73 { 86 {
@@ -222,6 +235,11 @@ namespace OpenSim.Region.Environment.Scenes
222 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); 235 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
223 } 236 }
224 237
238 public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, LLVector3 position, bool isPhysical)
239 {
240 return m_commsProvider.InterRegion.ExpectPrimCrossing(regionhandle, primID, position, isPhysical);
241 }
242
225 public void CloseChildAgentConnections(ScenePresence presence) 243 public void CloseChildAgentConnections(ScenePresence presence)
226 { 244 {
227 foreach (ulong regionHandle in presence.KnownChildRegions) 245 foreach (ulong regionHandle in presence.KnownChildRegions)
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index ea8d5c4..be21748 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 private bool m_newForce = false; 69 private bool m_newForce = false;
70 private bool m_newAvatar = false; 70 private bool m_newAvatar = false;
71 private bool m_newCoarseLocations = true; 71 private bool m_newCoarseLocations = true;
72 private bool m_gotAllObjectsInScene = false;
72 private float m_avHeight = 127.0f; 73 private float m_avHeight = 127.0f;
73 74
74 protected RegionInfo m_regionInfo; 75 protected RegionInfo m_regionInfo;
@@ -327,7 +328,14 @@ namespace OpenSim.Region.Environment.Scenes
327 // this.UpdateQuadTreeNode(); 328 // this.UpdateQuadTreeNode();
328 //this.RefreshQuadObject(); 329 //this.RefreshQuadObject();
329 //} 330 //}
330 331 if (!m_gotAllObjectsInScene)
332 {
333 if (!m_isChildAgent || m_scene.m_sendTasksToChild)
334 {
335 m_scene.SendAllSceneObjectsToClient(this);
336 m_gotAllObjectsInScene = true;
337 }
338 }
331 if (m_partsUpdateQueue.Count > 0) 339 if (m_partsUpdateQueue.Count > 0)
332 { 340 {
333 bool runUpdate = true; 341 bool runUpdate = true;
@@ -400,7 +408,12 @@ namespace OpenSim.Region.Environment.Scenes
400 AddToPhysicalScene(); 408 AddToPhysicalScene();
401 m_physicsActor.Flying = isFlying; 409 m_physicsActor.Flying = isFlying;
402 410
403 m_scene.SendAllSceneObjectsToClient(this); 411 if (!m_gotAllObjectsInScene)
412 {
413 m_scene.SendAllSceneObjectsToClient(this);
414 m_gotAllObjectsInScene = true;
415 }
416
404 } 417 }
405 418
406 public void MakeChildAgent() 419 public void MakeChildAgent()
@@ -409,7 +422,7 @@ namespace OpenSim.Region.Environment.Scenes
409 m_isChildAgent = true; 422 m_isChildAgent = true;
410 423
411 RemoveFromPhysicalScene(); 424 RemoveFromPhysicalScene();
412 425
413 //this.Pos = new LLVector3(128, 128, 70); 426 //this.Pos = new LLVector3(128, 128, 70);
414 } 427 }
415 428
@@ -952,7 +965,7 @@ namespace OpenSim.Region.Environment.Scenes
952 SendFullUpdateToOtherClient(avatar); 965 SendFullUpdateToOtherClient(avatar);
953 if (avatar.LocalId != LocalId) 966 if (avatar.LocalId != LocalId)
954 { 967 {
955 if (!avatar.m_isChildAgent) 968 if (!avatar.m_isChildAgent || m_scene.m_sendTasksToChild)
956 { 969 {
957 avatar.SendFullUpdateToOtherClient(this); 970 avatar.SendFullUpdateToOtherClient(this);
958 avatar.SendAppearanceToOtherAgent(this); 971 avatar.SendAppearanceToOtherAgent(this);
@@ -985,7 +998,11 @@ namespace OpenSim.Region.Environment.Scenes
985 public void SendOwnAppearance( ) 998 public void SendOwnAppearance( )
986 { 999 {
987 SendOwnWearables( ); 1000 SendOwnWearables( );
1001
1002 //Ugly hack x.x - Trap set appearence to send all objects in this scene!
1003
988 m_scene.SendAllSceneObjectsToClient(this); 1004 m_scene.SendAllSceneObjectsToClient(this);
1005 m_gotAllObjectsInScene = true;
989 // TODO: remove this once the SunModule is slightly more tested 1006 // TODO: remove this once the SunModule is slightly more tested
990 // m_controllingClient.SendViewerTime(m_scene.TimePhase); 1007 // m_controllingClient.SendViewerTime(m_scene.TimePhase);
991 } 1008 }