diff options
author | lbsa71 | 2007-09-27 14:57:43 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-27 14:57:43 +0000 |
commit | 863195612bdef56165f2b4354bab280c371618b9 (patch) | |
tree | 63cec15a6c0338a8777640ed13fd7c3ce05eeba7 /OpenSim/Region | |
parent | revert change to libsecondlife.dll.config which breaks Linux (diff) | |
download | opensim-SC-863195612bdef56165f2b4354bab280c371618b9.zip opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.gz opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.bz2 opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.xz |
Reverting back to 2017 since 2018 were causing Linux breakage; reopening Tleiades patch 444 and 445.
Diffstat (limited to 'OpenSim/Region')
11 files changed, 76 insertions, 92 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index b35a9d3..e526f73 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -30,6 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Text; | 30 | using System.Text; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | using OpenSim.Framework.Inventory; | ||
33 | using OpenSim.Framework.Types; | 34 | using OpenSim.Framework.Types; |
34 | using OpenSim.Framework.Utilities; | 35 | using OpenSim.Framework.Utilities; |
35 | using OpenSim.Framework.Interfaces; | 36 | using OpenSim.Framework.Interfaces; |
@@ -352,7 +353,7 @@ namespace OpenSim.Region.ClientStack | |||
352 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionID).ToStringHyphenated()); | 353 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionID).ToStringHyphenated()); |
353 | if (OnAssetUploadRequest != null) | 354 | if (OnAssetUploadRequest != null) |
354 | { | 355 | { |
355 | OnAssetUploadRequest(this, LLUUID.Combine(request.AssetBlock.TransactionID, this.SecureSessionID), request.AssetBlock.TransactionID, request.AssetBlock.Type, request.AssetBlock.AssetData, request.AssetBlock.StoreLocal); | 356 | OnAssetUploadRequest(this, request.AssetBlock.TransactionID.Combine(this.SecureSessionID), request.AssetBlock.TransactionID, request.AssetBlock.Type, request.AssetBlock.AssetData, request.AssetBlock.StoreLocal); |
356 | } | 357 | } |
357 | break; | 358 | break; |
358 | case PacketType.RequestXfer: | 359 | case PacketType.RequestXfer: |
@@ -417,7 +418,7 @@ namespace OpenSim.Region.ClientStack | |||
417 | { | 418 | { |
418 | if (update.InventoryData[i].TransactionID != LLUUID.Zero) | 419 | if (update.InventoryData[i].TransactionID != LLUUID.Zero) |
419 | { | 420 | { |
420 | OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID, LLUUID.Combine(update.InventoryData[i].TransactionID, this.SecureSessionID), update.InventoryData[i].ItemID); | 421 | OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID, update.InventoryData[i].TransactionID.Combine(this.SecureSessionID), update.InventoryData[i].ItemID); |
421 | } | 422 | } |
422 | } | 423 | } |
423 | } | 424 | } |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index ecf78cb..2489739 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -37,6 +37,7 @@ using OpenSim.Framework; | |||
37 | using OpenSim.Framework.Communications.Cache; | 37 | using OpenSim.Framework.Communications.Cache; |
38 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
39 | using OpenSim.Framework.Interfaces; | 39 | using OpenSim.Framework.Interfaces; |
40 | using OpenSim.Framework.Inventory; | ||
40 | using OpenSim.Framework.Types; | 41 | using OpenSim.Framework.Types; |
41 | using OpenSim.Framework.Utilities; | 42 | using OpenSim.Framework.Utilities; |
42 | using Timer = System.Timers.Timer; | 43 | using Timer = System.Timers.Timer; |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 7e08297..a00b35f 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Communications.Local | |||
107 | } | 107 | } |
108 | else | 108 | else |
109 | { | 109 | { |
110 | this.m_inventoryService.CreateNewUserInventory(LLUUID.Zero, userProf.UUID); | 110 | this.m_inventoryService.CreateNewUserInventory(userProf.UUID); |
111 | Console.WriteLine("Created new inventory set for " + firstName + " " + lastName); | 111 | Console.WriteLine("Created new inventory set for " + firstName + " " + lastName); |
112 | return userProf.UUID; | 112 | return userProf.UUID; |
113 | } | 113 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 5bd3277..53f6ffa 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs | |||
@@ -3,7 +3,6 @@ using libsecondlife; | |||
3 | using OpenSim.Framework.Communications; | 3 | using OpenSim.Framework.Communications; |
4 | using OpenSim.Framework.Data; | 4 | using OpenSim.Framework.Data; |
5 | using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder; | 5 | using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder; |
6 | using InventoryCategory = OpenSim.Framework.Data.InventoryCategory; | ||
7 | 6 | ||
8 | namespace OpenSim.Region.Communications.Local | 7 | namespace OpenSim.Region.Communications.Local |
9 | { | 8 | { |
@@ -50,7 +49,7 @@ namespace OpenSim.Region.Communications.Local | |||
50 | } | 49 | } |
51 | } | 50 | } |
52 | 51 | ||
53 | public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) | 52 | public override void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) |
54 | { | 53 | { |
55 | this.AddFolder(folder); | 54 | this.AddFolder(folder); |
56 | } | 55 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 95fdf5a..ab8e397 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -7,6 +7,7 @@ using OpenSim.Framework.Data; | |||
7 | using OpenSim.Framework.Types; | 7 | using OpenSim.Framework.Types; |
8 | using OpenSim.Framework.UserManagement; | 8 | using OpenSim.Framework.UserManagement; |
9 | using OpenSim.Framework.Utilities; | 9 | using OpenSim.Framework.Utilities; |
10 | using OpenSim.Framework.Inventory; | ||
10 | 11 | ||
11 | namespace OpenSim.Region.Communications.Local | 12 | namespace OpenSim.Region.Communications.Local |
12 | { | 13 | { |
@@ -24,7 +25,7 @@ namespace OpenSim.Region.Communications.Local | |||
24 | public event LoginToRegionEvent OnLoginToRegion; | 25 | public event LoginToRegionEvent OnLoginToRegion; |
25 | 26 | ||
26 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) | 27 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) |
27 | : base(userManager, parent.InventoryService, welcomeMess) | 28 | : base(userManager, welcomeMess) |
28 | { | 29 | { |
29 | m_Parent = parent; | 30 | m_Parent = parent; |
30 | this.serversInfo = serversInfo; | 31 | this.serversInfo = serversInfo; |
@@ -52,7 +53,7 @@ namespace OpenSim.Region.Communications.Local | |||
52 | profile = this.m_userManager.GetUserProfile(firstname, lastname); | 53 | profile = this.m_userManager.GetUserProfile(firstname, lastname); |
53 | if (profile != null) | 54 | if (profile != null) |
54 | { | 55 | { |
55 | m_Parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID); | 56 | m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); |
56 | } | 57 | } |
57 | 58 | ||
58 | return profile; | 59 | return profile; |
@@ -122,5 +123,51 @@ namespace OpenSim.Region.Communications.Local | |||
122 | } | 123 | } |
123 | 124 | ||
124 | } | 125 | } |
126 | |||
127 | protected override InventoryData CreateInventoryData(LLUUID userID) | ||
128 | { | ||
129 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); | ||
130 | if (folders.Count > 0) | ||
131 | { | ||
132 | LLUUID rootID = LLUUID.Zero; | ||
133 | ArrayList AgentInventoryArray = new ArrayList(); | ||
134 | Hashtable TempHash; | ||
135 | foreach (InventoryFolderBase InvFolder in folders) | ||
136 | { | ||
137 | if (InvFolder.parentID == LLUUID.Zero) | ||
138 | { | ||
139 | rootID = InvFolder.folderID; | ||
140 | } | ||
141 | TempHash = new Hashtable(); | ||
142 | TempHash["name"] = InvFolder.name; | ||
143 | TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); | ||
144 | TempHash["version"] = (Int32)InvFolder.version; | ||
145 | TempHash["type_default"] = (Int32)InvFolder.type; | ||
146 | TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); | ||
147 | AgentInventoryArray.Add(TempHash); | ||
148 | } | ||
149 | return new InventoryData(AgentInventoryArray, rootID); | ||
150 | } | ||
151 | else | ||
152 | { | ||
153 | AgentInventory userInventory = new AgentInventory(); | ||
154 | userInventory.CreateRootFolder(userID, false); | ||
155 | |||
156 | ArrayList AgentInventoryArray = new ArrayList(); | ||
157 | Hashtable TempHash; | ||
158 | foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values) | ||
159 | { | ||
160 | TempHash = new Hashtable(); | ||
161 | TempHash["name"] = InvFolder.FolderName; | ||
162 | TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); | ||
163 | TempHash["version"] = (Int32)InvFolder.Version; | ||
164 | TempHash["type_default"] = (Int32)InvFolder.DefaultType; | ||
165 | TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); | ||
166 | AgentInventoryArray.Add(TempHash); | ||
167 | } | ||
168 | |||
169 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); | ||
170 | } | ||
171 | } | ||
125 | } | 172 | } |
126 | } | 173 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 61b8633..3bc4301 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -1,5 +1,4 @@ | |||
1 | using System; | 1 | using System; |
2 | using libsecondlife; | ||
3 | using OpenSim.Framework.Communications; | 2 | using OpenSim.Framework.Communications; |
4 | using OpenSim.Framework.Data; | 3 | using OpenSim.Framework.Data; |
5 | using OpenSim.Framework.Types; | 4 | using OpenSim.Framework.Types; |
@@ -49,10 +48,10 @@ namespace OpenSim.Region.Communications.Local | |||
49 | } | 48 | } |
50 | else | 49 | else |
51 | { | 50 | { |
52 | m_parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID); | 51 | m_parent.InventoryService.CreateNewUserInventory(profile.UUID); |
53 | } | 52 | } |
54 | 53 | ||
55 | return profile; | 54 | return profile; |
56 | } | 55 | } |
57 | } | 56 | } |
58 | } | 57 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 1aa6498..96f1933 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -14,8 +14,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
14 | m_gridService = gridInterComms; | 14 | m_gridService = gridInterComms; |
15 | m_interRegion = gridInterComms; | 15 | m_interRegion = gridInterComms; |
16 | 16 | ||
17 | m_inventoryService = new OGS1InventoryService(); | ||
17 | m_userService = new OGS1UserServices(this); | 18 | m_userService = new OGS1UserServices(this); |
18 | m_inventoryService = new OGS1InventoryService(serversInfo, m_userService); | ||
19 | } | 19 | } |
20 | } | 20 | } |
21 | } | 21 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 0b78c83..1b4b54c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -5,7 +5,6 @@ using System.Net; | |||
5 | using System.Runtime.Remoting; | 5 | using System.Runtime.Remoting; |
6 | using System.Runtime.Remoting.Channels; | 6 | using System.Runtime.Remoting.Channels; |
7 | using System.Runtime.Remoting.Channels.Tcp; | 7 | using System.Runtime.Remoting.Channels.Tcp; |
8 | using System.Runtime.Serialization.Formatters; | ||
9 | using libsecondlife; | 8 | using libsecondlife; |
10 | using Nwc.XmlRpc; | 9 | using Nwc.XmlRpc; |
11 | using OpenSim.Framework; | 10 | using OpenSim.Framework; |
@@ -303,23 +302,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
303 | /// </summary> | 302 | /// </summary> |
304 | private void StartRemoting() | 303 | private void StartRemoting() |
305 | { | 304 | { |
306 | // we only need to register the tcp channel once, and we don't know which other modules use remoting | 305 | TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); |
307 | if (ChannelServices.GetChannel("tcp") == null) | 306 | ChannelServices.RegisterChannel(ch, true); |
308 | { | ||
309 | // Creating a custom formatter for a TcpChannel sink chain. | ||
310 | BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(); | ||
311 | serverProvider.TypeFilterLevel = TypeFilterLevel.Full; | ||
312 | |||
313 | BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); | ||
314 | |||
315 | IDictionary props = new Hashtable(); | ||
316 | props["port"] = this.serversInfo.RemotingListenerPort; | ||
317 | props["typeFilterLevel"] = TypeFilterLevel.Full; | ||
318 | |||
319 | TcpChannel ch = new TcpChannel(props, clientProvider, serverProvider); | ||
320 | |||
321 | ChannelServices.RegisterChannel(ch, true); | ||
322 | } | ||
323 | 307 | ||
324 | WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); | 308 | WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); |
325 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); | 309 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 2ec4d10..45188c1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -1,15 +1,8 @@ | |||
1 | using System; | ||
2 | using System.Runtime.Remoting; | ||
3 | using System.Runtime.Remoting.Channels; | ||
4 | using System.Runtime.Remoting.Channels.Tcp; | ||
5 | using System.Runtime.Serialization.Formatters; | ||
6 | using System.Collections; | ||
7 | using System.Collections.Generic; | 1 | using System.Collections.Generic; |
8 | |||
9 | using libsecondlife; | 2 | using libsecondlife; |
10 | using OpenSim.Framework.Communications; | 3 | using OpenSim.Framework.Communications; |
11 | using OpenSim.Framework.Data; | 4 | using OpenSim.Framework.Data; |
12 | using OpenSim.Framework.Types; | 5 | using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; |
13 | 6 | ||
14 | 7 | ||
15 | namespace OpenSim.Region.Communications.OGS1 | 8 | namespace OpenSim.Region.Communications.OGS1 |
@@ -17,83 +10,43 @@ namespace OpenSim.Region.Communications.OGS1 | |||
17 | public class OGS1InventoryService : IInventoryServices | 10 | public class OGS1InventoryService : IInventoryServices |
18 | { | 11 | { |
19 | 12 | ||
20 | IUserServices _userServices; | 13 | public OGS1InventoryService() |
21 | IInventoryServices _inventoryServices; | ||
22 | |||
23 | public OGS1InventoryService(NetworkServersInfo networkConfig, IUserServices userServices) : | ||
24 | this(networkConfig.InventoryServerName, networkConfig.InventoryServerPort, userServices) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | public OGS1InventoryService(string serverName, int serverPort, IUserServices userServices) | ||
29 | { | 14 | { |
30 | _userServices = userServices; | ||
31 | |||
32 | // we only need to register the tcp channel once, and we don't know which other modules use remoting | ||
33 | if (ChannelServices.GetChannel("tcp") == null) | ||
34 | { | ||
35 | // Creating a custom formatter for a TcpChannel sink chain. | ||
36 | BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(); | ||
37 | serverProvider.TypeFilterLevel = TypeFilterLevel.Full; | ||
38 | |||
39 | BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); | ||
40 | |||
41 | IDictionary props = new Hashtable(); | ||
42 | props["typeFilterLevel"] = TypeFilterLevel.Full; | ||
43 | |||
44 | // Pass the properties for the port setting and the server provider in the server chain argument. (Client remains null here.) | ||
45 | TcpChannel chan = new TcpChannel(props, clientProvider, serverProvider); | ||
46 | |||
47 | ChannelServices.RegisterChannel(chan, true); | ||
48 | } | ||
49 | |||
50 | 15 | ||
51 | |||
52 | string remotingUrl = string.Format("tcp://{0}:{1}/Inventory", serverName, serverPort); | ||
53 | _inventoryServices = (IInventoryServices)Activator.GetObject(typeof(IInventoryServices), remotingUrl); | ||
54 | } | 16 | } |
55 | 17 | ||
56 | #region IInventoryServices Members | 18 | #region IInventoryServices Members |
57 | 19 | ||
58 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) | 20 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) |
59 | { | 21 | { |
60 | _inventoryServices.RequestInventoryForUser(userID, folderCallBack, itemCallBack); | 22 | |
61 | } | 23 | } |
62 | 24 | ||
63 | public void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) | 25 | public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) |
64 | { | 26 | { |
65 | _inventoryServices.AddNewInventoryFolder(userID, folder); | 27 | |
66 | } | 28 | } |
67 | 29 | ||
68 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) | 30 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) |
69 | { | 31 | { |
70 | _inventoryServices.AddNewInventoryItem(userID, item); | 32 | |
71 | } | 33 | } |
72 | 34 | ||
73 | public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) | 35 | public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) |
74 | { | 36 | { |
75 | _inventoryServices.DeleteInventoryItem(userID, item); | 37 | |
76 | } | ||
77 | |||
78 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID folderID) | ||
79 | { | ||
80 | return _inventoryServices.RequestFirstLevelFolders(folderID); | ||
81 | } | 38 | } |
82 | 39 | ||
83 | public List<InventoryItemBase> RequestFolderItems(LLUUID folderID) | 40 | public void CreateNewUserInventory(LLUUID user) |
84 | { | 41 | { |
85 | return _inventoryServices.RequestFolderItems(folderID); | 42 | |
86 | } | 43 | } |
87 | 44 | ||
88 | public void GetRootFoldersForUser(LLUUID user, out LLUUID libraryFolder, out LLUUID personalFolder) | 45 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) |
89 | { | 46 | { |
90 | _inventoryServices.GetRootFoldersForUser(user, out libraryFolder, out personalFolder); | 47 | return new List<InventoryFolderBase>(); |
91 | } | 48 | } |
92 | 49 | ||
93 | public void CreateNewUserInventory(LLUUID libraryRootId, LLUUID user) | ||
94 | { | ||
95 | throw new Exception("method not implemented"); | ||
96 | } | ||
97 | #endregion | 50 | #endregion |
98 | } | 51 | } |
99 | } | 52 | } |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index d76ffe3..1c7b806 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Environment.Modules | |||
162 | avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId); | 162 | avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId); |
163 | if (avatar != null) | 163 | if (avatar != null) |
164 | { | 164 | { |
165 | dis = (int)LLVector3.Mag(avatar.AbsolutePosition-fromPos); | 165 | dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos); |
166 | } | 166 | } |
167 | 167 | ||
168 | switch (type) | 168 | switch (type) |
@@ -211,4 +211,4 @@ namespace OpenSim.Region.Environment.Modules | |||
211 | } | 211 | } |
212 | } | 212 | } |
213 | } | 213 | } |
214 | } | 214 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 5b6fe46..e6b8364 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
561 | } | 561 | } |
562 | 562 | ||
563 | /// check for physics-related movement | 563 | /// check for physics-related movement |
564 | else if (LLVector3.Dist(lastPhysPos,AbsolutePosition) > 0.02) | 564 | else if (lastPhysPos.GetDistanceTo(AbsolutePosition) > 0.02) |
565 | { | 565 | { |
566 | SendTerseUpdateToAllClients(); | 566 | SendTerseUpdateToAllClients(); |
567 | m_updateCount = 0; | 567 | m_updateCount = 0; |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
748 | 748 | ||
749 | protected void CheckForSignificantMovement() | 749 | protected void CheckForSignificantMovement() |
750 | { | 750 | { |
751 | if (LLVector3.Dist(AbsolutePosition, posLastSignificantMove) > 2.0) | 751 | if (Helpers.VecDist(AbsolutePosition, posLastSignificantMove) > 2.0) |
752 | { | 752 | { |
753 | posLastSignificantMove = AbsolutePosition; | 753 | posLastSignificantMove = AbsolutePosition; |
754 | if (OnSignificantClientMovement != null) | 754 | if (OnSignificantClientMovement != null) |
@@ -919,4 +919,4 @@ namespace OpenSim.Region.Environment.Scenes | |||
919 | RemoveFromPhysicalScene(); | 919 | RemoveFromPhysicalScene(); |
920 | } | 920 | } |
921 | } | 921 | } |
922 | } | 922 | } \ No newline at end of file |