diff options
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 100 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 | ||||
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 47 | ||||
-rw-r--r-- | bin/assets/TexturesAssetSet/TexturesAssetSet.xml | 6 | ||||
-rw-r--r-- | bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml | 28 | ||||
-rw-r--r-- | prebuild.xml | 1 |
6 files changed, 163 insertions, 24 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 17e4eb4..a4bb765 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -35,6 +35,104 @@ using log4net; | |||
35 | 35 | ||
36 | namespace OpenSim.Framework | 36 | namespace OpenSim.Framework |
37 | { | 37 | { |
38 | // A special dictionary for avatar appearance | ||
39 | public struct LayerItem | ||
40 | { | ||
41 | public UUID ItemID; | ||
42 | public UUID AssetID; | ||
43 | |||
44 | public LayerItem(UUID itemID, UUID assetID) | ||
45 | { | ||
46 | ItemID = itemID; | ||
47 | AssetID = assetID; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | public class Layer | ||
52 | { | ||
53 | protected int m_layerType; | ||
54 | protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); | ||
55 | protected List<UUID> m_ids = new List<UUID>(); | ||
56 | |||
57 | public Layer(int type) | ||
58 | { | ||
59 | m_layerType = type; | ||
60 | } | ||
61 | |||
62 | public int LayerType | ||
63 | { | ||
64 | get { return m_layerType; } | ||
65 | } | ||
66 | |||
67 | public int Count | ||
68 | { | ||
69 | get { return m_ids.Count; } | ||
70 | } | ||
71 | |||
72 | public void Add(UUID itemID, UUID assetID) | ||
73 | { | ||
74 | if (m_items.ContainsKey(itemID)) | ||
75 | return; | ||
76 | if (m_ids.Count >= 5) | ||
77 | return; | ||
78 | |||
79 | m_ids.Add(itemID); | ||
80 | m_items[itemID] = assetID; | ||
81 | } | ||
82 | |||
83 | public void Wear(UUID itemID, UUID assetID) | ||
84 | { | ||
85 | Clear(); | ||
86 | Add(itemID, assetID); | ||
87 | } | ||
88 | |||
89 | public void Clear() | ||
90 | { | ||
91 | m_ids.Clear(); | ||
92 | m_items.Clear(); | ||
93 | } | ||
94 | |||
95 | public void RemoveItem(UUID itemID) | ||
96 | { | ||
97 | if (m_items.ContainsKey(itemID)) | ||
98 | { | ||
99 | m_ids.Remove(itemID); | ||
100 | m_items.Remove(itemID); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | public void RemoveAsset(UUID assetID) | ||
105 | { | ||
106 | UUID itemID = UUID.Zero; | ||
107 | |||
108 | foreach (KeyValuePair<UUID, UUID> kvp in m_items) | ||
109 | { | ||
110 | if (kvp.Value == assetID) | ||
111 | { | ||
112 | itemID = kvp.Key; | ||
113 | break; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | if (itemID != UUID.Zero) | ||
118 | { | ||
119 | m_ids.Remove(itemID); | ||
120 | m_items.Remove(itemID); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | public LayerItem this [int idx] | ||
125 | { | ||
126 | get | ||
127 | { | ||
128 | if (idx >= m_ids.Count || idx < 0) | ||
129 | return new LayerItem(UUID.Zero, UUID.Zero); | ||
130 | |||
131 | return new LayerItem(m_ids[idx], m_items[m_ids[idx]]); | ||
132 | } | ||
133 | } | ||
134 | } | ||
135 | |||
38 | /// <summary> | 136 | /// <summary> |
39 | /// Contains the Avatar's Appearance and methods to manipulate the appearance. | 137 | /// Contains the Avatar's Appearance and methods to manipulate the appearance. |
40 | /// </summary> | 138 | /// </summary> |
@@ -1460,4 +1558,4 @@ namespace OpenSim.Framework | |||
1460 | } | 1558 | } |
1461 | #endregion | 1559 | #endregion |
1462 | } | 1560 | } |
1463 | } \ No newline at end of file | 1561 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d4d6979..9402f8b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2923,9 +2923,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2923 | 2923 | ||
2924 | public void CopyTo(AgentData cAgent) | 2924 | public void CopyTo(AgentData cAgent) |
2925 | { | 2925 | { |
2926 | // DEBUG ON | 2926 | cAgent.CallbackURI = m_callbackURI; |
2927 | m_log.ErrorFormat("[SCENEPRESENCE] CALLING COPYTO"); | 2927 | |
2928 | // DEBUG OFF | ||
2929 | cAgent.AgentID = UUID; | 2928 | cAgent.AgentID = UUID; |
2930 | cAgent.RegionID = Scene.RegionInfo.RegionID; | 2929 | cAgent.RegionID = Scene.RegionInfo.RegionID; |
2931 | 2930 | ||
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index b86fb6f..a67404f 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Linq; | ||
30 | using System.Net; | 31 | using System.Net; |
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using System.Xml; | 33 | using System.Xml; |
@@ -154,6 +155,11 @@ namespace OpenSim.Services.GridService | |||
154 | // From the command line link-region | 155 | // From the command line link-region |
155 | public GridRegion TryLinkRegionToCoords(UUID scopeID, string mapName, int xloc, int yloc, out string reason) | 156 | public GridRegion TryLinkRegionToCoords(UUID scopeID, string mapName, int xloc, int yloc, out string reason) |
156 | { | 157 | { |
158 | return TryLinkRegionToCoords(scopeID, mapName, xloc, yloc, UUID.Zero, out reason); | ||
159 | } | ||
160 | |||
161 | public GridRegion TryLinkRegionToCoords(UUID scopeID, string mapName, int xloc, int yloc, UUID ownerID, out string reason) | ||
162 | { | ||
157 | reason = string.Empty; | 163 | reason = string.Empty; |
158 | string host = "127.0.0.1"; | 164 | string host = "127.0.0.1"; |
159 | string portstr; | 165 | string portstr; |
@@ -189,7 +195,7 @@ namespace OpenSim.Services.GridService | |||
189 | //} | 195 | //} |
190 | 196 | ||
191 | GridRegion regInfo; | 197 | GridRegion regInfo; |
192 | bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, out regInfo, out reason); | 198 | bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, ownerID, out regInfo, out reason); |
193 | if (success) | 199 | if (success) |
194 | { | 200 | { |
195 | regInfo.RegionName = mapName; | 201 | regInfo.RegionName = mapName; |
@@ -202,7 +208,8 @@ namespace OpenSim.Services.GridService | |||
202 | 208 | ||
203 | // From the command line and the 2 above | 209 | // From the command line and the 2 above |
204 | public bool TryCreateLink(UUID scopeID, int xloc, int yloc, | 210 | public bool TryCreateLink(UUID scopeID, int xloc, int yloc, |
205 | string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason) | 211 | string externalRegionName, uint externalPort, string externalHostName, UUID ownerID, |
212 | out GridRegion regInfo, out string reason) | ||
206 | { | 213 | { |
207 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); | 214 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); |
208 | 215 | ||
@@ -214,12 +221,22 @@ namespace OpenSim.Services.GridService | |||
214 | regInfo.RegionLocX = xloc; | 221 | regInfo.RegionLocX = xloc; |
215 | regInfo.RegionLocY = yloc; | 222 | regInfo.RegionLocY = yloc; |
216 | regInfo.ScopeID = scopeID; | 223 | regInfo.ScopeID = scopeID; |
224 | regInfo.EstateOwner = ownerID; | ||
217 | 225 | ||
218 | // Big HACK for Simian Grid !!! | 226 | // Big HACK for Simian Grid !!! |
219 | // We need to clean up all URLs used in OpenSim !!! | 227 | // We need to clean up all URLs used in OpenSim !!! |
220 | if (externalHostName.Contains("/")) | 228 | if (externalHostName.Contains("/")) |
221 | regInfo.ServerURI = externalHostName; | 229 | regInfo.ServerURI = externalHostName; |
222 | 230 | ||
231 | // Check for free coordinates | ||
232 | GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); | ||
233 | if (region != null) | ||
234 | { | ||
235 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", regInfo.RegionLocX, regInfo.RegionLocY, region.RegionName, region.RegionID); | ||
236 | reason = "Coordinates are already in use"; | ||
237 | return false; | ||
238 | } | ||
239 | |||
223 | try | 240 | try |
224 | { | 241 | { |
225 | regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0); | 242 | regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0); |
@@ -241,11 +258,11 @@ namespace OpenSim.Services.GridService | |||
241 | 258 | ||
242 | if (regionID != UUID.Zero) | 259 | if (regionID != UUID.Zero) |
243 | { | 260 | { |
244 | GridRegion r = m_GridService.GetRegionByUUID(scopeID, regionID); | 261 | region = m_GridService.GetRegionByUUID(scopeID, regionID); |
245 | if (r != null) | 262 | if (region != null) |
246 | { | 263 | { |
247 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize); | 264 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); |
248 | regInfo = r; | 265 | regInfo = region; |
249 | return true; | 266 | return true; |
250 | } | 267 | } |
251 | 268 | ||
@@ -355,17 +372,8 @@ namespace OpenSim.Services.GridService | |||
355 | { | 372 | { |
356 | // Check for regions which are not linked regions | 373 | // Check for regions which are not linked regions |
357 | List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); | 374 | List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); |
358 | // would like to use .Except, but doesn't seem to exist | 375 | IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); |
359 | //IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); | 376 | if (availableRegions.Count() == 0) |
360 | List<GridRegion> availableRegions = regions.FindAll(delegate(GridRegion region) | ||
361 | { | ||
362 | // Ewww! n^2 | ||
363 | if (hyperlinks.Find(delegate(GridRegion r) { return r.RegionID == region.RegionID; }) == null) // not hyperlink. good. | ||
364 | return true; | ||
365 | |||
366 | return false; | ||
367 | }); | ||
368 | if (availableRegions.Count == 0) | ||
369 | return false; | 377 | return false; |
370 | } | 378 | } |
371 | 379 | ||
@@ -529,7 +537,7 @@ namespace OpenSim.Services.GridService | |||
529 | xloc = xloc * (int)Constants.RegionSize; | 537 | xloc = xloc * (int)Constants.RegionSize; |
530 | yloc = yloc * (int)Constants.RegionSize; | 538 | yloc = yloc * (int)Constants.RegionSize; |
531 | string reason = string.Empty; | 539 | string reason = string.Empty; |
532 | if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, out regInfo, out reason)) | 540 | if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) |
533 | { | 541 | { |
534 | if (cmdparams.Length >= 5) | 542 | if (cmdparams.Length >= 5) |
535 | { | 543 | { |
@@ -631,8 +639,7 @@ namespace OpenSim.Services.GridService | |||
631 | xloc = xloc * (int)Constants.RegionSize; | 639 | xloc = xloc * (int)Constants.RegionSize; |
632 | yloc = yloc * (int)Constants.RegionSize; | 640 | yloc = yloc * (int)Constants.RegionSize; |
633 | string reason = string.Empty; | 641 | string reason = string.Empty; |
634 | if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, | 642 | if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) |
635 | externalHostName, out regInfo, out reason)) | ||
636 | { | 643 | { |
637 | regInfo.RegionName = config.GetString("localName", ""); | 644 | regInfo.RegionName = config.GetString("localName", ""); |
638 | } | 645 | } |
diff --git a/bin/assets/TexturesAssetSet/TexturesAssetSet.xml b/bin/assets/TexturesAssetSet/TexturesAssetSet.xml index c5cafa7..7c74a48 100644 --- a/bin/assets/TexturesAssetSet/TexturesAssetSet.xml +++ b/bin/assets/TexturesAssetSet/TexturesAssetSet.xml | |||
@@ -1,4 +1,10 @@ | |||
1 | <Nini> | 1 | <Nini> |
2 | <Section Name="Default Alpha"> | ||
3 | <Key Name="assetID" Value="1578a2b1-5179-4b53-b618-fe00ca5a5594" /> | ||
4 | <Key Name="name" Value="alpha" /> | ||
5 | <Key Name="assetType" Value="0" /> | ||
6 | <Key Name="fileName" Value="defaultalpha.jp2" /> | ||
7 | </Section> | ||
2 | <Section Name="texture1"> | 8 | <Section Name="texture1"> |
3 | <Key Name="assetID" Value="00000000-0000-2222-3333-000000000099" /> | 9 | <Key Name="assetID" Value="00000000-0000-2222-3333-000000000099" /> |
4 | <Key Name="name" Value="femface" /> | 10 | <Key Name="name" Value="femface" /> |
diff --git a/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml b/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml index aa8d9d9..5cb71c0 100644 --- a/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml +++ b/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml | |||
@@ -16,6 +16,34 @@ | |||
16 | </Section> | 16 | </Section> |
17 | --> | 17 | --> |
18 | <!-- | 18 | <!-- |
19 | <Section Name="Tattoo"> | ||
20 | <Key Name="inventoryID" Value="c47e22bd-3021-4ba4-82aa-2b5cb34d35e1" /> | ||
21 | <Key Name="assetID" Value="00000000-0000-2222-3333-100000001007" /> | ||
22 | <Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/> | ||
23 | <Key Name="description" Value="Tattoo" /> | ||
24 | <Key Name="name" Value="Tattoo" /> | ||
25 | <Key Name="assetType" Value="13" /> | ||
26 | <Key Name="inventoryType" Value="18" /> | ||
27 | <Key Name="currentPermissions" Value="2147483647" /> | ||
28 | <Key Name="nextPermissions" Value="2147483647" /> | ||
29 | <Key Name="everyonePermissions" Value="2147483647" /> | ||
30 | <Key Name="basePermissions" Value="2147483647" /> | ||
31 | </Section> | ||
32 | |||
33 | <Section Name="Alpha"> | ||
34 | <Key Name="inventoryID" Value="bfb9923c-4838-4d2d-bf07-608c5b1165c8" /> | ||
35 | <Key Name="assetID" Value="1578a2b1-5179-4b53-b618-fe00ca5a5594" /> | ||
36 | <Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/> | ||
37 | <Key Name="description" Value="Hair" /> | ||
38 | <Key Name="name" Value="Hair" /> | ||
39 | <Key Name="assetType" Value="13" /> | ||
40 | <Key Name="inventoryType" Value="18" /> | ||
41 | <Key Name="currentPermissions" Value="2147483647" /> | ||
42 | <Key Name="nextPermissions" Value="2147483647" /> | ||
43 | <Key Name="everyonePermissions" Value="2147483647" /> | ||
44 | <Key Name="basePermissions" Value="2147483647" /> | ||
45 | </Section> | ||
46 | |||
19 | <Section Name="Hair"> | 47 | <Section Name="Hair"> |
20 | <Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" /> | 48 | <Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" /> |
21 | <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" /> | 49 | <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" /> |
diff --git a/prebuild.xml b/prebuild.xml index dd4a576..c6eb65a 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1084,6 +1084,7 @@ | |||
1084 | 1084 | ||
1085 | <ReferencePath>../../../bin/</ReferencePath> | 1085 | <ReferencePath>../../../bin/</ReferencePath> |
1086 | <Reference name="System"/> | 1086 | <Reference name="System"/> |
1087 | <Reference name="System.Core"/> | ||
1087 | <Reference name="System.Xml"/> | 1088 | <Reference name="System.Xml"/> |
1088 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> | 1089 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1089 | <Reference name="OpenMetaverse" path="../../../bin/"/> | 1090 | <Reference name="OpenMetaverse" path="../../../bin/"/> |