aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-06-09 16:48:37 +0100
committerMelanie2010-06-09 16:48:37 +0100
commit6b2d2413f7026c41e7abb55c72c583670cb6011d (patch)
tree6596f0132d36f74f2e57c9b1bd891d95eb0e5a33 /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentAdd the BEGIN; I had missed (diff)
downloadopensim-SC_OLD-6b2d2413f7026c41e7abb55c72c583670cb6011d.zip
opensim-SC_OLD-6b2d2413f7026c41e7abb55c72c583670cb6011d.tar.gz
opensim-SC_OLD-6b2d2413f7026c41e7abb55c72c583670cb6011d.tar.bz2
opensim-SC_OLD-6b2d2413f7026c41e7abb55c72c583670cb6011d.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/IXInventoryData.cs2
-rw-r--r--OpenSim/Data/MySQL/Resources/AssetStore.migrations2
-rw-r--r--OpenSim/Data/MySQL/Resources/InventoryStore.migrations8
-rw-r--r--OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql38
-rw-r--r--OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/005_AssetStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/AssetStore.migrations3
-rw-r--r--OpenSim/Data/SQLite/Resources/XInventoryStore.migrations51
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs37
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs56
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs19
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs4
17 files changed, 147 insertions, 123 deletions
diff --git a/OpenSim/Data/IXInventoryData.cs b/OpenSim/Data/IXInventoryData.cs
index 6909136..d85a7ef 100644
--- a/OpenSim/Data/IXInventoryData.cs
+++ b/OpenSim/Data/IXInventoryData.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Data
51 public int inventoryNextPermissions; 51 public int inventoryNextPermissions;
52 public int inventoryCurrentPermissions; 52 public int inventoryCurrentPermissions;
53 public int invType; 53 public int invType;
54 public UUID creatorID; 54 public string creatorID;
55 public int inventoryBasePermissions; 55 public int inventoryBasePermissions;
56 public int inventoryEveryOnePermissions; 56 public int inventoryEveryOnePermissions;
57 public int salePrice; 57 public int salePrice;
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations
index 9c55630..e0526fe 100644
--- a/OpenSim/Data/MySQL/Resources/AssetStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations
@@ -73,5 +73,5 @@ ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0;
73 73
74:VERSION 8 74:VERSION 8
75 75
76ALTER TABLE assets ADD COLUMN CreatorID varchar(36) NOT NULL DEFAULT ''; 76ALTER TABLE assets ADD COLUMN CreatorID varchar(128) NOT NULL DEFAULT '';
77 77
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
index 8c5864e..3e9bad5 100644
--- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
@@ -91,3 +91,11 @@ update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' whe
91alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; 91alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
92 92
93COMMIT; 93COMMIT;
94
95:VERSION 5 # ------------
96
97BEGIN;
98
99alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000';
100
101COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
deleted file mode 100644
index 7e21996..0000000
--- a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
+++ /dev/null
@@ -1,38 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE inventoryfolders(
4 folderName varchar(255),
5 type integer,
6 version integer,
7 folderID varchar(255) primary key,
8 agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
9 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000');
10
11CREATE TABLE inventoryitems(
12 assetID varchar(255),
13 assetType integer,
14 inventoryName varchar(255),
15 inventoryDescription varchar(255),
16 inventoryNextPermissions integer,
17 inventoryCurrentPermissions integer,
18 invType integer,
19 creatorID varchar(255),
20 inventoryBasePermissions integer,
21 inventoryEveryOnePermissions integer,
22 salePrice integer default 99,
23 saleType integer default 0,
24 creationDate integer default 2000,
25 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
26 groupOwned integer default 0,
27 flags integer default 0,
28 inventoryID varchar(255) primary key,
29 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
30 avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
31 inventoryGroupPermissions integer not null default 0);
32
33create index inventoryfolders_agentid on inventoryfolders(agentID);
34create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
35create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
36create index inventoryitems_avatarid on inventoryitems(avatarID);
37
38COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
deleted file mode 100644
index d38e2b7..0000000
--- a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1ATTACH 'inventoryStore.db' AS old;
2
3BEGIN TRANSACTION;
4
5INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
6INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
7
8COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_AssetStore.sql b/OpenSim/Data/SQLite/Resources/005_AssetStore.sql
deleted file mode 100644
index f06121a..0000000
--- a/OpenSim/Data/SQLite/Resources/005_AssetStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
index bc11e13..f20631c 100644
--- a/OpenSim/Data/SQLite/Resources/AssetStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
@@ -55,7 +55,7 @@ CREATE TABLE assets(
55 Local, 55 Local,
56 Temporary, 56 Temporary,
57 asset_flags INTEGER NOT NULL DEFAULT 0, 57 asset_flags INTEGER NOT NULL DEFAULT 0,
58 CreatorID varchar(36) default '', 58 CreatorID varchar(128) default '',
59 Data); 59 Data);
60 60
61INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) 61INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data)
@@ -64,3 +64,4 @@ DROP TABLE assets_backup;
64 64
65COMMIT; 65COMMIT;
66 66
67
diff --git a/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
new file mode 100644
index 0000000..d5b3019
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
@@ -0,0 +1,51 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE inventoryfolders(
6 folderName varchar(64),
7 type integer,
8 version integer,
9 folderID varchar(36) primary key,
10 agentID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
11 parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000');
12
13CREATE TABLE inventoryitems(
14 assetID varchar(36),
15 assetType integer,
16 inventoryName varchar(64),
17 inventoryDescription varchar(128),
18 inventoryNextPermissions integer,
19 inventoryCurrentPermissions integer,
20 invType integer,
21 creatorID varchar(128),
22 inventoryBasePermissions integer,
23 inventoryEveryOnePermissions integer,
24 salePrice integer default 99,
25 saleType integer default 0,
26 creationDate integer default 2000,
27 groupID varchar(36) default '00000000-0000-0000-0000-000000000000',
28 groupOwned integer default 0,
29 flags integer default 0,
30 inventoryID varchar(36) primary key,
31 parentFolderID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
32 avatarID varchar(36) not null default '00000000-0000-0000-0000-000000000000',
33 inventoryGroupPermissions integer not null default 0);
34
35create index inventoryfolders_agentid on inventoryfolders(agentID);
36create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
37create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
38create index inventoryitems_avatarid on inventoryitems(avatarID);
39
40COMMIT;
41
42:VERSION 2
43
44ATTACH 'inventoryStore.db' AS old;
45
46BEGIN TRANSACTION;
47
48INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
49INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
50
51COMMIT; \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7090855..b2df0bd 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3426,7 +3426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3426 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); 3426 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate);
3427 loc.Header.Reliable = false; 3427 loc.Header.Reliable = false;
3428 3428
3429 // Each packet can only hold around 62 avatar positions and the client clears the mini-map each time 3429 // Each packet can only hold around 60 avatar positions and the client clears the mini-map each time
3430 // a CoarseLocationUpdate packet is received. Oh well. 3430 // a CoarseLocationUpdate packet is received. Oh well.
3431 int total = Math.Min(CoarseLocations.Count, 60); 3431 int total = Math.Min(CoarseLocations.Count, 60);
3432 3432
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 66c5a72..266621f 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -869,9 +869,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
869 869
870 CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); 870 CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
871 871
872 // m_scene.SendKillObject(m_localId);
873
874 agent.Scene.NotifyMyCoarseLocationChange();
875 // the user may change their profile information in other region, 872 // the user may change their profile information in other region,
876 // so the userinfo in UserProfileCache is not reliable any more, delete it 873 // so the userinfo in UserProfileCache is not reliable any more, delete it
877 // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! 874 // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE!
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index 58ce550..c1e92f5 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -95,6 +95,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
95 try 95 try
96 { 96 {
97 asset1.ID = url + "/" + asset.ID; 97 asset1.ID = url + "/" + asset.ID;
98 UUID temp = UUID.Zero;
99 // TODO: if the creator is local, stick this grid's URL in front
100 //if (UUID.TryParse(asset.Metadata.CreatorID, out temp))
101 // asset1.Metadata.CreatorID = ??? + "/" + asset.Metadata.CreatorID;
98 } 102 }
99 catch 103 catch
100 { 104 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 48ffbce..e80dff7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -362,6 +362,7 @@ namespace OpenSim.Region.Framework.Scenes
362 private int m_update_backup = 200; 362 private int m_update_backup = 200;
363 private int m_update_terrain = 50; 363 private int m_update_terrain = 50;
364 private int m_update_land = 1; 364 private int m_update_land = 1;
365 private int m_update_coarse_locations = 50;
365 366
366 private int frameMS; 367 private int frameMS;
367 private int physicsMS2; 368 private int physicsMS2;
@@ -1445,6 +1446,18 @@ namespace OpenSim.Region.Framework.Scenes
1445 if (m_frame % m_update_objects == 0) 1446 if (m_frame % m_update_objects == 0)
1446 m_sceneGraph.UpdateObjectGroups(); 1447 m_sceneGraph.UpdateObjectGroups();
1447 1448
1449 if (m_frame % m_update_coarse_locations == 0)
1450 {
1451 List<Vector3> coarseLocations;
1452 List<UUID> avatarUUIDs;
1453 SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60);
1454 // Send coarse locations to clients
1455 ForEachScenePresence(delegate(ScenePresence presence)
1456 {
1457 presence.SendCoarseLocations(coarseLocations, avatarUUIDs);
1458 });
1459 }
1460
1448 int tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1461 int tmpPhysicsMS2 = Util.EnvironmentTickCount();
1449 if ((m_frame % m_update_physics == 0) && m_physics_enabled) 1462 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
1450 m_sceneGraph.UpdatePreparePhysics(); 1463 m_sceneGraph.UpdatePreparePhysics();
@@ -3329,9 +3342,6 @@ namespace OpenSim.Region.Framework.Scenes
3329 catch (NullReferenceException) { } 3342 catch (NullReferenceException) { }
3330 }); 3343 });
3331 3344
3332 ForEachScenePresence(
3333 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
3334
3335 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 3345 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
3336 if (agentTransactions != null) 3346 if (agentTransactions != null)
3337 { 3347 {
@@ -3383,14 +3393,6 @@ namespace OpenSim.Region.Framework.Scenes
3383 } 3393 }
3384 } 3394 }
3385 3395
3386 /// <summary>
3387 /// Inform all other ScenePresences on this Scene that someone else has changed position on the minimap.
3388 /// </summary>
3389 public void NotifyMyCoarseLocationChange()
3390 {
3391 ForEachScenePresence(delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
3392 }
3393
3394 #endregion 3396 #endregion
3395 3397
3396 #region Entities 3398 #region Entities
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 1dab4df..80f9114 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -211,6 +211,43 @@ namespace OpenSim.Region.Framework.Scenes
211 }); 211 });
212 } 212 }
213 213
214 public void GetCoarseLocations(out List<Vector3> coarseLocations, out List<UUID> avatarUUIDs, uint maxLocations)
215 {
216 coarseLocations = new List<Vector3>();
217 avatarUUIDs = new List<UUID>();
218
219 List<ScenePresence> presences = GetScenePresences();
220 for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
221 {
222 ScenePresence sp = presences[i];
223 // If this presence is a child agent, we don't want its coarse locations
224 if (sp.IsChildAgent)
225 return;
226
227 if (sp.ParentID != 0)
228 {
229 // sitting avatar
230 SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
231 if (sop != null)
232 {
233 coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition);
234 avatarUUIDs.Add(sp.UUID);
235 }
236 else
237 {
238 // we can't find the parent.. ! arg!
239 coarseLocations.Add(sp.AbsolutePosition);
240 avatarUUIDs.Add(sp.UUID);
241 }
242 }
243 else
244 {
245 coarseLocations.Add(sp.AbsolutePosition);
246 avatarUUIDs.Add(sp.UUID);
247 }
248 }
249 }
250
214 #endregion 251 #endregion
215 252
216 #region Entity Methods 253 #region Entity Methods
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e3bbe8a..8cd3ac6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes
66 public ScriptControlled eventControls; 66 public ScriptControlled eventControls;
67 } 67 }
68 68
69 public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); 69 public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs);
70 70
71 public class ScenePresence : EntityBase, ISceneEntity 71 public class ScenePresence : EntityBase, ISceneEntity
72 { 72 {
@@ -178,8 +178,6 @@ namespace OpenSim.Region.Framework.Scenes
178 178
179 public string JID = String.Empty; 179 public string JID = String.Empty;
180 180
181 // Agent moves with a PID controller causing a force to be exerted.
182 private bool m_newCoarseLocations = true;
183 private float m_health = 100f; 181 private float m_health = 100f;
184 182
185 // Default AV Height 183 // Default AV Height
@@ -2548,12 +2546,6 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2548 2546
2549 2547
2550 2548
2551 if (m_newCoarseLocations)
2552 {
2553 SendCoarseLocations();
2554 m_newCoarseLocations = false;
2555 }
2556
2557 if (m_isChildAgent == false) 2549 if (m_isChildAgent == false)
2558 { 2550 {
2559// PhysicsActor actor = m_physicsActor; 2551// PhysicsActor actor = m_physicsActor;
@@ -2630,12 +2622,12 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2630 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); 2622 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2631 } 2623 }
2632 2624
2633 public void SendCoarseLocations() 2625 public void SendCoarseLocations(List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
2634 { 2626 {
2635 SendCourseLocationsMethod d = m_sendCourseLocationsMethod; 2627 SendCourseLocationsMethod d = m_sendCourseLocationsMethod;
2636 if (d != null) 2628 if (d != null)
2637 { 2629 {
2638 d.Invoke(m_scene.RegionInfo.originRegionID, this); 2630 d.Invoke(m_scene.RegionInfo.originRegionID, this, coarseLocations, avatarUUIDs);
2639 } 2631 }
2640 } 2632 }
2641 2633
@@ -2645,50 +2637,13 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2645 m_sendCourseLocationsMethod = d; 2637 m_sendCourseLocationsMethod = d;
2646 } 2638 }
2647 2639
2648 public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p) 2640 public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
2649 { 2641 {
2650 m_perfMonMS = Util.EnvironmentTickCount(); 2642 m_perfMonMS = Util.EnvironmentTickCount();
2651 2643 m_controllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
2652 List<Vector3> CoarseLocations = new List<Vector3>();
2653 List<UUID> AvatarUUIDs = new List<UUID>();
2654 m_scene.ForEachScenePresence(delegate(ScenePresence sp)
2655 {
2656 if (sp.IsChildAgent)
2657 return;
2658
2659 if (sp.ParentID != 0)
2660 {
2661 // sitting avatar
2662 SceneObjectPart sop = m_scene.GetSceneObjectPart(sp.ParentID);
2663 if (sop != null)
2664 {
2665 CoarseLocations.Add(sop.AbsolutePosition + sp.m_pos);
2666 AvatarUUIDs.Add(sp.UUID);
2667 }
2668 else
2669 {
2670 // we can't find the parent.. ! arg!
2671 CoarseLocations.Add(sp.m_pos);
2672 AvatarUUIDs.Add(sp.UUID);
2673 }
2674 }
2675 else
2676 {
2677 CoarseLocations.Add(sp.m_pos);
2678 AvatarUUIDs.Add(sp.UUID);
2679 }
2680 });
2681
2682 m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
2683
2684 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); 2644 m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
2685 } 2645 }
2686 2646
2687 public void CoarseLocationChange()
2688 {
2689 m_newCoarseLocations = true;
2690 }
2691
2692 /// <summary> 2647 /// <summary>
2693 /// Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar) 2648 /// Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar)
2694 /// </summary> 2649 /// </summary>
@@ -2923,7 +2878,6 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2923 { 2878 {
2924 posLastSignificantMove = AbsolutePosition; 2879 posLastSignificantMove = AbsolutePosition;
2925 m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient); 2880 m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient);
2926 m_scene.NotifyMyCoarseLocationChange();
2927 } 2881 }
2928 2882
2929 // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m 2883 // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index b42d3bf..d854176 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -614,7 +614,9 @@ namespace OpenSim.Region.RegionCombinerModule
614 presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); 614 presence.SetSendCourseLocationMethod(SendCourseLocationUpdates);
615 } 615 }
616 616
617 private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence) 617 // This delegate was refactored for non-combined regions.
618 // This combined region version will not use the pre-compiled lists of locations and ids
619 private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
618 { 620 {
619 RegionConnections connectiondata = null; 621 RegionConnections connectiondata = null;
620 lock (m_regions) 622 lock (m_regions)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 463b052..30e127d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -125,6 +125,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
125 125
126 private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue(); 126 private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue();
127 IWorkItemResult m_CurrentCompile = null; 127 IWorkItemResult m_CurrentCompile = null;
128 private Dictionary<UUID, int> m_CompileDict = new Dictionary<UUID, int>();
128 129
129 private void lockScriptsForRead(bool locked) 130 private void lockScriptsForRead(bool locked)
130 { 131 {
@@ -560,6 +561,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
560 else 561 else
561 { 562 {
562 m_CompileQueue.Enqueue(parms); 563 m_CompileQueue.Enqueue(parms);
564 lock (m_CompileDict)
565 {
566 m_CompileDict[itemID] = 0;
567 }
563 568
564 if (m_CurrentCompile == null) 569 if (m_CurrentCompile == null)
565 { 570 {
@@ -622,6 +627,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
622 bool postOnRez = (bool)p[4]; 627 bool postOnRez = (bool)p[4];
623 StateSource stateSource = (StateSource)p[5]; 628 StateSource stateSource = (StateSource)p[5];
624 629
630 lock(m_CompileDict)
631 {
632 if (!m_CompileDict.ContainsKey(itemID))
633 return false;
634 m_CompileDict.Remove(itemID);
635 }
636
625 // Get the asset ID of the script, so we can check if we 637 // Get the asset ID of the script, so we can check if we
626 // already have it. 638 // already have it.
627 639
@@ -868,6 +880,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
868 880
869 public void OnRemoveScript(uint localID, UUID itemID) 881 public void OnRemoveScript(uint localID, UUID itemID)
870 { 882 {
883 // If it's not yet been compiled, make sure we don't try
884 lock (m_CompileDict)
885 {
886 if (m_CompileDict.ContainsKey(itemID))
887 m_CompileDict.Remove(itemID);
888 }
889
871 lockScriptsForRead(true); 890 lockScriptsForRead(true);
872 // Do we even have it? 891 // Do we even have it?
873 if (!m_Scripts.ContainsKey(itemID)) 892 if (!m_Scripts.ContainsKey(itemID))
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 974caf0..af831fd 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -460,7 +460,7 @@ namespace OpenSim.Services.InventoryService
460 newItem.ID = item.inventoryID; 460 newItem.ID = item.inventoryID;
461 newItem.InvType = item.invType; 461 newItem.InvType = item.invType;
462 newItem.Folder = item.parentFolderID; 462 newItem.Folder = item.parentFolderID;
463 newItem.CreatorId = item.creatorID.ToString(); 463 newItem.CreatorId = item.creatorID;
464 newItem.Description = item.inventoryDescription; 464 newItem.Description = item.inventoryDescription;
465 newItem.NextPermissions = (uint)item.inventoryNextPermissions; 465 newItem.NextPermissions = (uint)item.inventoryNextPermissions;
466 newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions; 466 newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions;
@@ -491,7 +491,7 @@ namespace OpenSim.Services.InventoryService
491 newItem.inventoryID = item.ID; 491 newItem.inventoryID = item.ID;
492 newItem.invType = item.InvType; 492 newItem.invType = item.InvType;
493 newItem.parentFolderID = item.Folder; 493 newItem.parentFolderID = item.Folder;
494 newItem.creatorID = item.CreatorIdAsUuid; 494 newItem.creatorID = item.CreatorId;
495 newItem.inventoryDescription = item.Description; 495 newItem.inventoryDescription = item.Description;
496 newItem.inventoryNextPermissions = (int)item.NextPermissions; 496 newItem.inventoryNextPermissions = (int)item.NextPermissions;
497 newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions; 497 newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions;