aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-16 14:10:54 +0000
committerTeravus Ovares2008-04-16 14:10:54 +0000
commit7c1f17b994ca987df2167101054f523cc33d7fb9 (patch)
tree19c74ddb0973e84fb6c2b31493efa4847a7b4f44 /OpenSim/Region/Environment
parentAfter reading Timer.cs in the mono source, I'm not (diff)
downloadopensim-SC-7c1f17b994ca987df2167101054f523cc33d7fb9.zip
opensim-SC-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.gz
opensim-SC-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.bz2
opensim-SC-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.xz
* Applying melanie's Landmark patch. Thanks Melanie!
* To make a landmark, you currently have to enable admin options in the advanced menu first. We're working on this.. however use the admin options solution in the mean time.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
3 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 97d09aa..ff0f3a7 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -545,7 +545,20 @@ namespace OpenSim.Region.Environment.Scenes
545 545
546 if (userInfo != null) 546 if (userInfo != null)
547 { 547 {
548 AssetBase asset = CreateAsset(name, description, invType, assetType, null); 548 ScenePresence presence;
549 TryGetAvatar(remoteClient.AgentId, out presence);
550 byte[] data = null;
551 if(invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum
552 {
553 LLVector3 pos=presence.AbsolutePosition;
554 string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
555 presence.Scene.RegionInfo.RegionID,
556 pos.X, pos.Y, pos.Z,
557 presence.RegionHandle);
558 data=Encoding.ASCII.GetBytes(strdata);
559 }
560
561 AssetBase asset = CreateAsset(name, description, invType, assetType, data);
549 AssetCache.AddAsset(asset); 562 AssetCache.AddAsset(asset);
550 563
551 CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); 564 CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 464926d..08cf3d8 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1518,6 +1518,7 @@ namespace OpenSim.Region.Environment.Scenes
1518 client.OnRequestMapBlocks += RequestMapBlocks; 1518 client.OnRequestMapBlocks += RequestMapBlocks;
1519 client.OnUpdatePrimTexture += m_innerScene.UpdatePrimTexture; 1519 client.OnUpdatePrimTexture += m_innerScene.UpdatePrimTexture;
1520 client.OnTeleportLocationRequest += RequestTeleportLocation; 1520 client.OnTeleportLocationRequest += RequestTeleportLocation;
1521 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
1521 client.OnObjectSelect += SelectPrim; 1522 client.OnObjectSelect += SelectPrim;
1522 client.OnObjectDeselect += DeselectPrim; 1523 client.OnObjectDeselect += DeselectPrim;
1523 client.OnGrabUpdate += m_innerScene.MoveObject; 1524 client.OnGrabUpdate += m_innerScene.MoveObject;
@@ -2082,6 +2083,21 @@ namespace OpenSim.Region.Environment.Scenes
2082 } 2083 }
2083 2084
2084 /// <summary> 2085 /// <summary>
2086 /// Tries to teleport agent to landmark.
2087 /// </summary>
2088 /// <param name="remoteClient"></param>
2089 /// <param name="regionHandle"></param>
2090 /// <param name="position"></param>
2091 public void RequestTeleportLandmark(IClientAPI remoteClient, ulong regionHandle, LLVector3 position)
2092 {
2093 if (m_scenePresences.ContainsKey(remoteClient.AgentId))
2094 {
2095 m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], regionHandle,
2096 position, LLVector3.Zero, 0);
2097 }
2098 }
2099
2100 /// <summary>
2085 /// Agent is crossing the border into a neighbouring region. Tell the neighbour about it! 2101 /// Agent is crossing the border into a neighbouring region. Tell the neighbour about it!
2086 /// </summary> 2102 /// </summary>
2087 /// <param name="regionHandle"></param> 2103 /// <param name="regionHandle"></param>
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 795224e..8b8373d 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -270,6 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
270 } 270 }
271 271
272 m_pos = value; 272 m_pos = value;
273 m_parentPosition=new LLVector3(0, 0, 0);
273 } 274 }
274 } 275 }
275 276
@@ -602,7 +603,10 @@ namespace OpenSim.Region.Environment.Scenes
602 /// <param name="pos"></param> 603 /// <param name="pos"></param>
603 public void Teleport(LLVector3 pos) 604 public void Teleport(LLVector3 pos)
604 { 605 {
606 RemoveFromPhysicalScene();
607 Velocity = new LLVector3(0, 0, 0);
605 AbsolutePosition = pos; 608 AbsolutePosition = pos;
609 AddToPhysicalScene();
606 SendTerseUpdateToAllClients(); 610 SendTerseUpdateToAllClients();
607 } 611 }
608 612