diff options
16 files changed, 128 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 | ||
76 | ALTER TABLE assets ADD COLUMN CreatorID varchar(36) NOT NULL DEFAULT ''; | 76 | ALTER 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 | |||
91 | alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; | 91 | alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; |
92 | 92 | ||
93 | COMMIT; | 93 | COMMIT; |
94 | |||
95 | :VERSION 5 # ------------ | ||
96 | |||
97 | BEGIN; | ||
98 | |||
99 | alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000'; | ||
100 | |||
101 | COMMIT; | ||
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 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE 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 | |||
11 | CREATE 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 | |||
33 | create index inventoryfolders_agentid on inventoryfolders(agentID); | ||
34 | create index inventoryfolders_parentid on inventoryfolders(parentFolderID); | ||
35 | create index inventoryitems_parentfolderid on inventoryitems(parentFolderID); | ||
36 | create index inventoryitems_avatarid on inventoryitems(avatarID); | ||
37 | |||
38 | COMMIT; | ||
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 @@ | |||
1 | ATTACH 'inventoryStore.db' AS old; | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | INSERT 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; | ||
6 | INSERT 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 | |||
8 | COMMIT; | ||
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 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
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 | ||
61 | INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) | 61 | INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) |
@@ -64,3 +64,4 @@ DROP TABLE assets_backup; | |||
64 | 64 | ||
65 | COMMIT; | 65 | COMMIT; |
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 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | CREATE 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 | |||
13 | CREATE 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 | |||
35 | create index inventoryfolders_agentid on inventoryfolders(agentID); | ||
36 | create index inventoryfolders_parentid on inventoryfolders(parentFolderID); | ||
37 | create index inventoryitems_parentfolderid on inventoryitems(parentFolderID); | ||
38 | create index inventoryitems_avatarid on inventoryitems(avatarID); | ||
39 | |||
40 | COMMIT; | ||
41 | |||
42 | :VERSION 2 | ||
43 | |||
44 | ATTACH 'inventoryStore.db' AS old; | ||
45 | |||
46 | BEGIN TRANSACTION; | ||
47 | |||
48 | INSERT 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; | ||
49 | INSERT 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 | |||
51 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 66631b5..fc5bb28 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 1e3e0c9..0707119 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -865,9 +865,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
865 | 865 | ||
866 | CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); | 866 | CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); |
867 | 867 | ||
868 | // m_scene.SendKillObject(m_localId); | ||
869 | |||
870 | agent.Scene.NotifyMyCoarseLocationChange(); | ||
871 | // the user may change their profile information in other region, | 868 | // the user may change their profile information in other region, |
872 | // so the userinfo in UserProfileCache is not reliable any more, delete it | 869 | // so the userinfo in UserProfileCache is not reliable any more, delete it |
873 | // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! | 870 | // 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 4e90d09..9a3b0c9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -348,6 +348,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
348 | private int m_update_backup = 200; | 348 | private int m_update_backup = 200; |
349 | private int m_update_terrain = 50; | 349 | private int m_update_terrain = 50; |
350 | private int m_update_land = 1; | 350 | private int m_update_land = 1; |
351 | private int m_update_coarse_locations = 50; | ||
351 | 352 | ||
352 | private int frameMS; | 353 | private int frameMS; |
353 | private int physicsMS2; | 354 | private int physicsMS2; |
@@ -1417,6 +1418,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1417 | if (m_frame % m_update_presences == 0) | 1418 | if (m_frame % m_update_presences == 0) |
1418 | m_sceneGraph.UpdatePresences(); | 1419 | m_sceneGraph.UpdatePresences(); |
1419 | 1420 | ||
1421 | if (m_frame % m_update_coarse_locations == 0) | ||
1422 | { | ||
1423 | List<Vector3> coarseLocations; | ||
1424 | List<UUID> avatarUUIDs; | ||
1425 | SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60); | ||
1426 | // Send coarse locations to clients | ||
1427 | ForEachScenePresence(delegate(ScenePresence presence) | ||
1428 | { | ||
1429 | presence.SendCoarseLocations(coarseLocations, avatarUUIDs); | ||
1430 | }); | ||
1431 | } | ||
1432 | |||
1420 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); | 1433 | int tmpPhysicsMS2 = Util.EnvironmentTickCount(); |
1421 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 1434 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
1422 | m_sceneGraph.UpdatePreparePhysics(); | 1435 | m_sceneGraph.UpdatePreparePhysics(); |
@@ -3301,9 +3314,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3301 | catch (NullReferenceException) { } | 3314 | catch (NullReferenceException) { } |
3302 | }); | 3315 | }); |
3303 | 3316 | ||
3304 | ForEachScenePresence( | ||
3305 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); | ||
3306 | |||
3307 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 3317 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
3308 | if (agentTransactions != null) | 3318 | if (agentTransactions != null) |
3309 | { | 3319 | { |
@@ -3355,14 +3365,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3355 | } | 3365 | } |
3356 | } | 3366 | } |
3357 | 3367 | ||
3358 | /// <summary> | ||
3359 | /// Inform all other ScenePresences on this Scene that someone else has changed position on the minimap. | ||
3360 | /// </summary> | ||
3361 | public void NotifyMyCoarseLocationChange() | ||
3362 | { | ||
3363 | ForEachScenePresence(delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); | ||
3364 | } | ||
3365 | |||
3366 | #endregion | 3368 | #endregion |
3367 | 3369 | ||
3368 | #region Entities | 3370 | #region Entities |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5902080..673674d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -206,6 +206,43 @@ namespace OpenSim.Region.Framework.Scenes | |||
206 | }); | 206 | }); |
207 | } | 207 | } |
208 | 208 | ||
209 | public void GetCoarseLocations(out List<Vector3> coarseLocations, out List<UUID> avatarUUIDs, uint maxLocations) | ||
210 | { | ||
211 | coarseLocations = new List<Vector3>(); | ||
212 | avatarUUIDs = new List<UUID>(); | ||
213 | |||
214 | List<ScenePresence> presences = GetScenePresences(); | ||
215 | for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) | ||
216 | { | ||
217 | ScenePresence sp = presences[i]; | ||
218 | // If this presence is a child agent, we don't want its coarse locations | ||
219 | if (sp.IsChildAgent) | ||
220 | return; | ||
221 | |||
222 | if (sp.ParentID != 0) | ||
223 | { | ||
224 | // sitting avatar | ||
225 | SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID); | ||
226 | if (sop != null) | ||
227 | { | ||
228 | coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition); | ||
229 | avatarUUIDs.Add(sp.UUID); | ||
230 | } | ||
231 | else | ||
232 | { | ||
233 | // we can't find the parent.. ! arg! | ||
234 | coarseLocations.Add(sp.AbsolutePosition); | ||
235 | avatarUUIDs.Add(sp.UUID); | ||
236 | } | ||
237 | } | ||
238 | else | ||
239 | { | ||
240 | coarseLocations.Add(sp.AbsolutePosition); | ||
241 | avatarUUIDs.Add(sp.UUID); | ||
242 | } | ||
243 | } | ||
244 | } | ||
245 | |||
209 | #endregion | 246 | #endregion |
210 | 247 | ||
211 | #region Entity Methods | 248 | #region Entity Methods |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 45375b0..15b9446 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
65 | public ScriptControlled eventControls; | 65 | public ScriptControlled eventControls; |
66 | } | 66 | } |
67 | 67 | ||
68 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); | 68 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs); |
69 | 69 | ||
70 | public class ScenePresence : EntityBase, ISceneEntity | 70 | public class ScenePresence : EntityBase, ISceneEntity |
71 | { | 71 | { |
@@ -173,8 +173,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
173 | 173 | ||
174 | public string JID = String.Empty; | 174 | public string JID = String.Empty; |
175 | 175 | ||
176 | // Agent moves with a PID controller causing a force to be exerted. | ||
177 | private bool m_newCoarseLocations = true; | ||
178 | private float m_health = 100f; | 176 | private float m_health = 100f; |
179 | 177 | ||
180 | // Default AV Height | 178 | // Default AV Height |
@@ -2296,12 +2294,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2296 | 2294 | ||
2297 | SendPrimUpdates(); | 2295 | SendPrimUpdates(); |
2298 | 2296 | ||
2299 | if (m_newCoarseLocations) | ||
2300 | { | ||
2301 | SendCoarseLocations(); | ||
2302 | m_newCoarseLocations = false; | ||
2303 | } | ||
2304 | |||
2305 | if (m_isChildAgent == false) | 2297 | if (m_isChildAgent == false) |
2306 | { | 2298 | { |
2307 | // PhysicsActor actor = m_physicsActor; | 2299 | // PhysicsActor actor = m_physicsActor; |
@@ -2375,12 +2367,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2375 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2367 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2376 | } | 2368 | } |
2377 | 2369 | ||
2378 | public void SendCoarseLocations() | 2370 | public void SendCoarseLocations(List<Vector3> coarseLocations, List<UUID> avatarUUIDs) |
2379 | { | 2371 | { |
2380 | SendCourseLocationsMethod d = m_sendCourseLocationsMethod; | 2372 | SendCourseLocationsMethod d = m_sendCourseLocationsMethod; |
2381 | if (d != null) | 2373 | if (d != null) |
2382 | { | 2374 | { |
2383 | d.Invoke(m_scene.RegionInfo.originRegionID, this); | 2375 | d.Invoke(m_scene.RegionInfo.originRegionID, this, coarseLocations, avatarUUIDs); |
2384 | } | 2376 | } |
2385 | } | 2377 | } |
2386 | 2378 | ||
@@ -2390,50 +2382,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2390 | m_sendCourseLocationsMethod = d; | 2382 | m_sendCourseLocationsMethod = d; |
2391 | } | 2383 | } |
2392 | 2384 | ||
2393 | public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p) | 2385 | public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List<Vector3> coarseLocations, List<UUID> avatarUUIDs) |
2394 | { | 2386 | { |
2395 | m_perfMonMS = Util.EnvironmentTickCount(); | 2387 | m_perfMonMS = Util.EnvironmentTickCount(); |
2396 | 2388 | m_controllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations); | |
2397 | List<Vector3> CoarseLocations = new List<Vector3>(); | ||
2398 | List<UUID> AvatarUUIDs = new List<UUID>(); | ||
2399 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) | ||
2400 | { | ||
2401 | if (sp.IsChildAgent) | ||
2402 | return; | ||
2403 | |||
2404 | if (sp.ParentID != 0) | ||
2405 | { | ||
2406 | // sitting avatar | ||
2407 | SceneObjectPart sop = m_scene.GetSceneObjectPart(sp.ParentID); | ||
2408 | if (sop != null) | ||
2409 | { | ||
2410 | CoarseLocations.Add(sop.AbsolutePosition + sp.m_pos); | ||
2411 | AvatarUUIDs.Add(sp.UUID); | ||
2412 | } | ||
2413 | else | ||
2414 | { | ||
2415 | // we can't find the parent.. ! arg! | ||
2416 | CoarseLocations.Add(sp.m_pos); | ||
2417 | AvatarUUIDs.Add(sp.UUID); | ||
2418 | } | ||
2419 | } | ||
2420 | else | ||
2421 | { | ||
2422 | CoarseLocations.Add(sp.m_pos); | ||
2423 | AvatarUUIDs.Add(sp.UUID); | ||
2424 | } | ||
2425 | }); | ||
2426 | |||
2427 | m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); | ||
2428 | |||
2429 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2389 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2430 | } | 2390 | } |
2431 | 2391 | ||
2432 | public void CoarseLocationChange() | ||
2433 | { | ||
2434 | m_newCoarseLocations = true; | ||
2435 | } | ||
2436 | |||
2437 | /// <summary> | 2392 | /// <summary> |
2438 | /// Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar) | 2393 | /// Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar) |
2439 | /// </summary> | 2394 | /// </summary> |
@@ -2668,7 +2623,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2668 | { | 2623 | { |
2669 | posLastSignificantMove = AbsolutePosition; | 2624 | posLastSignificantMove = AbsolutePosition; |
2670 | m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient); | 2625 | m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient); |
2671 | m_scene.NotifyMyCoarseLocationChange(); | ||
2672 | } | 2626 | } |
2673 | 2627 | ||
2674 | // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m | 2628 | // 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 9cb349a..ff0e743 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -696,7 +696,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
696 | presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); | 696 | presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); |
697 | } | 697 | } |
698 | 698 | ||
699 | private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence) | 699 | // This delegate was refactored for non-combined regions. |
700 | // This combined region version will not use the pre-compiled lists of locations and ids | ||
701 | private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs) | ||
700 | { | 702 | { |
701 | RegionConnections connectiondata = null; | 703 | RegionConnections connectiondata = null; |
702 | lock (m_regions) | 704 | lock (m_regions) |
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; |