diff options
author | Robert Adams | 2014-01-26 19:32:28 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-26 19:32:28 -0800 |
commit | 49af6b53e74123ccebdbd411d456cb8bae528d61 (patch) | |
tree | fc636f3cb3b497c2241633d2908d6882f8d5bfa2 /OpenSim/Framework | |
parent | Merge branch 'master' into varregion (diff) | |
download | opensim-SC_OLD-49af6b53e74123ccebdbd411d456cb8bae528d61.zip opensim-SC_OLD-49af6b53e74123ccebdbd411d456cb8bae528d61.tar.gz opensim-SC_OLD-49af6b53e74123ccebdbd411d456cb8bae528d61.tar.bz2 opensim-SC_OLD-49af6b53e74123ccebdbd411d456cb8bae528d61.tar.xz |
varregion: enable teleporting to a varregion by clicking on the map and
pressing the 'teleport' button.
This commit adds returning region map info for all the subregions of a
varregion. This also handles the selection of the extra region and then
the displacement of the postion so the teleport is to the correct location.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/MapBlockData.cs | 18 | ||||
-rw-r--r-- | OpenSim/Framework/MapItemReplyStruct.cs | 33 |
2 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Framework/MapBlockData.cs b/OpenSim/Framework/MapBlockData.cs index 2298ac5..4bee499 100644 --- a/OpenSim/Framework/MapBlockData.cs +++ b/OpenSim/Framework/MapBlockData.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenMetaverse.StructuredData; | ||
30 | 31 | ||
31 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
32 | { | 33 | { |
@@ -40,9 +41,26 @@ namespace OpenSim.Framework | |||
40 | public byte WaterHeight; | 41 | public byte WaterHeight; |
41 | public ushort X; | 42 | public ushort X; |
42 | public ushort Y; | 43 | public ushort Y; |
44 | public ushort SizeX; | ||
45 | public ushort SizeY; | ||
43 | 46 | ||
44 | public MapBlockData() | 47 | public MapBlockData() |
45 | { | 48 | { |
46 | } | 49 | } |
50 | |||
51 | public OSDMap ToOSD() | ||
52 | { | ||
53 | OSDMap map = new OSDMap(); | ||
54 | map["X"] = X; | ||
55 | map["Y"] = Y; | ||
56 | map["SizeX"] = SizeX; | ||
57 | map["SizeY"] = SizeY; | ||
58 | map["Name"] = Name; | ||
59 | map["Access"] = Access; | ||
60 | map["RegionFlags"] = RegionFlags; | ||
61 | map["WaterHeight"] = WaterHeight; | ||
62 | map["MapImageID"] = MapImageId; | ||
63 | return map; | ||
64 | } | ||
47 | } | 65 | } |
48 | } | 66 | } |
diff --git a/OpenSim/Framework/MapItemReplyStruct.cs b/OpenSim/Framework/MapItemReplyStruct.cs index 58011bd..c8693ae 100644 --- a/OpenSim/Framework/MapItemReplyStruct.cs +++ b/OpenSim/Framework/MapItemReplyStruct.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenMetaverse; | 28 | using OpenMetaverse; |
29 | using OpenMetaverse.StructuredData; | ||
29 | 30 | ||
30 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
31 | { | 32 | { |
@@ -37,5 +38,37 @@ namespace OpenSim.Framework | |||
37 | public int Extra; | 38 | public int Extra; |
38 | public int Extra2; | 39 | public int Extra2; |
39 | public string name; | 40 | public string name; |
41 | |||
42 | public mapItemReply(uint pX, uint pY, UUID pId, string pName, int pExt1, int pExt2) | ||
43 | { | ||
44 | x = pX; | ||
45 | y = pY; | ||
46 | id = pId; | ||
47 | name = pName; | ||
48 | Extra = pExt1; | ||
49 | Extra2 = pExt2; | ||
50 | } | ||
51 | |||
52 | public OSDMap ToOSD() | ||
53 | { | ||
54 | OSDMap map = new OSDMap(); | ||
55 | map["X"] = OSD.FromInteger((int)x); | ||
56 | map["Y"] = OSD.FromInteger((int)y); | ||
57 | map["ID"] = OSD.FromUUID(id); | ||
58 | map["Name"] = OSD.FromString(name); | ||
59 | map["Extra"] = OSD.FromInteger(Extra); | ||
60 | map["Extra2"] = OSD.FromInteger(Extra2); | ||
61 | return map; | ||
62 | } | ||
63 | |||
64 | public void FromOSD(OSDMap map) | ||
65 | { | ||
66 | x = (uint) map["X"].AsInteger(); | ||
67 | y = (uint) map["Y"].AsInteger(); | ||
68 | id = map["ID"].AsUUID(); | ||
69 | Extra = map["Extra"].AsInteger(); | ||
70 | Extra2 = map["Extra2"].AsInteger(); | ||
71 | name = map["Name"].AsString(); | ||
72 | } | ||
40 | } | 73 | } |
41 | } | 74 | } |