aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs37
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs2
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs65
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs10
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs6
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs22
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs6
-rw-r--r--OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs36
14 files changed, 130 insertions, 77 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 75c4187..58cb9a2 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack
535 /// <param name="regionInfo"></param> 535 /// <param name="regionInfo"></param>
536 public void SendRegionHandshake(RegionInfo regionInfo) 536 public void SendRegionHandshake(RegionInfo regionInfo)
537 { 537 {
538 RegionHandshakePacket handshake = new RegionHandshakePacket(); 538 RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
539 539
540 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; 540 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
541 handshake.RegionInfo.IsEstateManager = false; 541 handshake.RegionInfo.IsEstateManager = false;
@@ -2187,17 +2187,22 @@ namespace OpenSim.Region.ClientStack
2187 // Actually make the byte array and send it 2187 // Actually make the byte array and send it
2188 try 2188 try
2189 { 2189 {
2190 byte[] sendbuffer = Pack.ToBytes(); 2190 byte[] sendbuffer = Pack.ToBytes();
2191 if (Pack.Header.Zerocoded) 2191 if (Pack is RegionHandshakePacket)
2192 { 2192 {
2193 byte[] ZeroOutBuffer = new byte[4096]; 2193 PacketPool.Instance.ReturnPacket(Pack);
2194 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); 2194 }
2195 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode); 2195
2196 } 2196 if (Pack.Header.Zerocoded)
2197 else 2197 {
2198 { 2198 byte[] ZeroOutBuffer = new byte[4096];
2199 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); 2199 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
2200 } 2200 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode);
2201 }
2202 else
2203 {
2204 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
2205 }
2201 } 2206 }
2202 catch (Exception e) 2207 catch (Exception e)
2203 { 2208 {
@@ -2801,7 +2806,7 @@ namespace OpenSim.Region.ClientStack
2801 case PacketType.AssetUploadRequest: 2806 case PacketType.AssetUploadRequest:
2802 AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack; 2807 AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack;
2803 // Console.WriteLine("upload request " + Pack.ToString()); 2808 // Console.WriteLine("upload request " + Pack.ToString());
2804 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToStringHyphenated()); 2809 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
2805 if (OnAssetUploadRequest != null) 2810 if (OnAssetUploadRequest != null)
2806 { 2811 {
2807 LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); 2812 LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
@@ -2928,7 +2933,7 @@ namespace OpenSim.Region.ClientStack
2928 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); 2933 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId));
2929 if (asset != null) 2934 if (asset != null)
2930 { 2935 {
2931 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); 2936 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache");
2932 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 2937 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
2933 } 2938 }
2934 else 2939 else
@@ -2936,7 +2941,7 @@ namespace OpenSim.Region.ClientStack
2936 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); 2941 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
2937 if (asset != null) 2942 if (asset != null)
2938 { 2943 {
2939 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache"); 2944 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache");
2940 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 2945 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
2941 } 2946 }
2942 else 2947 else
@@ -3351,6 +3356,8 @@ namespace OpenSim.Region.ClientStack
3351 #endregion 3356 #endregion
3352 } 3357 }
3353 } 3358 }
3359
3360 PacketPool.Instance.ReturnPacket(Pack);
3354 } 3361 }
3355 3362
3356 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 3363 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 51155ac..f20b132 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack
134 134
135 if (masterAvatar != null) 135 if (masterAvatar != null)
136 { 136 {
137 m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); 137 m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]");
138 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 138 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
139 } 139 }
140 else 140 else
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index f91e5e2..5cad041 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -26,6 +26,7 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Net; 31using System.Net;
31using System.Net.Sockets; 32using System.Net.Sockets;
@@ -36,6 +37,68 @@ using OpenSim.Framework.Console;
36 37
37namespace OpenSim.Region.ClientStack 38namespace OpenSim.Region.ClientStack
38{ 39{
40 public sealed class PacketPool
41 {
42 // Set up a thread-safe singleton pattern
43 static PacketPool()
44 {
45 }
46
47 static readonly PacketPool instance = new PacketPool();
48
49 public static PacketPool Instance
50 {
51 get
52 {
53 return instance;
54 }
55 }
56
57 private Hashtable pool = new Hashtable();
58
59 public Packet GetPacket(PacketType type) {
60 Packet packet = null;
61
62 lock(pool)
63 {
64 if(pool[type] == null || ((Stack) pool[type]).Count == 0)
65 {
66 // Creating a new packet if we cannot reuse an old package
67 packet = Packet.BuildPacket(type);
68 }
69 else
70 {
71 // Recycle old packages
72 packet=(Packet) ((Stack) pool[type]).Pop();
73 }
74 }
75
76 return packet;
77 }
78
79 public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) {
80 Packet packet = GetPacket(Packet.GetType(bytes, packetEnd, zeroBuffer));
81
82 int i = 0;
83 packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
84 return packet;
85 }
86
87 public void ReturnPacket(Packet packet) {
88 lock(pool)
89 {
90 PacketType type=packet.Type;
91
92 if(pool[type] == null)
93 {
94 pool[type] = new Stack();
95 }
96
97 ((Stack) pool[type]).Push(packet);
98 }
99 }
100 }
101
39 public class UDPServer : ClientStackNetworkHandler 102 public class UDPServer : ClientStackNetworkHandler
40 { 103 {
41 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); 104 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
@@ -194,7 +257,7 @@ namespace OpenSim.Region.ClientStack
194 257
195 try 258 try
196 { 259 {
197 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 260 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
198 } 261 }
199 catch(Exception) 262 catch(Exception)
200 { 263 {
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index 0ec7c99..f57de1c 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -374,7 +374,7 @@ namespace OpenSim.Region.Communications.Local
374 regData["status"] = "active"; 374 regData["status"] = "active";
375 regData["handle"] = region.ToString(); 375 regData["handle"] = region.ToString();
376 376
377 respData[reg.RegionID.ToStringHyphenated()] = regData; 377 respData[reg.RegionID.ToString()] = regData;
378 } 378 }
379 } 379 }
380 380
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 37cea1f..2c08707 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -177,10 +177,10 @@ namespace OpenSim.Region.Communications.Local
177 } 177 }
178 TempHash = new Hashtable(); 178 TempHash = new Hashtable();
179 TempHash["name"] = InvFolder.name; 179 TempHash["name"] = InvFolder.name;
180 TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); 180 TempHash["parent_id"] = InvFolder.parentID.ToString();
181 TempHash["version"] = (Int32) InvFolder.version; 181 TempHash["version"] = (Int32) InvFolder.version;
182 TempHash["type_default"] = (Int32) InvFolder.type; 182 TempHash["type_default"] = (Int32) InvFolder.type;
183 TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); 183 TempHash["folder_id"] = InvFolder.folderID.ToString();
184 AgentInventoryArray.Add(TempHash); 184 AgentInventoryArray.Add(TempHash);
185 } 185 }
186 return new InventoryData(AgentInventoryArray, rootID); 186 return new InventoryData(AgentInventoryArray, rootID);
@@ -196,10 +196,10 @@ namespace OpenSim.Region.Communications.Local
196 { 196 {
197 TempHash = new Hashtable(); 197 TempHash = new Hashtable();
198 TempHash["name"] = InvFolder.FolderName; 198 TempHash["name"] = InvFolder.FolderName;
199 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); 199 TempHash["parent_id"] = InvFolder.ParentID.ToString();
200 TempHash["version"] = (Int32) InvFolder.Version; 200 TempHash["version"] = (Int32) InvFolder.Version;
201 TempHash["type_default"] = (Int32) InvFolder.DefaultType; 201 TempHash["type_default"] = (Int32) InvFolder.DefaultType;
202 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); 202 TempHash["folder_id"] = InvFolder.FolderID.ToString();
203 AgentInventoryArray.Add(TempHash); 203 AgentInventoryArray.Add(TempHash);
204 } 204 }
205 205
@@ -207,4 +207,4 @@ namespace OpenSim.Region.Communications.Local
207 } 207 }
208 } 208 }
209 } 209 }
210} \ No newline at end of file 210}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index fbb83fc..060fe28 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Communications.OGS1
103 // Login / Authentication 103 // Login / Authentication
104 104
105 GridParams["authkey"] = serversInfo.GridSendKey; 105 GridParams["authkey"] = serversInfo.GridSendKey;
106 GridParams["UUID"] = regionInfo.RegionID.ToStringHyphenated(); 106 GridParams["UUID"] = regionInfo.RegionID.ToString();
107 GridParams["sim_ip"] = regionInfo.ExternalHostName; 107 GridParams["sim_ip"] = regionInfo.ExternalHostName;
108 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); 108 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
109 GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); 109 GridParams["region_locx"] = regionInfo.RegionLocX.ToString();
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1
111 GridParams["sim_name"] = regionInfo.RegionName; 111 GridParams["sim_name"] = regionInfo.RegionName;
112 GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); 112 GridParams["http_port"] = serversInfo.HttpListenerPort.ToString();
113 GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); 113 GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
114 GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToStringHyphenated(); 114 GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
115 115
116 // Package into an XMLRPC Request 116 // Package into an XMLRPC Request
117 ArrayList SendParams = new ArrayList(); 117 ArrayList SendParams = new ArrayList();
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Communications.OGS1
191 { 191 {
192 RegionInfo regionInfo; 192 RegionInfo regionInfo;
193 Hashtable requestData = new Hashtable(); 193 Hashtable requestData = new Hashtable();
194 requestData["region_UUID"] = Region_UUID.ToStringHyphenated(); 194 requestData["region_UUID"] = Region_UUID.ToString();
195 requestData["authkey"] = serversInfo.GridSendKey; 195 requestData["authkey"] = serversInfo.GridSendKey;
196 ArrayList SendParams = new ArrayList(); 196 ArrayList SendParams = new ArrayList();
197 SendParams.Add(requestData); 197 SendParams.Add(requestData);
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index 709a227..6c1f77e 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Communications.OGS1
63 { 63 {
64 try 64 try
65 { 65 {
66 Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToStringHyphenated()); 66 Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToString());
67 RestObjectPosterResponse<InventoryCollection> requester = new RestObjectPosterResponse<InventoryCollection>(); 67 RestObjectPosterResponse<InventoryCollection> requester = new RestObjectPosterResponse<InventoryCollection>();
68 requester.ResponseCallback = InventoryResponse; 68 requester.ResponseCallback = InventoryResponse;
69 69
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index d26da90..c1e6ba6 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Communications.OGS1
118 try 118 try
119 { 119 {
120 Hashtable param = new Hashtable(); 120 Hashtable param = new Hashtable();
121 param["queryid"] = (string)queryID.ToStringHyphenated(); 121 param["queryid"] = (string)queryID.ToString();
122 param["avquery"] = objAlphaNumericPattern.Replace(query, ""); 122 param["avquery"] = objAlphaNumericPattern.Replace(query, "");
123 IList parameters = new ArrayList(); 123 IList parameters = new ArrayList();
124 parameters.Add(param); 124 parameters.Add(param);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 9821906..753d0cf 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Scenes
241 { 241 {
242 MainLog.Instance.Verbose( 242 MainLog.Instance.Verbose(
243 "INVENTORY", 243 "INVENTORY",
244 "Moving item for " + remoteClient.AgentId.ToStringHyphenated()); 244 "Moving item for " + remoteClient.AgentId.ToString());
245 245
246 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 246 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
247 if (userInfo == null) 247 if (userInfo == null)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 474d8d5..01d6c5a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes
88 protected SceneCommunicationService m_sceneGridService; 88 protected SceneCommunicationService m_sceneGridService;
89 protected SceneXmlLoader m_sceneXmlLoader; 89 protected SceneXmlLoader m_sceneXmlLoader;
90 90
91 protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); 91 protected Dictionary<LLUUID, OpenSim.Region.Capabilities.Caps> m_capsHandlers = new Dictionary<LLUUID, OpenSim.Region.Capabilities.Caps>();
92 protected BaseHttpServer httpListener; 92 protected BaseHttpServer httpListener;
93 93
94 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); 94 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>();
@@ -990,6 +990,7 @@ namespace OpenSim.Region.Environment.Scenes
990 } 990 }
991 } 991 }
992 992
993/* Tree has been removed from libSL
993 public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, 994 public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
994 libsecondlife.ObjectManager.Tree treeType, bool newTree) 995 libsecondlife.ObjectManager.Tree treeType, bool newTree)
995 { 996 {
@@ -1001,7 +1002,7 @@ namespace OpenSim.Region.Environment.Scenes
1001 treeShape.State = (byte)treeType; 1002 treeShape.State = (byte)treeType;
1002 AddNewPrim(LLUUID.Random(), position, rotation, treeShape); 1003 AddNewPrim(LLUUID.Random(), position, rotation, treeShape);
1003 } 1004 }
1004 1005*/
1005 public void RemovePrim(uint localID, LLUUID avatar_deleter) 1006 public void RemovePrim(uint localID, LLUUID avatar_deleter)
1006 { 1007 {
1007 m_innerScene.RemovePrim(localID, avatar_deleter); 1008 m_innerScene.RemovePrim(localID, avatar_deleter);
@@ -1323,8 +1324,8 @@ namespace OpenSim.Region.Environment.Scenes
1323 { 1324 {
1324 if (agent.CapsPath != "") 1325 if (agent.CapsPath != "")
1325 { 1326 {
1326 Caps cap = 1327 OpenSim.Region.Capabilities.Caps cap =
1327 new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, 1328 new OpenSim.Region.Capabilities.Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port,
1328 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); 1329 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile);
1329 1330
1330 Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + 1331 Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() +
@@ -1335,7 +1336,7 @@ namespace OpenSim.Region.Environment.Scenes
1335 if (m_capsHandlers.ContainsKey(agent.AgentID)) 1336 if (m_capsHandlers.ContainsKey(agent.AgentID))
1336 { 1337 {
1337 //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + 1338 //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
1338 // agent.AgentID.ToStringHyphenated()); 1339 // agent.AgentID.ToString());
1339 try 1340 try
1340 { 1341 {
1341 m_capsHandlers[agent.AgentID] = cap; 1342 m_capsHandlers[agent.AgentID] = cap;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 5e5b8b5..f3be4bd 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1030,8 +1030,8 @@ namespace OpenSim.Region.Environment.Scenes
1030 foreach (TaskInventoryItem item in TaskInventory.Values) 1030 foreach (TaskInventoryItem item in TaskInventory.Values)
1031 { 1031 {
1032 invString.AddItemStart(); 1032 invString.AddItemStart();
1033 invString.AddNameValueLine("item_id", item.item_id.ToStringHyphenated()); 1033 invString.AddNameValueLine("item_id", item.item_id.ToString());
1034 invString.AddNameValueLine("parent_id", item.parent_id.ToStringHyphenated()); 1034 invString.AddNameValueLine("parent_id", item.parent_id.ToString());
1035 1035
1036 invString.AddPermissionsStart(); 1036 invString.AddPermissionsStart();
1037 invString.AddNameValueLine("base_mask", "0x7FFFFFFF"); 1037 invString.AddNameValueLine("base_mask", "0x7FFFFFFF");
@@ -1039,13 +1039,13 @@ namespace OpenSim.Region.Environment.Scenes
1039 invString.AddNameValueLine("group_mask", "0x7FFFFFFF"); 1039 invString.AddNameValueLine("group_mask", "0x7FFFFFFF");
1040 invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF"); 1040 invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF");
1041 invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF"); 1041 invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF");
1042 invString.AddNameValueLine("creator_id", item.creator_id.ToStringHyphenated()); 1042 invString.AddNameValueLine("creator_id", item.creator_id.ToString());
1043 invString.AddNameValueLine("owner_id", item.owner_id.ToStringHyphenated()); 1043 invString.AddNameValueLine("owner_id", item.owner_id.ToString());
1044 invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToStringHyphenated()); 1044 invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToString());
1045 invString.AddNameValueLine("group_id", item.group_id.ToStringHyphenated()); 1045 invString.AddNameValueLine("group_id", item.group_id.ToString());
1046 invString.AddSectionEnd(); 1046 invString.AddSectionEnd();
1047 1047
1048 invString.AddNameValueLine("asset_id", item.asset_id.ToStringHyphenated()); 1048 invString.AddNameValueLine("asset_id", item.asset_id.ToString());
1049 invString.AddNameValueLine("type", item.type); 1049 invString.AddNameValueLine("type", item.type);
1050 invString.AddNameValueLine("inv_type", item.inv_type); 1050 invString.AddNameValueLine("inv_type", item.inv_type);
1051 invString.AddNameValueLine("flags", "0x00"); 1051 invString.AddNameValueLine("flags", "0x00");
@@ -1255,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes
1255 tex.FaceTextures[i].RGBA = tmpcolor; 1255 tex.FaceTextures[i].RGBA = tmpcolor;
1256 } 1256 }
1257 } 1257 }
1258 tmpcolor = tex.DefaultTexture.RGBA; 1258 tmpcolor = tex.FaceTextures[0].RGBA;
1259 tmpcolor.A = tmpcolor.A * 255; 1259 tmpcolor.A = tmpcolor.A * 255;
1260 tmpcolor.R = tmpcolor.R * 255; 1260 tmpcolor.R = tmpcolor.R * 255;
1261 tmpcolor.G = tmpcolor.G * 255; 1261 tmpcolor.G = tmpcolor.G * 255;
1262 tmpcolor.B = tmpcolor.B * 255; 1262 tmpcolor.B = tmpcolor.B * 255;
1263 tex.DefaultTexture.RGBA = tmpcolor; 1263 tex.FaceTextures[0].RGBA = tmpcolor;
1264 UpdateTextureEntry(tex.ToBytes()); 1264 UpdateTextureEntry(tex.ToBytes());
1265 } 1265 }
1266 1266
@@ -1544,8 +1544,8 @@ namespace OpenSim.Region.Environment.Scenes
1544 public InventoryStringBuilder(LLUUID folderID, LLUUID parentID) 1544 public InventoryStringBuilder(LLUUID folderID, LLUUID parentID)
1545 { 1545 {
1546 BuildString += "\tinv_object\t0\n\t{\n"; 1546 BuildString += "\tinv_object\t0\n\t{\n";
1547 AddNameValueLine("obj_id", folderID.ToStringHyphenated()); 1547 AddNameValueLine("obj_id", folderID.ToString());
1548 AddNameValueLine("parent_id", parentID.ToStringHyphenated()); 1548 AddNameValueLine("parent_id", parentID.ToString());
1549 AddNameValueLine("type", "category"); 1549 AddNameValueLine("type", "category");
1550 AddNameValueLine("name", "Contents"); 1550 AddNameValueLine("name", "Contents");
1551 AddSectionEnd(); 1551 AddSectionEnd();
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 62abefc..a221243 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1033,11 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes
1033 { 1033 {
1034 LLVector3 pos = m_pos; 1034 LLVector3 pos = m_pos;
1035 LLVector3 vel = Velocity; 1035 LLVector3 vel = Velocity;
1036 LLQuaternion rot; 1036 LLQuaternion rot=new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
1037 rot.X = m_bodyRot.x;
1038 rot.Y = m_bodyRot.y;
1039 rot.Z = m_bodyRot.z;
1040 rot.W = m_bodyRot.w;
1041 remoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z), 1037 remoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z),
1042 new LLVector3(vel.X, vel.Y, vel.Z), rot); 1038 new LLVector3(vel.X, vel.Y, vel.Z), rot);
1043 } 1039 }
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
index 2d684d1..09b7f48 100644
--- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
+++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
56 { 56 {
57 SceneObject root = obj.Value; 57 SceneObject root = obj.Value;
58 58
59 sequence += "NEWOBJ::" + obj.Key.ToStringHyphenated() + "\n"; 59 sequence += "NEWOBJ::" + obj.Key.ToString() + "\n";
60 60
61 string rootPrim = processPrimitiveToString(root.rootPrimitive); 61 string rootPrim = processPrimitiveToString(root.rootPrimitive);
62 62
@@ -91,4 +91,4 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
91 return ""; 91 return "";
92 } 92 }
93 } 93 }
94} \ No newline at end of file 94}
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 832ccf1..1cb307f 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -471,11 +471,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
471 } 471 }
472 else if (face == -1) 472 else if (face == -1)
473 { 473 {
474 texcolor = tex.DefaultTexture.RGBA;
475 texcolor.R = (float)Math.Abs(color.x - 1);
476 texcolor.G = (float)Math.Abs(color.y - 1);
477 texcolor.B = (float)Math.Abs(color.z - 1);
478 tex.DefaultTexture.RGBA = texcolor;
479 for (uint i = 0; i < 32; i++) 474 for (uint i = 0; i < 32; i++)
480 { 475 {
481 if (tex.FaceTextures[i] != null) 476 if (tex.FaceTextures[i] != null)
@@ -499,7 +494,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
499 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); 494 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length);
500 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 495 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
501 { 496 {
502 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 497 return (double)((tex.FaceTextures[0].RGBA.A * 255) / 255);
503 } 498 }
504 if (face > -1) 499 if (face > -1)
505 { 500 {
@@ -522,9 +517,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
522 } 517 }
523 else if (face == -1) 518 else if (face == -1)
524 { 519 {
525 texcolor = tex.DefaultTexture.RGBA;
526 texcolor.A = (float)Math.Abs(alpha - 1);
527 tex.DefaultTexture.RGBA = texcolor;
528 for (int i = 0; i < 32; i++) 520 for (int i = 0; i < 32; i++)
529 { 521 {
530 if (tex.FaceTextures[i] != null) 522 if (tex.FaceTextures[i] != null)
@@ -548,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
548 LSL_Types.Vector3 rgb; 540 LSL_Types.Vector3 rgb;
549 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 541 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
550 { 542 {
551 texcolor = tex.DefaultTexture.RGBA; 543 texcolor = tex.FaceTextures[0].RGBA;
552 rgb.x = (255 - (texcolor.R * 255)) / 255; 544 rgb.x = (255 - (texcolor.R * 255)) / 255;
553 rgb.y = (255 - (texcolor.G * 255)) / 255; 545 rgb.y = (255 - (texcolor.G * 255)) / 255;
554 rgb.z = (255 - (texcolor.B * 255)) / 255; 546 rgb.z = (255 - (texcolor.B * 255)) / 255;
@@ -586,7 +578,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
586 tex.FaceTextures[i].TextureID = new LLUUID(texture); 578 tex.FaceTextures[i].TextureID = new LLUUID(texture);
587 } 579 }
588 } 580 }
589 tex.DefaultTexture.TextureID = new LLUUID(texture);
590 m_host.UpdateTexture(tex); 581 m_host.UpdateTexture(tex);
591 return; 582 return;
592 } 583 }
@@ -617,8 +608,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
617 608
618 } 609 }
619 } 610 }
620 tex.DefaultTexture.RepeatU = (float)u;
621 tex.DefaultTexture.RepeatV = (float)v;
622 m_host.UpdateTexture(tex); 611 m_host.UpdateTexture(tex);
623 return; 612 return;
624 } 613 }
@@ -648,8 +637,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
648 tex.FaceTextures[i].OffsetV = (float)v; 637 tex.FaceTextures[i].OffsetV = (float)v;
649 } 638 }
650 } 639 }
651 tex.DefaultTexture.OffsetU = (float)u;
652 tex.DefaultTexture.OffsetV = (float)v;
653 m_host.UpdateTexture(tex); 640 m_host.UpdateTexture(tex);
654 return; 641 return;
655 } 642 }
@@ -677,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
677 tex.FaceTextures[i].Rotation = (float)rotation; 664 tex.FaceTextures[i].Rotation = (float)rotation;
678 } 665 }
679 } 666 }
680 tex.DefaultTexture.Rotation = (float)rotation;
681 m_host.UpdateTexture(tex); 667 m_host.UpdateTexture(tex);
682 return; 668 return;
683 } 669 }
@@ -696,7 +682,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
696 { 682 {
697 LLObject.TextureEntryFace texface; 683 LLObject.TextureEntryFace texface;
698 texface = tex.GetFace((uint)face); 684 texface = tex.GetFace((uint)face);
699 return texface.TextureID.ToStringHyphenated(); 685 return texface.TextureID.ToString();
700 } 686 }
701 NotImplemented("llGetTexture"); 687 NotImplemented("llGetTexture");
702 return ""; 688 return "";
@@ -1035,7 +1021,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1035 1021
1036 public string llGetOwner() 1022 public string llGetOwner()
1037 { 1023 {
1038 return m_host.ObjectOwner.ToStringHyphenated(); 1024 return m_host.ObjectOwner.ToString();
1039 } 1025 }
1040 1026
1041 public void llInstantMessage(string user, string message) 1027 public void llInstantMessage(string user, string message)
@@ -1063,7 +1049,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1063 1049
1064 public string llGetKey() 1050 public string llGetKey()
1065 { 1051 {
1066 return m_host.UUID.ToStringHyphenated(); 1052 return m_host.UUID.ToString();
1067 } 1053 }
1068 1054
1069 public void llSetBuoyancy(double buoyancy) 1055 public void llSetBuoyancy(double buoyancy)
@@ -1277,7 +1263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1277 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 1263 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
1278 if (part != null) 1264 if (part != null)
1279 { 1265 {
1280 return part.UUID.ToStringHyphenated(); 1266 return part.UUID.ToString();
1281 } 1267 }
1282 else 1268 else
1283 { 1269 {
@@ -1621,11 +1607,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1621 { 1607 {
1622 return "00000000-0000-0000-0000-000000000000"; 1608 return "00000000-0000-0000-0000-000000000000";
1623 } 1609 }
1624 //return OpenSim.Framework.ToStringHyphenated(src[index]); 1610 //return OpenSim.Framework.ToString(src[index]);
1625 LLUUID tmpkey; 1611 LLUUID tmpkey;
1626 if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey)) 1612 if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey))
1627 { 1613 {
1628 return tmpkey.ToStringHyphenated(); 1614 return tmpkey.ToString();
1629 } 1615 }
1630 else 1616 else
1631 { 1617 {
@@ -2380,7 +2366,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2380 2366
2381 public string llGetCreator() 2367 public string llGetCreator()
2382 { 2368 {
2383 return m_host.ObjectCreator.ToStringHyphenated(); 2369 return m_host.ObjectCreator.ToString();
2384 } 2370 }
2385 2371
2386 public string llGetTimestamp() 2372 public string llGetTimestamp()
@@ -2807,14 +2793,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2807 LLUUID createdTexture = 2793 LLUUID createdTexture =
2808 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 2794 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
2809 extraParams, timer); 2795 extraParams, timer);
2810 return createdTexture.ToStringHyphenated(); 2796 return createdTexture.ToString();
2811 } 2797 }
2812 else 2798 else
2813 { 2799 {
2814 //TODO update existing dynamic textures 2800 //TODO update existing dynamic textures
2815 } 2801 }
2816 2802
2817 return LLUUID.Zero.ToStringHyphenated(); 2803 return LLUUID.Zero.ToString();
2818 } 2804 }
2819 2805
2820 private void NotImplemented(string Command) 2806 private void NotImplemented(string Command)