diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 303 |
1 files changed, 152 insertions, 151 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index becd7dc..9e784d6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -32,10 +32,9 @@ using System.Drawing.Imaging; | |||
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using System.Timers; | 34 | using System.Timers; |
35 | using Axiom.Math; | 35 | using OpenMetaverse; |
36 | using libsecondlife; | 36 | using OpenMetaverse.Imaging; |
37 | using libsecondlife.Packets; | 37 | using OpenMetaverse.Packets; |
38 | using OpenJPEGNet; | ||
39 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | 39 | using OpenSim.Framework.Communications; |
41 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
@@ -116,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
116 | /// <summary> | 115 | /// <summary> |
117 | /// Each agent has its own capabilities handler. | 116 | /// Each agent has its own capabilities handler. |
118 | /// </summary> | 117 | /// </summary> |
119 | protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); | 118 | protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>(); |
120 | 119 | ||
121 | protected BaseHttpServer m_httpListener; | 120 | protected BaseHttpServer m_httpListener; |
122 | 121 | ||
@@ -201,19 +200,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
201 | } | 200 | } |
202 | 201 | ||
203 | // Local reference to the objects in the scene (which are held in innerScene) | 202 | // Local reference to the objects in the scene (which are held in innerScene) |
204 | // public Dictionary<LLUUID, SceneObjectGroup> Objects | 203 | // public Dictionary<UUID, SceneObjectGroup> Objects |
205 | // { | 204 | // { |
206 | // get { return m_innerScene.SceneObjects; } | 205 | // get { return m_innerScene.SceneObjects; } |
207 | // } | 206 | // } |
208 | 207 | ||
209 | // Reference to all of the agents in the scene (root and child) | 208 | // Reference to all of the agents in the scene (root and child) |
210 | protected Dictionary<LLUUID, ScenePresence> m_scenePresences | 209 | protected Dictionary<UUID, ScenePresence> m_scenePresences |
211 | { | 210 | { |
212 | get { return m_innerScene.ScenePresences; } | 211 | get { return m_innerScene.ScenePresences; } |
213 | set { m_innerScene.ScenePresences = value; } | 212 | set { m_innerScene.ScenePresences = value; } |
214 | } | 213 | } |
215 | 214 | ||
216 | // protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects | 215 | // protected Dictionary<UUID, SceneObjectGroup> m_sceneObjects |
217 | // { | 216 | // { |
218 | // get { return m_innerScene.SceneObjects; } | 217 | // get { return m_innerScene.SceneObjects; } |
219 | // set { m_innerScene.SceneObjects = value; } | 218 | // set { m_innerScene.SceneObjects = value; } |
@@ -227,13 +226,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | /// If you want a list of entities where the list itself is guaranteed not to change, please use | 226 | /// If you want a list of entities where the list itself is guaranteed not to change, please use |
228 | /// GetEntities() | 227 | /// GetEntities() |
229 | /// </summary> | 228 | /// </summary> |
230 | public Dictionary<LLUUID, EntityBase> Entities | 229 | public Dictionary<UUID, EntityBase> Entities |
231 | { | 230 | { |
232 | get { return m_innerScene.Entities; } | 231 | get { return m_innerScene.Entities; } |
233 | set { m_innerScene.Entities = value; } | 232 | set { m_innerScene.Entities = value; } |
234 | } | 233 | } |
235 | 234 | ||
236 | public Dictionary<LLUUID, ScenePresence> m_restorePresences | 235 | public Dictionary<UUID, ScenePresence> m_restorePresences |
237 | { | 236 | { |
238 | get { return m_innerScene.RestorePresences; } | 237 | get { return m_innerScene.RestorePresences; } |
239 | set { m_innerScene.RestorePresences = value; } | 238 | set { m_innerScene.RestorePresences = value; } |
@@ -466,7 +465,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
466 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 465 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
467 | m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 466 | m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
468 | m_restartTimer.Start(); | 467 | m_restartTimer.Start(); |
469 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 468 | SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
470 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 469 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
471 | } | 470 | } |
472 | } | 471 | } |
@@ -481,7 +480,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
481 | if (m_RestartTimerCounter <= m_incrementsof15seconds) | 480 | if (m_RestartTimerCounter <= m_incrementsof15seconds) |
482 | { | 481 | { |
483 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) | 482 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) |
484 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + | 483 | SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + |
485 | ((8 - m_RestartTimerCounter) * 15) + " seconds"); | 484 | ((8 - m_RestartTimerCounter) * 15) + " seconds"); |
486 | 485 | ||
487 | // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + | 486 | // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + |
@@ -923,8 +922,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
923 | 922 | ||
924 | foreach (AssetBase asset in textures) | 923 | foreach (AssetBase asset in textures) |
925 | { | 924 | { |
926 | Image image = OpenJPEG.DecodeToImage(asset.Data); | 925 | ManagedImage managedImage; |
927 | bitImages.Add(image); | 926 | Image image; |
927 | |||
928 | if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image)) | ||
929 | bitImages.Add(image); | ||
928 | } | 930 | } |
929 | 931 | ||
930 | Bitmap mapTexture = new Bitmap(2560, 2560); | 932 | Bitmap mapTexture = new Bitmap(2560, 2560); |
@@ -1025,9 +1027,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1025 | double[,] hm = Heightmap.GetDoubles(); | 1027 | double[,] hm = Heightmap.GetDoubles(); |
1026 | bool ShadowDebugContinue = true; | 1028 | bool ShadowDebugContinue = true; |
1027 | //Color prim = Color.FromArgb(120, 120, 120); | 1029 | //Color prim = Color.FromArgb(120, 120, 120); |
1028 | //LLVector3 RayEnd = new LLVector3(0, 0, 0); | 1030 | //Vector3 RayEnd = new Vector3(0, 0, 0); |
1029 | //LLVector3 RayStart = new LLVector3(0, 0, 0); | 1031 | //Vector3 RayStart = new Vector3(0, 0, 0); |
1030 | //LLVector3 direction = new LLVector3(0, 0, -1); | 1032 | //Vector3 direction = new Vector3(0, 0, -1); |
1031 | //Vector3 AXOrigin = new Vector3(); | 1033 | //Vector3 AXOrigin = new Vector3(); |
1032 | //Vector3 AXdirection = new Vector3(); | 1034 | //Vector3 AXdirection = new Vector3(); |
1033 | //Ray testRay = new Ray(); | 1035 | //Ray testRay = new Ray(); |
@@ -1061,10 +1063,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1061 | //int tc = System.Environment.TickCount; | 1063 | //int tc = System.Environment.TickCount; |
1062 | for (int y = 0; y < 256; y++) | 1064 | for (int y = 0; y < 256; y++) |
1063 | { | 1065 | { |
1064 | //RayEnd = new LLVector3(x, y, 0); | 1066 | //RayEnd = new Vector3(x, y, 0); |
1065 | //RayStart = new LLVector3(x, y, 255); | 1067 | //RayStart = new Vector3(x, y, 255); |
1066 | 1068 | ||
1067 | //direction = LLVector3.Norm(RayEnd - RayStart); | 1069 | //direction = Vector3.Norm(RayEnd - RayStart); |
1068 | //AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1070 | //AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1069 | //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1071 | //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
1070 | 1072 | ||
@@ -1272,7 +1274,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1272 | if (part.Shape.Textures.DefaultTexture == null) | 1274 | if (part.Shape.Textures.DefaultTexture == null) |
1273 | continue; | 1275 | continue; |
1274 | 1276 | ||
1275 | LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; | 1277 | Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA; |
1276 | 1278 | ||
1277 | // Not sure why some of these are null, oh well. | 1279 | // Not sure why some of these are null, oh well. |
1278 | 1280 | ||
@@ -1285,7 +1287,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1285 | //Try to set the map spot color | 1287 | //Try to set the map spot color |
1286 | try | 1288 | try |
1287 | { | 1289 | { |
1288 | // If the color gets goofy somehow, skip it *shakes fist at LLColor | 1290 | // If the color gets goofy somehow, skip it *shakes fist at Color4 |
1289 | mapdotspot = Color.FromArgb(colorr, colorg, colorb); | 1291 | mapdotspot = Color.FromArgb(colorr, colorg, colorb); |
1290 | } | 1292 | } |
1291 | catch (ArgumentException) | 1293 | catch (ArgumentException) |
@@ -1302,7 +1304,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1302 | // Mono Array | 1304 | // Mono Array |
1303 | } | 1305 | } |
1304 | 1306 | ||
1305 | LLVector3 pos = part.GetWorldPosition(); | 1307 | Vector3 pos = part.GetWorldPosition(); |
1306 | 1308 | ||
1307 | // skip prim outside of retion | 1309 | // skip prim outside of retion |
1308 | if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) | 1310 | if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) |
@@ -1327,21 +1329,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
1327 | if (isBelow256AboveTerrain) | 1329 | if (isBelow256AboveTerrain) |
1328 | { | 1330 | { |
1329 | // Translate scale by rotation so scale is represented properly when object is rotated | 1331 | // Translate scale by rotation so scale is represented properly when object is rotated |
1330 | Vector3 scale = new Vector3(part.Shape.Scale.X, part.Shape.Scale.Y, part.Shape.Scale.Z); | 1332 | Vector3 scale = part.Shape.Scale; |
1331 | LLQuaternion llrot = part.GetWorldRotation(); | 1333 | Quaternion rot = part.GetWorldRotation(); |
1332 | Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); | 1334 | scale *= rot; |
1333 | scale = rot * scale; | ||
1334 | 1335 | ||
1335 | // negative scales don't work in this situation | 1336 | // negative scales don't work in this situation |
1336 | scale.x = Math.Abs(scale.x); | 1337 | scale.X = Math.Abs(scale.X); |
1337 | scale.y = Math.Abs(scale.y); | 1338 | scale.Y = Math.Abs(scale.Y); |
1338 | scale.z = Math.Abs(scale.z); | 1339 | scale.Z = Math.Abs(scale.Z); |
1339 | 1340 | ||
1340 | // This scaling isn't very accurate and doesn't take into account the face rotation :P | 1341 | // This scaling isn't very accurate and doesn't take into account the face rotation :P |
1341 | int mapdrawstartX = (int)(pos.X - scale.x); | 1342 | int mapdrawstartX = (int)(pos.X - scale.X); |
1342 | int mapdrawstartY = (int)(pos.Y - scale.y); | 1343 | int mapdrawstartY = (int)(pos.Y - scale.Y); |
1343 | int mapdrawendX = (int)(pos.X + scale.x); | 1344 | int mapdrawendX = (int)(pos.X + scale.X); |
1344 | int mapdrawendY = (int)(pos.Y + scale.y); | 1345 | int mapdrawendY = (int)(pos.Y + scale.Y); |
1345 | 1346 | ||
1346 | // If object is beyond the edge of the map, don't draw it to avoid errors | 1347 | // If object is beyond the edge of the map, don't draw it to avoid errors |
1347 | if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 | 1348 | if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 |
@@ -1420,7 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1420 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each | 1421 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each |
1421 | // time a mapimage is generated! | 1422 | // time a mapimage is generated! |
1422 | 1423 | ||
1423 | LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; | 1424 | UUID lastMapRegionUUID = m_regInfo.lastMapUUID; |
1424 | 1425 | ||
1425 | int lastMapRefresh = 0; | 1426 | int lastMapRefresh = 0; |
1426 | int twoDays = 172800; | 1427 | int twoDays = 172800; |
@@ -1440,21 +1441,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
1440 | { | 1441 | { |
1441 | } | 1442 | } |
1442 | 1443 | ||
1443 | LLUUID TerrainImageLLUUID = LLUUID.Random(); | 1444 | UUID TerrainImageUUID = UUID.Random(); |
1444 | 1445 | ||
1445 | if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) | 1446 | if (lastMapRegionUUID == UUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) |
1446 | { | 1447 | { |
1447 | m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); | 1448 | m_regInfo.SaveLastMapUUID(TerrainImageUUID); |
1448 | 1449 | ||
1449 | m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE"); | 1450 | m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE"); |
1450 | } | 1451 | } |
1451 | else | 1452 | else |
1452 | { | 1453 | { |
1453 | TerrainImageLLUUID = lastMapRegionUUID; | 1454 | TerrainImageUUID = lastMapRegionUUID; |
1454 | m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); | 1455 | m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); |
1455 | } | 1456 | } |
1456 | 1457 | ||
1457 | m_regInfo.RegionSettings.TerrainImageID = TerrainImageLLUUID; | 1458 | m_regInfo.RegionSettings.TerrainImageID = TerrainImageUUID; |
1458 | 1459 | ||
1459 | AssetBase asset = new AssetBase(); | 1460 | AssetBase asset = new AssetBase(); |
1460 | asset.FullID = m_regInfo.RegionSettings.TerrainImageID; | 1461 | asset.FullID = m_regInfo.RegionSettings.TerrainImageID; |
@@ -1471,7 +1472,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1471 | 1472 | ||
1472 | #region Load Land | 1473 | #region Load Land |
1473 | 1474 | ||
1474 | public void loadAllLandObjectsFromStorage(LLUUID regionID) | 1475 | public void loadAllLandObjectsFromStorage(UUID regionID) |
1475 | { | 1476 | { |
1476 | m_log.Info("[SCENE]: Loading land objects from storage"); | 1477 | m_log.Info("[SCENE]: Loading land objects from storage"); |
1477 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(regionID); | 1478 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(regionID); |
@@ -1500,7 +1501,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1500 | /// <summary> | 1501 | /// <summary> |
1501 | /// Loads the World's objects | 1502 | /// Loads the World's objects |
1502 | /// </summary> | 1503 | /// </summary> |
1503 | public virtual void LoadPrimsFromStorage(LLUUID regionID) | 1504 | public virtual void LoadPrimsFromStorage(UUID regionID) |
1504 | { | 1505 | { |
1505 | m_log.Info("[SCENE]: Loading objects from datastore"); | 1506 | m_log.Info("[SCENE]: Loading objects from datastore"); |
1506 | 1507 | ||
@@ -1509,7 +1510,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1509 | { | 1510 | { |
1510 | AddRestoredSceneObject(group, true, true); | 1511 | AddRestoredSceneObject(group, true, true); |
1511 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1512 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
1512 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; | 1513 | rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted; |
1513 | rootPart.TrimPermissions(); | 1514 | rootPart.TrimPermissions(); |
1514 | group.CheckSculptAndLoad(); | 1515 | group.CheckSculptAndLoad(); |
1515 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 1516 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
@@ -1533,20 +1534,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
1533 | return myID; | 1534 | return myID; |
1534 | } | 1535 | } |
1535 | 1536 | ||
1536 | public LLVector3 GetNewRezLocation(LLVector3 RayStart, LLVector3 RayEnd, LLUUID RayTargetID, LLQuaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, LLVector3 scale, bool FaceCenter) | 1537 | public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter) |
1537 | { | 1538 | { |
1538 | LLVector3 pos = LLVector3.Zero; | 1539 | Vector3 pos = Vector3.Zero; |
1539 | if (RayEndIsIntersection == (byte)1) | 1540 | if (RayEndIsIntersection == (byte)1) |
1540 | { | 1541 | { |
1541 | pos = RayEnd; | 1542 | pos = RayEnd; |
1542 | return pos; | 1543 | return pos; |
1543 | } | 1544 | } |
1544 | 1545 | ||
1545 | if (RayTargetID != LLUUID.Zero) | 1546 | if (RayTargetID != UUID.Zero) |
1546 | { | 1547 | { |
1547 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); | 1548 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); |
1548 | 1549 | ||
1549 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 1550 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
1550 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1551 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1551 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1552 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
1552 | 1553 | ||
@@ -1561,7 +1562,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1561 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 1562 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
1562 | 1563 | ||
1563 | // Ray Trace against target here | 1564 | // Ray Trace against target here |
1564 | EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1,0,0,0), frontFacesOnly, FaceCenter); | 1565 | EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter); |
1565 | 1566 | ||
1566 | // Un-comment out the following line to Get Raytrace results printed to the console. | 1567 | // Un-comment out the following line to Get Raytrace results printed to the console. |
1567 | // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); | 1568 | // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); |
@@ -1570,15 +1571,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1570 | // If we hit something | 1571 | // If we hit something |
1571 | if (ei.HitTF) | 1572 | if (ei.HitTF) |
1572 | { | 1573 | { |
1573 | LLVector3 scaleComponent = new LLVector3(ei.AAfaceNormal.x, ei.AAfaceNormal.y, ei.AAfaceNormal.z); | 1574 | Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z); |
1574 | if (scaleComponent.X != 0) ScaleOffset = scale.X; | 1575 | if (scaleComponent.X != 0) ScaleOffset = scale.X; |
1575 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; | 1576 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; |
1576 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; | 1577 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; |
1577 | ScaleOffset = Math.Abs(ScaleOffset); | 1578 | ScaleOffset = Math.Abs(ScaleOffset); |
1578 | LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); | 1579 | Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); |
1579 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); | 1580 | Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z); |
1580 | // Set the position to the intersection point | 1581 | // Set the position to the intersection point |
1581 | LLVector3 offset = (normal * (ScaleOffset / 2f)); | 1582 | Vector3 offset = (normal * (ScaleOffset / 2f)); |
1582 | pos = (intersectionpoint + offset); | 1583 | pos = (intersectionpoint + offset); |
1583 | 1584 | ||
1584 | // Un-offset the prim (it gets offset later by the consumer method) | 1585 | // Un-offset the prim (it gets offset later by the consumer method) |
@@ -1598,7 +1599,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1598 | 1599 | ||
1599 | if (ei.HitTF) | 1600 | if (ei.HitTF) |
1600 | { | 1601 | { |
1601 | pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); | 1602 | pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); |
1602 | } | 1603 | } |
1603 | 1604 | ||
1604 | return pos; | 1605 | return pos; |
@@ -1612,11 +1613,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1612 | } | 1613 | } |
1613 | } | 1614 | } |
1614 | 1615 | ||
1615 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, | 1616 | public virtual void AddNewPrim(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, |
1616 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1617 | byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, |
1617 | byte RayEndIsIntersection) | 1618 | byte RayEndIsIntersection) |
1618 | { | 1619 | { |
1619 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f, 0.5f, 0.5f), false); | 1620 | Vector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new Vector3(0.5f, 0.5f, 0.5f), false); |
1620 | 1621 | ||
1621 | if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos)) | 1622 | if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos)) |
1622 | { | 1623 | { |
@@ -1627,7 +1628,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1627 | } | 1628 | } |
1628 | } | 1629 | } |
1629 | 1630 | ||
1630 | public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) | 1631 | public virtual SceneObjectGroup AddNewPrim(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) |
1631 | { | 1632 | { |
1632 | //m_log.DebugFormat( | 1633 | //m_log.DebugFormat( |
1633 | // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); | 1634 | // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); |
@@ -1640,8 +1641,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1640 | //rootPart.TrimPermissions(); | 1641 | //rootPart.TrimPermissions(); |
1641 | if ((rootPart.Shape.PCode == (byte)PCode.Grass) || (rootPart.Shape.PCode == (byte)PCode.Tree) || (rootPart.Shape.PCode == (byte)PCode.NewTree)) | 1642 | if ((rootPart.Shape.PCode == (byte)PCode.Grass) || (rootPart.Shape.PCode == (byte)PCode.Tree) || (rootPart.Shape.PCode == (byte)PCode.NewTree)) |
1642 | { | 1643 | { |
1643 | rootPart.AddFlag(LLObject.ObjectFlags.Phantom); | 1644 | rootPart.AddFlag(PrimFlags.Phantom); |
1644 | //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; | 1645 | //rootPart.ObjectFlags += (uint)PrimFlags.Phantom; |
1645 | if (rootPart.Shape.PCode != (byte)PCode.Grass) | 1646 | if (rootPart.Shape.PCode != (byte)PCode.Grass) |
1646 | AdaptTree(ref shape); | 1647 | AdaptTree(ref shape); |
1647 | } | 1648 | } |
@@ -1658,20 +1659,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
1658 | { | 1659 | { |
1659 | case Tree.Cypress1: | 1660 | case Tree.Cypress1: |
1660 | case Tree.Cypress2: | 1661 | case Tree.Cypress2: |
1661 | tree.Scale = new LLVector3(4, 4, 10); | 1662 | tree.Scale = new Vector3(4, 4, 10); |
1662 | break; | 1663 | break; |
1663 | 1664 | ||
1664 | // case... other tree types | 1665 | // case... other tree types |
1665 | // tree.Scale = new LLVector3(?, ?, ?); | 1666 | // tree.Scale = new Vector3(?, ?, ?); |
1666 | // break; | 1667 | // break; |
1667 | 1668 | ||
1668 | default: | 1669 | default: |
1669 | tree.Scale = new LLVector3(4, 4, 4); | 1670 | tree.Scale = new Vector3(4, 4, 4); |
1670 | break; | 1671 | break; |
1671 | } | 1672 | } |
1672 | } | 1673 | } |
1673 | 1674 | ||
1674 | public SceneObjectGroup AddTree(LLUUID uuid, LLVector3 scale, LLQuaternion rotation, LLVector3 position, | 1675 | public SceneObjectGroup AddTree(UUID uuid, Vector3 scale, Quaternion rotation, Vector3 position, |
1675 | Tree treeType, bool newTree) | 1676 | Tree treeType, bool newTree) |
1676 | { | 1677 | { |
1677 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); | 1678 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); |
@@ -1771,7 +1772,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1771 | /// </summary> | 1772 | /// </summary> |
1772 | /// <param name="uuid"></param> | 1773 | /// <param name="uuid"></param> |
1773 | /// <returns>true if the object was in the scene, false if it was not</returns> | 1774 | /// <returns>true if the object was in the scene, false if it was not</returns> |
1774 | public bool UnlinkSceneObject(LLUUID uuid, bool resultOfLinkingObjects) | 1775 | public bool UnlinkSceneObject(UUID uuid, bool resultOfLinkingObjects) |
1775 | { | 1776 | { |
1776 | if (m_innerScene.DeleteSceneObject(uuid,resultOfLinkingObjects)) | 1777 | if (m_innerScene.DeleteSceneObject(uuid,resultOfLinkingObjects)) |
1777 | { | 1778 | { |
@@ -1783,7 +1784,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1783 | return false; | 1784 | return false; |
1784 | } | 1785 | } |
1785 | 1786 | ||
1786 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) | 1787 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, Vector3 loadOffset) |
1787 | { | 1788 | { |
1788 | m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); | 1789 | m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); |
1789 | 1790 | ||
@@ -1818,7 +1819,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1818 | m_serialiser.SavePrimsToXml2(this, fileName); | 1819 | m_serialiser.SavePrimsToXml2(this, fileName); |
1819 | } | 1820 | } |
1820 | 1821 | ||
1821 | public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max) | 1822 | public void SavePrimsToXml2(TextWriter stream, Vector3 min, Vector3 max) |
1822 | { | 1823 | { |
1823 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); | 1824 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); |
1824 | 1825 | ||
@@ -1876,7 +1877,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1876 | /// <param name="position">current position of Group</param> | 1877 | /// <param name="position">current position of Group</param> |
1877 | /// <param name="grp">Scene Object Group that we're crossing</param> | 1878 | /// <param name="grp">Scene Object Group that we're crossing</param> |
1878 | 1879 | ||
1879 | public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) | 1880 | public void CrossPrimGroupIntoNewRegion(Vector3 position, SceneObjectGroup grp) |
1880 | { | 1881 | { |
1881 | if (grp == null) | 1882 | if (grp == null) |
1882 | return; | 1883 | return; |
@@ -1897,12 +1898,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1897 | return; | 1898 | return; |
1898 | } | 1899 | } |
1899 | 1900 | ||
1900 | m_log.Warn("Prim crossing: " + grp.UUID.ToString()); | 1901 | m_log.Warn("Prim crossing: " + grp.ToString()); |
1901 | int thisx = (int)RegionInfo.RegionLocX; | 1902 | int thisx = (int)RegionInfo.RegionLocX; |
1902 | int thisy = (int)RegionInfo.RegionLocY; | 1903 | int thisy = (int)RegionInfo.RegionLocY; |
1903 | 1904 | ||
1904 | ulong newRegionHandle = 0; | 1905 | ulong newRegionHandle = 0; |
1905 | LLVector3 pos = position; | 1906 | Vector3 pos = position; |
1906 | 1907 | ||
1907 | if (position.X > Constants.RegionSize + 0.1f) | 1908 | if (position.X > Constants.RegionSize + 0.1f) |
1908 | { | 1909 | { |
@@ -1973,7 +1974,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1973 | } | 1974 | } |
1974 | } | 1975 | } |
1975 | 1976 | ||
1976 | public bool IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData, int XMLMethod) | 1977 | public bool IncomingInterRegionPrimGroup(ulong regionHandle, UUID primID, string objXMLData, int XMLMethod) |
1977 | { | 1978 | { |
1978 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); | 1979 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); |
1979 | if (XMLMethod == 0) | 1980 | if (XMLMethod == 0) |
@@ -2160,7 +2161,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2160 | } | 2161 | } |
2161 | 2162 | ||
2162 | // Gesture | 2163 | // Gesture |
2163 | public virtual void ActivateGesture(IClientAPI client, LLUUID assetId, LLUUID gestureId) | 2164 | public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId) |
2164 | { | 2165 | { |
2165 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); | 2166 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); |
2166 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); | 2167 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); |
@@ -2180,7 +2181,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2180 | m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString()); | 2181 | m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString()); |
2181 | } | 2182 | } |
2182 | 2183 | ||
2183 | public virtual void DeactivateGesture(IClientAPI client, LLUUID gestureId) | 2184 | public virtual void DeactivateGesture(IClientAPI client, UUID gestureId) |
2184 | { | 2185 | { |
2185 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); | 2186 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); |
2186 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); | 2187 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); |
@@ -2200,14 +2201,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2200 | m_log.DebugFormat("gesture : {0} ", gestureId.ToString()); | 2201 | m_log.DebugFormat("gesture : {0} ", gestureId.ToString()); |
2201 | } | 2202 | } |
2202 | 2203 | ||
2203 | public virtual void TeleportClientHome(LLUUID agentId, IClientAPI client) | 2204 | public virtual void TeleportClientHome(UUID agentId, IClientAPI client) |
2204 | { | 2205 | { |
2205 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); | 2206 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); |
2206 | if (UserProfile != null) | 2207 | if (UserProfile != null) |
2207 | { | 2208 | { |
2208 | LLUUID homeRegionID = UserProfile.HomeRegionID; | 2209 | UUID homeRegionID = UserProfile.HomeRegionID; |
2209 | ulong homeRegionHandle = UserProfile.HomeRegion; | 2210 | ulong homeRegionHandle = UserProfile.HomeRegion; |
2210 | if (homeRegionID == LLUUID.Zero) | 2211 | if (homeRegionID == UUID.Zero) |
2211 | { | 2212 | { |
2212 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); | 2213 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); |
2213 | if (info == null) | 2214 | if (info == null) |
@@ -2234,11 +2235,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2234 | } | 2235 | } |
2235 | } | 2236 | } |
2236 | 2237 | ||
2237 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, | 2238 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID, |
2238 | LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, | 2239 | UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart, |
2239 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) | 2240 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) |
2240 | { | 2241 | { |
2241 | LLVector3 pos; | 2242 | Vector3 pos; |
2242 | const bool frontFacesOnly = true; | 2243 | const bool frontFacesOnly = true; |
2243 | //m_log.Info("HITTARGET: " + RayTargetObj.ToString() + ", COPYTARGET: " + localID.ToString()); | 2244 | //m_log.Info("HITTARGET: " + RayTargetObj.ToString() + ", COPYTARGET: " + localID.ToString()); |
2244 | SceneObjectPart target = GetSceneObjectPart(localID); | 2245 | SceneObjectPart target = GetSceneObjectPart(localID); |
@@ -2246,7 +2247,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2246 | 2247 | ||
2247 | if (target != null && target2 != null) | 2248 | if (target != null && target2 != null) |
2248 | { | 2249 | { |
2249 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 2250 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
2250 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 2251 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
2251 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 2252 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
2252 | 2253 | ||
@@ -2261,7 +2262,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2261 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 2262 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
2262 | 2263 | ||
2263 | // Ray Trace against target here | 2264 | // Ray Trace against target here |
2264 | EntityIntersection ei = target2.TestIntersectionOBB(NewRay, new Quaternion(1, 0, 0, 0), frontFacesOnly, CopyCenters); | 2265 | EntityIntersection ei = target2.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, CopyCenters); |
2265 | 2266 | ||
2266 | // Un-comment out the following line to Get Raytrace results printed to the console. | 2267 | // Un-comment out the following line to Get Raytrace results printed to the console. |
2267 | //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); | 2268 | //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); |
@@ -2270,26 +2271,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
2270 | // If we hit something | 2271 | // If we hit something |
2271 | if (ei.HitTF) | 2272 | if (ei.HitTF) |
2272 | { | 2273 | { |
2273 | LLVector3 scale = target.Scale; | 2274 | Vector3 scale = target.Scale; |
2274 | LLVector3 scaleComponent = new LLVector3(ei.AAfaceNormal.x, ei.AAfaceNormal.y, ei.AAfaceNormal.z); | 2275 | Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z); |
2275 | if (scaleComponent.X != 0) ScaleOffset = scale.X; | 2276 | if (scaleComponent.X != 0) ScaleOffset = scale.X; |
2276 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; | 2277 | if (scaleComponent.Y != 0) ScaleOffset = scale.Y; |
2277 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; | 2278 | if (scaleComponent.Z != 0) ScaleOffset = scale.Z; |
2278 | ScaleOffset = Math.Abs(ScaleOffset); | 2279 | ScaleOffset = Math.Abs(ScaleOffset); |
2279 | LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); | 2280 | Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); |
2280 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); | 2281 | Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z); |
2281 | LLVector3 offset = normal * (ScaleOffset / 2f); | 2282 | Vector3 offset = normal * (ScaleOffset / 2f); |
2282 | pos = intersectionpoint + offset; | 2283 | pos = intersectionpoint + offset; |
2283 | 2284 | ||
2284 | // stick in offset format from the original prim | 2285 | // stick in offset format from the original prim |
2285 | pos = pos - target.ParentGroup.AbsolutePosition; | 2286 | pos = pos - target.ParentGroup.AbsolutePosition; |
2286 | if (CopyRotates) | 2287 | if (CopyRotates) |
2287 | { | 2288 | { |
2288 | LLQuaternion worldRot = target2.GetWorldRotation(); | 2289 | Quaternion worldRot = target2.GetWorldRotation(); |
2289 | 2290 | ||
2290 | // SceneObjectGroup obj = m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, new Quaternion(worldRot.W,worldRot.X,worldRot.Y,worldRot.Z)); | 2291 | // SceneObjectGroup obj = m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); |
2291 | m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, new Quaternion(worldRot.W,worldRot.X,worldRot.Y,worldRot.Z)); | 2292 | m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); |
2292 | //obj.Rotation = new Quaternion(worldRot.W, worldRot.X, worldRot.Y, worldRot.Z); | 2293 | //obj.Rotation = worldRot; |
2293 | //obj.UpdateGroupRotation(worldRot); | 2294 | //obj.UpdateGroupRotation(worldRot); |
2294 | } | 2295 | } |
2295 | else | 2296 | else |
@@ -2305,7 +2306,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2305 | } | 2306 | } |
2306 | } | 2307 | } |
2307 | 2308 | ||
2308 | public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags) | 2309 | public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) |
2309 | { | 2310 | { |
2310 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId); | 2311 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId); |
2311 | if (UserProfile != null) | 2312 | if (UserProfile != null) |
@@ -2369,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2369 | /// Remove the given client from the scene. | 2370 | /// Remove the given client from the scene. |
2370 | /// </summary> | 2371 | /// </summary> |
2371 | /// <param name="agentID"></param> | 2372 | /// <param name="agentID"></param> |
2372 | public override void RemoveClient(LLUUID agentID) | 2373 | public override void RemoveClient(UUID agentID) |
2373 | { | 2374 | { |
2374 | bool childagentYN = false; | 2375 | bool childagentYN = false; |
2375 | ScenePresence avatar = GetScenePresence(agentID); | 2376 | ScenePresence avatar = GetScenePresence(agentID); |
@@ -2420,7 +2421,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2420 | { | 2421 | { |
2421 | try | 2422 | try |
2422 | { | 2423 | { |
2423 | client.SendKillObject(avatar.RegionHandle, avatar.LocalId); | 2424 | client.SendKiPrimitive(avatar.RegionHandle, avatar.LocalId); |
2424 | } | 2425 | } |
2425 | catch (NullReferenceException) | 2426 | catch (NullReferenceException) |
2426 | { | 2427 | { |
@@ -2462,7 +2463,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2462 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 2463 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
2463 | } | 2464 | } |
2464 | 2465 | ||
2465 | public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) | 2466 | public void HandleRemoveKnownRegionsFromAvatar(UUID avatarID, List<ulong> regionslst) |
2466 | { | 2467 | { |
2467 | ScenePresence av = GetScenePresence(avatarID); | 2468 | ScenePresence av = GetScenePresence(avatarID); |
2468 | if (av != null) | 2469 | if (av != null) |
@@ -2493,7 +2494,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2493 | 2494 | ||
2494 | #region Entities | 2495 | #region Entities |
2495 | 2496 | ||
2496 | public void SendKillObject(uint localID) | 2497 | public void SendKiPrimitive(uint localID) |
2497 | { | 2498 | { |
2498 | SceneObjectPart part = GetSceneObjectPart(localID); | 2499 | SceneObjectPart part = GetSceneObjectPart(localID); |
2499 | if (part != null) // It is a prim | 2500 | if (part != null) // It is a prim |
@@ -2504,7 +2505,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2504 | return; | 2505 | return; |
2505 | } | 2506 | } |
2506 | } | 2507 | } |
2507 | Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); | 2508 | Broadcast(delegate(IClientAPI client) { client.SendKiPrimitive(m_regionHandle, localID); }); |
2508 | } | 2509 | } |
2509 | 2510 | ||
2510 | #endregion | 2511 | #endregion |
@@ -2524,7 +2525,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2524 | m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; | 2525 | m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; |
2525 | m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; | 2526 | m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; |
2526 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; | 2527 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; |
2527 | m_sceneGridService.KillObject += SendKillObject; | 2528 | m_sceneGridService.KiPrimitive += SendKiPrimitive; |
2528 | m_sceneGridService.OnGetLandData += GetLandData; | 2529 | m_sceneGridService.OnGetLandData += GetLandData; |
2529 | } | 2530 | } |
2530 | 2531 | ||
@@ -2533,7 +2534,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2533 | /// </summary> | 2534 | /// </summary> |
2534 | public void UnRegisterReginWithComms() | 2535 | public void UnRegisterReginWithComms() |
2535 | { | 2536 | { |
2536 | m_sceneGridService.KillObject -= SendKillObject; | 2537 | m_sceneGridService.KiPrimitive -= SendKiPrimitive; |
2537 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; | 2538 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; |
2538 | m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; | 2539 | m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; |
2539 | m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; | 2540 | m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; |
@@ -2574,7 +2575,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2574 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 2575 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |
2575 | if (land != null) | 2576 | if (land != null) |
2576 | { | 2577 | { |
2577 | if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != LLVector3.Zero) | 2578 | if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero) |
2578 | { | 2579 | { |
2579 | agent.startpos = land.landData.UserLocation; | 2580 | agent.startpos = land.landData.UserLocation; |
2580 | } | 2581 | } |
@@ -2608,7 +2609,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2608 | return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); | 2609 | return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); |
2609 | } | 2610 | } |
2610 | 2611 | ||
2611 | protected void HandleLogOffUserFromGrid(ulong regionHandle, LLUUID AvatarID, LLUUID RegionSecret, string message) | 2612 | protected void HandleLogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message) |
2612 | { | 2613 | { |
2613 | if (RegionInfo.RegionHandle == regionHandle) | 2614 | if (RegionInfo.RegionHandle == regionHandle) |
2614 | { | 2615 | { |
@@ -2645,7 +2646,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2645 | /// </summary> | 2646 | /// </summary> |
2646 | /// <param name="agentId"></param> | 2647 | /// <param name="agentId"></param> |
2647 | /// <param name="capsObjectPath"></param> | 2648 | /// <param name="capsObjectPath"></param> |
2648 | public void AddCapsHandler(LLUUID agentId) | 2649 | public void AddCapsHandler(UUID agentId) |
2649 | { | 2650 | { |
2650 | if (RegionInfo.EstateSettings.IsBanned(agentId)) | 2651 | if (RegionInfo.EstateSettings.IsBanned(agentId)) |
2651 | return; | 2652 | return; |
@@ -2670,7 +2671,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2670 | m_capsHandlers[agentId] = cap; | 2671 | m_capsHandlers[agentId] = cap; |
2671 | } | 2672 | } |
2672 | 2673 | ||
2673 | public Caps GetCapsHandlerForUser(LLUUID agentId) | 2674 | public Caps GetCapsHandlerForUser(UUID agentId) |
2674 | { | 2675 | { |
2675 | lock (m_capsHandlers) | 2676 | lock (m_capsHandlers) |
2676 | { | 2677 | { |
@@ -2686,7 +2687,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2686 | /// Remove the caps handler for a given agent. | 2687 | /// Remove the caps handler for a given agent. |
2687 | /// </summary> | 2688 | /// </summary> |
2688 | /// <param name="agentId"></param> | 2689 | /// <param name="agentId"></param> |
2689 | public void RemoveCapsHandler(LLUUID agentId) | 2690 | public void RemoveCapsHandler(UUID agentId) |
2690 | { | 2691 | { |
2691 | lock (m_capsHandlers) | 2692 | lock (m_capsHandlers) |
2692 | { | 2693 | { |
@@ -2717,7 +2718,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2717 | /// <param name="agentID"></param> | 2718 | /// <param name="agentID"></param> |
2718 | /// <param name="position"></param> | 2719 | /// <param name="position"></param> |
2719 | /// <param name="isFlying"></param> | 2720 | /// <param name="isFlying"></param> |
2720 | public virtual void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) | 2721 | public virtual void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying) |
2721 | { | 2722 | { |
2722 | if (regionHandle == m_regInfo.RegionHandle) | 2723 | if (regionHandle == m_regInfo.RegionHandle) |
2723 | { | 2724 | { |
@@ -2742,7 +2743,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2742 | 2743 | ||
2743 | public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 2744 | public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
2744 | { | 2745 | { |
2745 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); | 2746 | ScenePresence childAgentUpdate = GetScenePresence(new UUID(cAgentData.AgentID)); |
2746 | if (childAgentUpdate != null) | 2747 | if (childAgentUpdate != null) |
2747 | { | 2748 | { |
2748 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 2749 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
@@ -2768,7 +2769,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2768 | /// </summary> | 2769 | /// </summary> |
2769 | /// <param name="regionHandle"></param> | 2770 | /// <param name="regionHandle"></param> |
2770 | /// <param name="agentID"></param> | 2771 | /// <param name="agentID"></param> |
2771 | public bool CloseConnection(ulong regionHandle, LLUUID agentID) | 2772 | public bool CloseConnection(ulong regionHandle, UUID agentID) |
2772 | { | 2773 | { |
2773 | if (regionHandle == m_regionHandle) | 2774 | if (regionHandle == m_regionHandle) |
2774 | { | 2775 | { |
@@ -2850,8 +2851,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2850 | /// <param name="position"></param> | 2851 | /// <param name="position"></param> |
2851 | /// <param name="lookAt"></param> | 2852 | /// <param name="lookAt"></param> |
2852 | /// <param name="flags"></param> | 2853 | /// <param name="flags"></param> |
2853 | public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, LLVector3 position, | 2854 | public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position, |
2854 | LLVector3 lookat, uint flags) | 2855 | Vector3 lookat, uint flags) |
2855 | { | 2856 | { |
2856 | RegionInfo regionInfo = m_sceneGridService.RequestClosestRegion(regionName); | 2857 | RegionInfo regionInfo = m_sceneGridService.RequestClosestRegion(regionName); |
2857 | if (regionInfo == null) | 2858 | if (regionInfo == null) |
@@ -2871,8 +2872,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2871 | /// <param name="position"></param> | 2872 | /// <param name="position"></param> |
2872 | /// <param name="lookAt"></param> | 2873 | /// <param name="lookAt"></param> |
2873 | /// <param name="flags"></param> | 2874 | /// <param name="flags"></param> |
2874 | public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, | 2875 | public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position, |
2875 | LLVector3 lookAt, uint flags) | 2876 | Vector3 lookAt, uint flags) |
2876 | { | 2877 | { |
2877 | lock (m_scenePresences) | 2878 | lock (m_scenePresences) |
2878 | { | 2879 | { |
@@ -2890,7 +2891,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2890 | /// <param name="remoteClient"></param> | 2891 | /// <param name="remoteClient"></param> |
2891 | /// <param name="regionHandle"></param> | 2892 | /// <param name="regionHandle"></param> |
2892 | /// <param name="position"></param> | 2893 | /// <param name="position"></param> |
2893 | public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) | 2894 | public void RequestTeleportLandmark(IClientAPI remoteClient, UUID regionID, Vector3 position) |
2894 | { | 2895 | { |
2895 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); | 2896 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); |
2896 | 2897 | ||
@@ -2906,7 +2907,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2906 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) | 2907 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) |
2907 | { | 2908 | { |
2908 | m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], info.RegionHandle, | 2909 | m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], info.RegionHandle, |
2909 | position, LLVector3.Zero, 0); | 2910 | position, Vector3.Zero, 0); |
2910 | } | 2911 | } |
2911 | } | 2912 | } |
2912 | } | 2913 | } |
@@ -2919,7 +2920,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2919 | /// <param name="position"></param> | 2920 | /// <param name="position"></param> |
2920 | /// <param name="isFlying"></param> | 2921 | /// <param name="isFlying"></param> |
2921 | /// <returns></returns> | 2922 | /// <returns></returns> |
2922 | public bool InformNeighbourOfCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) | 2923 | public bool InformNeighbourOfCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying) |
2923 | { | 2924 | { |
2924 | return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying); | 2925 | return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying); |
2925 | } | 2926 | } |
@@ -3006,7 +3007,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3006 | objectCapacity = objects; | 3007 | objectCapacity = objects; |
3007 | } | 3008 | } |
3008 | 3009 | ||
3009 | public List<FriendListItem> GetFriendList(LLUUID avatarID) | 3010 | public List<FriendListItem> GetFriendList(UUID avatarID) |
3010 | { | 3011 | { |
3011 | return CommsManager.GetUserFriendList(avatarID); | 3012 | return CommsManager.GetUserFriendList(avatarID); |
3012 | } | 3013 | } |
@@ -3035,7 +3036,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3035 | /// <param name="groupOwned"></param> | 3036 | /// <param name="groupOwned"></param> |
3036 | /// <param name="message"></param> | 3037 | /// <param name="message"></param> |
3037 | /// <param name="url"></param> | 3038 | /// <param name="url"></param> |
3038 | public void SendUrlToUser(LLUUID avatarID, string objectName, LLUUID objectID, LLUUID ownerID, bool groupOwned, | 3039 | public void SendUrlToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, |
3039 | string message, string url) | 3040 | string message, string url) |
3040 | { | 3041 | { |
3041 | lock (m_scenePresences) | 3042 | lock (m_scenePresences) |
@@ -3048,7 +3049,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3048 | } | 3049 | } |
3049 | } | 3050 | } |
3050 | 3051 | ||
3051 | public void SendDialogToUser(LLUUID avatarID, string objectName, LLUUID objectID, LLUUID ownerID, string message, LLUUID TextureID, int ch, string[] buttonlabels) | 3052 | public void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string message, UUID TextureID, int ch, string[] buttonlabels) |
3052 | { | 3053 | { |
3053 | lock (m_scenePresences) | 3054 | lock (m_scenePresences) |
3054 | { | 3055 | { |
@@ -3067,13 +3068,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
3067 | /// <param name="type"></param> | 3068 | /// <param name="type"></param> |
3068 | /// <param name="body"></param> | 3069 | /// <param name="body"></param> |
3069 | /// <returns></returns> | 3070 | /// <returns></returns> |
3070 | public LLUUID MakeHttpRequest(string url, string type, string body) | 3071 | public UUID MakeHttpRequest(string url, string type, string body) |
3071 | { | 3072 | { |
3072 | if (m_httpRequestModule != null) | 3073 | if (m_httpRequestModule != null) |
3073 | { | 3074 | { |
3074 | return m_httpRequestModule.MakeHttpRequest(url, type, body); | 3075 | return m_httpRequestModule.MakeHttpRequest(url, type, body); |
3075 | } | 3076 | } |
3076 | return LLUUID.Zero; | 3077 | return UUID.Zero; |
3077 | } | 3078 | } |
3078 | 3079 | ||
3079 | /// <summary> | 3080 | /// <summary> |
@@ -3091,25 +3092,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
3091 | m_eventManager.TriggerGridInstantMessage(message, options); | 3092 | m_eventManager.TriggerGridInstantMessage(message, options); |
3092 | } | 3093 | } |
3093 | 3094 | ||
3094 | public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms) | 3095 | public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms) |
3095 | { | 3096 | { |
3096 | // TODO: m_sceneGridService.DoStuff; | 3097 | // TODO: m_sceneGridService.DoStuff; |
3097 | m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms); | 3098 | m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms); |
3098 | } | 3099 | } |
3099 | 3100 | ||
3100 | public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms) | 3101 | public virtual void StoreUpdateFriendship(UUID ownerID, UUID friendID, uint perms) |
3101 | { | 3102 | { |
3102 | // TODO: m_sceneGridService.DoStuff; | 3103 | // TODO: m_sceneGridService.DoStuff; |
3103 | m_sceneGridService.UpdateUserFriendPerms(ownerID, friendID, perms); | 3104 | m_sceneGridService.UpdateUserFriendPerms(ownerID, friendID, perms); |
3104 | } | 3105 | } |
3105 | 3106 | ||
3106 | public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID) | 3107 | public virtual void StoreRemoveFriendship(UUID ownerID, UUID ExfriendID) |
3107 | { | 3108 | { |
3108 | // TODO: m_sceneGridService.DoStuff; | 3109 | // TODO: m_sceneGridService.DoStuff; |
3109 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); | 3110 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); |
3110 | } | 3111 | } |
3111 | 3112 | ||
3112 | public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID) | 3113 | public virtual List<FriendListItem> StoreGetFriendsForUser(UUID ownerID) |
3113 | { | 3114 | { |
3114 | // TODO: m_sceneGridService.DoStuff; | 3115 | // TODO: m_sceneGridService.DoStuff; |
3115 | return m_sceneGridService.GetUserFriendList(ownerID); | 3116 | return m_sceneGridService.GetUserFriendList(ownerID); |
@@ -3144,7 +3145,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3144 | 3145 | ||
3145 | #region Alert Methods | 3146 | #region Alert Methods |
3146 | 3147 | ||
3147 | private void SendPermissionAlert(LLUUID user, string reason) | 3148 | private void SendPermissionAlert(UUID user, string reason) |
3148 | { | 3149 | { |
3149 | SendAlertToUser(user, reason, false); | 3150 | SendAlertToUser(user, reason, false); |
3150 | } | 3151 | } |
@@ -3170,7 +3171,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3170 | /// <param name="agentID"></param> | 3171 | /// <param name="agentID"></param> |
3171 | /// <param name="message"></param> | 3172 | /// <param name="message"></param> |
3172 | /// <param name="modal"></param> | 3173 | /// <param name="modal"></param> |
3173 | public void SendAlertToUser(LLUUID agentID, string message, bool modal) | 3174 | public void SendAlertToUser(UUID agentID, string message, bool modal) |
3174 | { | 3175 | { |
3175 | lock (m_scenePresences) | 3176 | lock (m_scenePresences) |
3176 | { | 3177 | { |
@@ -3188,7 +3189,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3188 | /// <param name="sessionID"></param> | 3189 | /// <param name="sessionID"></param> |
3189 | /// <param name="token"></param> | 3190 | /// <param name="token"></param> |
3190 | /// <param name="controllingClient"></param> | 3191 | /// <param name="controllingClient"></param> |
3191 | public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godLike, | 3192 | public void handleRequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike, |
3192 | IClientAPI controllingClient) | 3193 | IClientAPI controllingClient) |
3193 | { | 3194 | { |
3194 | lock (m_scenePresences) | 3195 | lock (m_scenePresences) |
@@ -3200,7 +3201,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3200 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) | 3201 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) |
3201 | { | 3202 | { |
3202 | // Next we check for spoofing..... | 3203 | // Next we check for spoofing..... |
3203 | LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId; | 3204 | UUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId; |
3204 | if (sessionID == testSessionID) | 3205 | if (sessionID == testSessionID) |
3205 | { | 3206 | { |
3206 | if (sessionID == controllingClient.SessionId) | 3207 | if (sessionID == controllingClient.SessionId) |
@@ -3226,7 +3227,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3226 | /// <param name="fromSessionID">The session of the person sending the message</param> | 3227 | /// <param name="fromSessionID">The session of the person sending the message</param> |
3227 | /// <param name="FromAvatarName">The name of the person doing the sending</param> | 3228 | /// <param name="FromAvatarName">The name of the person doing the sending</param> |
3228 | /// <param name="Message">The Message being sent to the user</param> | 3229 | /// <param name="Message">The Message being sent to the user</param> |
3229 | public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) | 3230 | public void SendRegionMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) |
3230 | { | 3231 | { |
3231 | List<ScenePresence> presenceList = GetScenePresences(); | 3232 | List<ScenePresence> presenceList = GetScenePresences(); |
3232 | 3233 | ||
@@ -3245,7 +3246,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3245 | /// <param name="fromSessionID">The session of the person sending the message</param> | 3246 | /// <param name="fromSessionID">The session of the person sending the message</param> |
3246 | /// <param name="FromAvatarName">The name of the person doing the sending</param> | 3247 | /// <param name="FromAvatarName">The name of the person doing the sending</param> |
3247 | /// <param name="Message">The Message being sent to the user</param> | 3248 | /// <param name="Message">The Message being sent to the user</param> |
3248 | public void SendEstateMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) | 3249 | public void SendEstateMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) |
3249 | { | 3250 | { |
3250 | 3251 | ||
3251 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 3252 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
@@ -3266,10 +3267,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3266 | /// <param name="agentID">the person that is being kicked</param> | 3267 | /// <param name="agentID">the person that is being kicked</param> |
3267 | /// <param name="kickflags">This isn't used apparently</param> | 3268 | /// <param name="kickflags">This isn't used apparently</param> |
3268 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> | 3269 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> |
3269 | public void HandleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) | 3270 | public void HandleGodlikeKickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason) |
3270 | { | 3271 | { |
3271 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. | 3272 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. |
3272 | LLUUID kickUserID = new LLUUID("44e87126e7944ded05b37c42da3d5cdb"); | 3273 | UUID kickUserID = new UUID("44e87126e7944ded05b37c42da3d5cdb"); |
3273 | lock (m_scenePresences) | 3274 | lock (m_scenePresences) |
3274 | { | 3275 | { |
3275 | if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID) | 3276 | if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID) |
@@ -3281,7 +3282,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3281 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 3282 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
3282 | { | 3283 | { |
3283 | if (controller.AgentId != godID) | 3284 | if (controller.AgentId != godID) |
3284 | controller.Kick(Helpers.FieldToUTF8String(reason)); | 3285 | controller.Kick(Utils.BytesToString(reason)); |
3285 | } | 3286 | } |
3286 | ); | 3287 | ); |
3287 | 3288 | ||
@@ -3304,7 +3305,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3304 | { | 3305 | { |
3305 | m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent); | 3306 | m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent); |
3306 | 3307 | ||
3307 | m_scenePresences[agentID].ControllingClient.Kick(Helpers.FieldToUTF8String(reason)); | 3308 | m_scenePresences[agentID].ControllingClient.Kick(Utils.BytesToString(reason)); |
3308 | m_scenePresences[agentID].ControllingClient.Close(true); | 3309 | m_scenePresences[agentID].ControllingClient.Close(true); |
3309 | } | 3310 | } |
3310 | } | 3311 | } |
@@ -3317,7 +3318,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3317 | } | 3318 | } |
3318 | } | 3319 | } |
3319 | 3320 | ||
3320 | public void HandleObjectPermissionsUpdate(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set) | 3321 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) |
3321 | { | 3322 | { |
3322 | // Check for spoofing.. since this is permissions we're talking about here! | 3323 | // Check for spoofing.. since this is permissions we're talking about here! |
3323 | if ((controller.SessionId == sessionID) && (controller.AgentId == agentID)) | 3324 | if ((controller.SessionId == sessionID) && (controller.AgentId == agentID)) |
@@ -3423,7 +3424,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3423 | if (part.Name == cmdparams[0]) | 3424 | if (part.Name == cmdparams[0]) |
3424 | { | 3425 | { |
3425 | part.Resize( | 3426 | part.Resize( |
3426 | new LLVector3(Convert.ToSingle(cmdparams[1]), Convert.ToSingle(cmdparams[2]), | 3427 | new Vector3(Convert.ToSingle(cmdparams[1]), Convert.ToSingle(cmdparams[2]), |
3427 | Convert.ToSingle(cmdparams[3]))); | 3428 | Convert.ToSingle(cmdparams[3]))); |
3428 | 3429 | ||
3429 | Console.WriteLine("Edited scale of Primitive: " + part.Name); | 3430 | Console.WriteLine("Edited scale of Primitive: " + part.Name); |
@@ -3489,12 +3490,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
3489 | return Heightmap[x, y]; | 3490 | return Heightmap[x, y]; |
3490 | } | 3491 | } |
3491 | 3492 | ||
3492 | public LLUUID GetLandOwner(float x, float y) | 3493 | public UUID GetLandOwner(float x, float y) |
3493 | { | 3494 | { |
3494 | ILandObject land = LandChannel.GetLandObject(x, y); | 3495 | ILandObject land = LandChannel.GetLandObject(x, y); |
3495 | if (land == null) | 3496 | if (land == null) |
3496 | { | 3497 | { |
3497 | return LLUUID.Zero; | 3498 | return UUID.Zero; |
3498 | } | 3499 | } |
3499 | else | 3500 | else |
3500 | { | 3501 | { |
@@ -3570,7 +3571,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3570 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); | 3571 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); |
3571 | } | 3572 | } |
3572 | 3573 | ||
3573 | public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) | 3574 | public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos) |
3574 | { | 3575 | { |
3575 | m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos); | 3576 | m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos); |
3576 | } | 3577 | } |
@@ -3580,7 +3581,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3580 | m_eventManager.TriggerNotAtTargetEvent(localID); | 3581 | m_eventManager.TriggerNotAtTargetEvent(localID); |
3581 | } | 3582 | } |
3582 | 3583 | ||
3583 | private bool scriptDanger(SceneObjectPart part,LLVector3 pos) | 3584 | private bool scriptDanger(SceneObjectPart part,Vector3 pos) |
3584 | { | 3585 | { |
3585 | ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y); | 3586 | ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y); |
3586 | if (part != null) | 3587 | if (part != null) |
@@ -3636,7 +3637,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3636 | } | 3637 | } |
3637 | } | 3638 | } |
3638 | 3639 | ||
3639 | public bool scriptDanger(uint localID, LLVector3 pos) | 3640 | public bool scriptDanger(uint localID, Vector3 pos) |
3640 | { | 3641 | { |
3641 | SceneObjectPart part = GetSceneObjectPart(localID); | 3642 | SceneObjectPart part = GetSceneObjectPart(localID); |
3642 | if (part != null) | 3643 | if (part != null) |
@@ -3678,7 +3679,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3678 | /// </summary> | 3679 | /// </summary> |
3679 | /// <param name="localID"></param> | 3680 | /// <param name="localID"></param> |
3680 | /// <returns></returns> | 3681 | /// <returns></returns> |
3681 | public LLUUID ConvertLocalIDToFullID(uint localID) | 3682 | public UUID ConvertLocalIDToFullID(uint localID) |
3682 | { | 3683 | { |
3683 | return m_innerScene.ConvertLocalIDToFullID(localID); | 3684 | return m_innerScene.ConvertLocalIDToFullID(localID); |
3684 | } | 3685 | } |
@@ -3737,7 +3738,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3737 | /// </summary> | 3738 | /// </summary> |
3738 | /// <param name="avatarID"></param> | 3739 | /// <param name="avatarID"></param> |
3739 | /// <returns></returns> | 3740 | /// <returns></returns> |
3740 | public ScenePresence GetScenePresence(LLUUID avatarID) | 3741 | public ScenePresence GetScenePresence(UUID avatarID) |
3741 | { | 3742 | { |
3742 | return m_innerScene.GetScenePresence(avatarID); | 3743 | return m_innerScene.GetScenePresence(avatarID); |
3743 | } | 3744 | } |
@@ -3747,7 +3748,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3747 | /// </summary> | 3748 | /// </summary> |
3748 | /// <param name="avatarID">AvatarID to lookup</param> | 3749 | /// <param name="avatarID">AvatarID to lookup</param> |
3749 | /// <returns></returns> | 3750 | /// <returns></returns> |
3750 | public override bool PresenceChildStatus(LLUUID avatarID) | 3751 | public override bool PresenceChildStatus(UUID avatarID) |
3751 | { | 3752 | { |
3752 | ScenePresence cp = GetScenePresence(avatarID); | 3753 | ScenePresence cp = GetScenePresence(avatarID); |
3753 | return cp.IsChildAgent; | 3754 | return cp.IsChildAgent; |
@@ -3811,12 +3812,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
3811 | /// </summary> | 3812 | /// </summary> |
3812 | /// <param name="fullID"></param> | 3813 | /// <param name="fullID"></param> |
3813 | /// <returns></returns> | 3814 | /// <returns></returns> |
3814 | public SceneObjectPart GetSceneObjectPart(LLUUID fullID) | 3815 | public SceneObjectPart GetSceneObjectPart(UUID fullID) |
3815 | { | 3816 | { |
3816 | return m_innerScene.GetSceneObjectPart(fullID); | 3817 | return m_innerScene.GetSceneObjectPart(fullID); |
3817 | } | 3818 | } |
3818 | 3819 | ||
3819 | internal bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar) | 3820 | internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) |
3820 | { | 3821 | { |
3821 | return m_innerScene.TryGetAvatar(avatarId, out avatar); | 3822 | return m_innerScene.TryGetAvatar(avatarId, out avatar); |
3822 | } | 3823 | } |
@@ -3921,7 +3922,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3921 | // }); | 3922 | // }); |
3922 | } | 3923 | } |
3923 | 3924 | ||
3924 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) | 3925 | public void RegionHandleRequest(IClientAPI client, UUID regionID) |
3925 | { | 3926 | { |
3926 | RegionInfo info; | 3927 | RegionInfo info; |
3927 | if (regionID == RegionInfo.RegionID) | 3928 | if (regionID == RegionInfo.RegionID) |
@@ -3939,7 +3940,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3939 | client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); | 3940 | client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); |
3940 | } | 3941 | } |
3941 | 3942 | ||
3942 | public void SetRootAgentScene(LLUUID agentID) | 3943 | public void SetRootAgentScene(UUID agentID) |
3943 | { | 3944 | { |
3944 | IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); | 3945 | IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); |
3945 | if (inv == null) | 3946 | if (inv == null) |
@@ -3948,7 +3949,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3948 | inv.SetRootAgentScene(agentID, this); | 3949 | inv.SetRootAgentScene(agentID, this); |
3949 | } | 3950 | } |
3950 | 3951 | ||
3951 | public bool NeedSceneCacheClear(LLUUID agentID) | 3952 | public bool NeedSceneCacheClear(UUID agentID) |
3952 | { | 3953 | { |
3953 | IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); | 3954 | IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); |
3954 | if (inv == null) | 3955 | if (inv == null) |
@@ -3957,7 +3958,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3957 | return inv.NeedSceneCacheClear(agentID, this); | 3958 | return inv.NeedSceneCacheClear(agentID, this); |
3958 | } | 3959 | } |
3959 | 3960 | ||
3960 | public void ObjectSaleInfo(IClientAPI client, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice) | 3961 | public void ObjectSaleInfo(IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
3961 | { | 3962 | { |
3962 | SceneObjectPart part = GetSceneObjectPart(localID); | 3963 | SceneObjectPart part = GetSceneObjectPart(localID); |
3963 | if (part == null || part.ParentGroup == null) | 3964 | if (part == null || part.ParentGroup == null) |
@@ -3976,7 +3977,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3976 | part.GetProperties(client); | 3977 | part.GetProperties(client); |
3977 | } | 3978 | } |
3978 | 3979 | ||
3979 | public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID, | 3980 | public void PerformObjectBuy(IClientAPI remoteClient, UUID categoryID, |
3980 | uint localID, byte saleType) | 3981 | uint localID, byte saleType) |
3981 | { | 3982 | { |
3982 | SceneObjectPart part = GetSceneObjectPart(localID); | 3983 | SceneObjectPart part = GetSceneObjectPart(localID); |
@@ -4031,13 +4032,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
4031 | group.GetPartName(localID), | 4032 | group.GetPartName(localID), |
4032 | group.GetPartDescription(localID), | 4033 | group.GetPartDescription(localID), |
4033 | (sbyte)AssetType.Object, | 4034 | (sbyte)AssetType.Object, |
4034 | Helpers.StringToField(sceneObjectXml)); | 4035 | Utils.StringToBytes(sceneObjectXml)); |
4035 | AssetCache.AddAsset(asset); | 4036 | AssetCache.AddAsset(asset); |
4036 | 4037 | ||
4037 | InventoryItemBase item = new InventoryItemBase(); | 4038 | InventoryItemBase item = new InventoryItemBase(); |
4038 | item.Creator = part.CreatorID; | 4039 | item.Creator = part.CreatorID; |
4039 | 4040 | ||
4040 | item.ID = LLUUID.Random(); | 4041 | item.ID = UUID.Random(); |
4041 | item.Owner = remoteClient.AgentId; | 4042 | item.Owner = remoteClient.AgentId; |
4042 | item.AssetID = asset.FullID; | 4043 | item.AssetID = asset.FullID; |
4043 | item.Description = asset.Description; | 4044 | item.Description = asset.Description; |
@@ -4069,7 +4070,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4069 | break; | 4070 | break; |
4070 | 4071 | ||
4071 | case 3: // Sell contents | 4072 | case 3: // Sell contents |
4072 | List<LLUUID> invList = part.GetInventoryList(); | 4073 | List<UUID> invList = part.GetInventoryList(); |
4073 | 4074 | ||
4074 | if (invList.Count > 0) | 4075 | if (invList.Count > 0) |
4075 | MoveTaskInventoryItems(remoteClient.AgentId, part.Name, | 4076 | MoveTaskInventoryItems(remoteClient.AgentId, part.Name, |