diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/General/Types/AgentCiruitData.cs | 98 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/AgentWearable.cs | 114 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/AssetBase.cs | 92 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/AssetLandmark.cs | 118 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/AssetStorage.cs | 94 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/EstateSettings.cs | 186 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/Login.cs | 98 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/MapBlockData.cs | 46 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/NeighbourInfo.cs | 84 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/NetworkServersInfo.cs | 438 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/ParcelData.cs | 240 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/PrimData.cs | 456 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 218 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/RegionHandle.cs | 242 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/RegionInfo.cs | 684 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/UUID.cs | 254 |
16 files changed, 1731 insertions, 1731 deletions
diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs index ed9ee3c..36bb26d 100644 --- a/OpenSim/Framework/General/Types/AgentCiruitData.cs +++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs | |||
@@ -1,49 +1,49 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | using System; | 29 | using System; |
30 | 30 | ||
31 | namespace OpenSim.Framework.Types | 31 | namespace OpenSim.Framework.Types |
32 | { | 32 | { |
33 | [Serializable] | 33 | [Serializable] |
34 | public class AgentCircuitData | 34 | public class AgentCircuitData |
35 | { | 35 | { |
36 | public AgentCircuitData() { } | 36 | public AgentCircuitData() { } |
37 | public LLUUID AgentID; | 37 | public LLUUID AgentID; |
38 | public LLUUID SessionID; | 38 | public LLUUID SessionID; |
39 | public LLUUID SecureSessionID; | 39 | public LLUUID SecureSessionID; |
40 | public LLVector3 startpos; | 40 | public LLVector3 startpos; |
41 | public string firstname; | 41 | public string firstname; |
42 | public string lastname; | 42 | public string lastname; |
43 | public uint circuitcode; | 43 | public uint circuitcode; |
44 | public bool child; | 44 | public bool child; |
45 | public LLUUID InventoryFolder; | 45 | public LLUUID InventoryFolder; |
46 | public LLUUID BaseFolder; | 46 | public LLUUID BaseFolder; |
47 | public string CapsPath = ""; | 47 | public string CapsPath = ""; |
48 | } | 48 | } |
49 | } | 49 | } |
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs index 6152b7d..404df0d 100644 --- a/OpenSim/Framework/General/Types/AgentWearable.cs +++ b/OpenSim/Framework/General/Types/AgentWearable.cs | |||
@@ -1,57 +1,57 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | public class AvatarWearable | 32 | public class AvatarWearable |
33 | { | 33 | { |
34 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 34 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
35 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 35 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
36 | 36 | ||
37 | public AvatarWearable() | 37 | public AvatarWearable() |
38 | { | 38 | { |
39 | 39 | ||
40 | } | 40 | } |
41 | 41 | ||
42 | public static AvatarWearable[] DefaultWearables | 42 | public static AvatarWearable[] DefaultWearables |
43 | { | 43 | { |
44 | get | 44 | get |
45 | { | 45 | { |
46 | AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these | 46 | AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these |
47 | for (int i = 0; i < 13; i++) | 47 | for (int i = 0; i < 13; i++) |
48 | { | 48 | { |
49 | defaultWearables[i] = new AvatarWearable(); | 49 | defaultWearables[i] = new AvatarWearable(); |
50 | } | 50 | } |
51 | defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); | 51 | defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); |
52 | defaultWearables[0].ItemID = LLUUID.Random(); | 52 | defaultWearables[0].ItemID = LLUUID.Random(); |
53 | return defaultWearables; | 53 | return defaultWearables; |
54 | } | 54 | } |
55 | } | 55 | } |
56 | } | 56 | } |
57 | } | 57 | } |
diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs index c203f51..181e1e3 100644 --- a/OpenSim/Framework/General/Types/AssetBase.cs +++ b/OpenSim/Framework/General/Types/AssetBase.cs | |||
@@ -1,46 +1,46 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | public class AssetBase | 32 | public class AssetBase |
33 | { | 33 | { |
34 | public byte[] Data; | 34 | public byte[] Data; |
35 | public LLUUID FullID; | 35 | public LLUUID FullID; |
36 | public sbyte Type; | 36 | public sbyte Type; |
37 | public sbyte InvType; | 37 | public sbyte InvType; |
38 | public string Name; | 38 | public string Name; |
39 | public string Description; | 39 | public string Description; |
40 | 40 | ||
41 | public AssetBase() | 41 | public AssetBase() |
42 | { | 42 | { |
43 | 43 | ||
44 | } | 44 | } |
45 | } | 45 | } |
46 | } | 46 | } |
diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs index 8aa872e..7cec6f6 100644 --- a/OpenSim/Framework/General/Types/AssetLandmark.cs +++ b/OpenSim/Framework/General/Types/AssetLandmark.cs | |||
@@ -1,59 +1,59 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Text; | 28 | using System.Text; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework.Types | 31 | namespace OpenSim.Framework.Types |
32 | { | 32 | { |
33 | public class AssetLandmark : AssetBase | 33 | public class AssetLandmark : AssetBase |
34 | { | 34 | { |
35 | public int Version; | 35 | public int Version; |
36 | public LLVector3 Position; | 36 | public LLVector3 Position; |
37 | public LLUUID RegionID; | 37 | public LLUUID RegionID; |
38 | 38 | ||
39 | public AssetLandmark(AssetBase a) | 39 | public AssetLandmark(AssetBase a) |
40 | { | 40 | { |
41 | this.Data = a.Data; | 41 | this.Data = a.Data; |
42 | this.FullID = a.FullID; | 42 | this.FullID = a.FullID; |
43 | this.Type = a.Type; | 43 | this.Type = a.Type; |
44 | this.InvType = a.InvType; | 44 | this.InvType = a.InvType; |
45 | this.Name = a.Name; | 45 | this.Name = a.Name; |
46 | this.Description = a.Description; | 46 | this.Description = a.Description; |
47 | InternData(); | 47 | InternData(); |
48 | } | 48 | } |
49 | 49 | ||
50 | private void InternData() | 50 | private void InternData() |
51 | { | 51 | { |
52 | string temp = Encoding.UTF8.GetString(Data).Trim(); | 52 | string temp = Encoding.UTF8.GetString(Data).Trim(); |
53 | string[] parts = temp.Split('\n'); | 53 | string[] parts = temp.Split('\n'); |
54 | int.TryParse(parts[0].Substring(17, 1), out Version); | 54 | int.TryParse(parts[0].Substring(17, 1), out Version); |
55 | LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); | 55 | LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); |
56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); | 56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } | 59 | } |
diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs index 3681336..d49e9e8 100644 --- a/OpenSim/Framework/General/Types/AssetStorage.cs +++ b/OpenSim/Framework/General/Types/AssetStorage.cs | |||
@@ -1,47 +1,47 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | public class AssetStorage | 32 | public class AssetStorage |
33 | { | 33 | { |
34 | 34 | ||
35 | public AssetStorage() { | 35 | public AssetStorage() { |
36 | } | 36 | } |
37 | 37 | ||
38 | public AssetStorage(LLUUID assetUUID) { | 38 | public AssetStorage(LLUUID assetUUID) { |
39 | UUID=assetUUID; | 39 | UUID=assetUUID; |
40 | } | 40 | } |
41 | 41 | ||
42 | public byte[] Data; | 42 | public byte[] Data; |
43 | public sbyte Type; | 43 | public sbyte Type; |
44 | public string Name; | 44 | public string Name; |
45 | public LLUUID UUID; | 45 | public LLUUID UUID; |
46 | } | 46 | } |
47 | } | 47 | } |
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs index 436b109..25b3b18 100644 --- a/OpenSim/Framework/General/Types/EstateSettings.cs +++ b/OpenSim/Framework/General/Types/EstateSettings.cs | |||
@@ -1,93 +1,93 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework.Types | 31 | namespace OpenSim.Framework.Types |
32 | { | 32 | { |
33 | public class EstateSettings | 33 | public class EstateSettings |
34 | { | 34 | { |
35 | //Settings to this island | 35 | //Settings to this island |
36 | public float billableFactor = (float)0.0; | 36 | public float billableFactor = (float)0.0; |
37 | public uint estateID = 0; | 37 | public uint estateID = 0; |
38 | public uint parentEstateID = 0; | 38 | public uint parentEstateID = 0; |
39 | 39 | ||
40 | public byte maxAgents = 40; | 40 | public byte maxAgents = 40; |
41 | public float objectBonusFactor = (float)1.0; | 41 | public float objectBonusFactor = (float)1.0; |
42 | 42 | ||
43 | public int redirectGridX = 0; //?? | 43 | public int redirectGridX = 0; //?? |
44 | public int redirectGridY = 0; //?? | 44 | public int redirectGridY = 0; //?? |
45 | public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings | 45 | public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings |
46 | public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. | 46 | public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. |
47 | public float sunHour = 0; | 47 | public float sunHour = 0; |
48 | 48 | ||
49 | public float terrainRaiseLimit = 0; | 49 | public float terrainRaiseLimit = 0; |
50 | public float terrainLowerLimit = 0; | 50 | public float terrainLowerLimit = 0; |
51 | 51 | ||
52 | public bool useFixedSun = false; | 52 | public bool useFixedSun = false; |
53 | public int pricePerMeter = 1; | 53 | public int pricePerMeter = 1; |
54 | 54 | ||
55 | public ushort regionWaterHeight = 20; | 55 | public ushort regionWaterHeight = 20; |
56 | public bool regionAllowTerraform = true; | 56 | public bool regionAllowTerraform = true; |
57 | 57 | ||
58 | // Region Information | 58 | // Region Information |
59 | // Low resolution 'base' textures. No longer used. | 59 | // Low resolution 'base' textures. No longer used. |
60 | public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default | 60 | public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default |
61 | public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default | 61 | public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default |
62 | public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default | 62 | public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default |
63 | public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default | 63 | public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default |
64 | 64 | ||
65 | // Higher resolution terrain textures | 65 | // Higher resolution terrain textures |
66 | public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000"); | 66 | public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000"); |
67 | public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000"); | 67 | public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000"); |
68 | public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000"); | 68 | public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000"); |
69 | public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); | 69 | public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); |
70 | 70 | ||
71 | // First quad - each point is bilinearly interpolated at each meter of terrain | 71 | // First quad - each point is bilinearly interpolated at each meter of terrain |
72 | public float terrainStartHeight0 = 10.0f; | 72 | public float terrainStartHeight0 = 10.0f; |
73 | public float terrainStartHeight1 = 10.0f; | 73 | public float terrainStartHeight1 = 10.0f; |
74 | public float terrainStartHeight2 = 10.0f; | 74 | public float terrainStartHeight2 = 10.0f; |
75 | public float terrainStartHeight3 = 10.0f; | 75 | public float terrainStartHeight3 = 10.0f; |
76 | 76 | ||
77 | // Second quad - also bilinearly interpolated. | 77 | // Second quad - also bilinearly interpolated. |
78 | // Terrain texturing is done that: | 78 | // Terrain texturing is done that: |
79 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] | 79 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] |
80 | public float terrainHeightRange0 = 60.0f; //00 | 80 | public float terrainHeightRange0 = 60.0f; //00 |
81 | public float terrainHeightRange1 = 60.0f; //01 | 81 | public float terrainHeightRange1 = 60.0f; //01 |
82 | public float terrainHeightRange2 = 60.0f; //10 | 82 | public float terrainHeightRange2 = 60.0f; //10 |
83 | public float terrainHeightRange3 = 60.0f; //11 | 83 | public float terrainHeightRange3 = 60.0f; //11 |
84 | 84 | ||
85 | // Terrain Default (Must be in F32 Format!) | 85 | // Terrain Default (Must be in F32 Format!) |
86 | public string terrainFile = "default.r32"; | 86 | public string terrainFile = "default.r32"; |
87 | public double terrainMultiplier = 60.0; | 87 | public double terrainMultiplier = 60.0; |
88 | public float waterHeight = (float)20.0; | 88 | public float waterHeight = (float)20.0; |
89 | 89 | ||
90 | public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region | 90 | public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region |
91 | 91 | ||
92 | } | 92 | } |
93 | } | 93 | } |
diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs index d54c019..3aaf613 100644 --- a/OpenSim/Framework/General/Types/Login.cs +++ b/OpenSim/Framework/General/Types/Login.cs | |||
@@ -1,49 +1,49 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | public class Login | 32 | public class Login |
33 | { | 33 | { |
34 | public string First = "Test"; | 34 | public string First = "Test"; |
35 | public string Last = "User"; | 35 | public string Last = "User"; |
36 | public LLUUID Agent; | 36 | public LLUUID Agent; |
37 | public LLUUID Session; | 37 | public LLUUID Session; |
38 | public LLUUID SecureSession = LLUUID.Zero; | 38 | public LLUUID SecureSession = LLUUID.Zero; |
39 | public LLUUID InventoryFolder; | 39 | public LLUUID InventoryFolder; |
40 | public LLUUID BaseFolder; | 40 | public LLUUID BaseFolder; |
41 | public uint CircuitCode; | 41 | public uint CircuitCode; |
42 | public string CapsPath =""; | 42 | public string CapsPath =""; |
43 | 43 | ||
44 | public Login() | 44 | public Login() |
45 | { | 45 | { |
46 | 46 | ||
47 | } | 47 | } |
48 | } | 48 | } |
49 | } | 49 | } |
diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs index fbb3b73..212ce4b 100644 --- a/OpenSim/Framework/General/Types/MapBlockData.cs +++ b/OpenSim/Framework/General/Types/MapBlockData.cs | |||
@@ -1,23 +1,23 @@ | |||
1 | using System; | 1 | using System; |
2 | using libsecondlife; | 2 | using libsecondlife; |
3 | 3 | ||
4 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
5 | { | 5 | { |
6 | public class MapBlockData | 6 | public class MapBlockData |
7 | { | 7 | { |
8 | public uint Flags; | 8 | public uint Flags; |
9 | public ushort X; | 9 | public ushort X; |
10 | public ushort Y; | 10 | public ushort Y; |
11 | public byte Agents; | 11 | public byte Agents; |
12 | public byte Access; | 12 | public byte Access; |
13 | public byte WaterHeight; | 13 | public byte WaterHeight; |
14 | public LLUUID MapImageId; | 14 | public LLUUID MapImageId; |
15 | public String Name; | 15 | public String Name; |
16 | public uint RegionFlags; | 16 | public uint RegionFlags; |
17 | 17 | ||
18 | public MapBlockData() | 18 | public MapBlockData() |
19 | { | 19 | { |
20 | 20 | ||
21 | } | 21 | } |
22 | } | 22 | } |
23 | } | 23 | } |
diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs index bb67981..7e83ffc 100644 --- a/OpenSim/Framework/General/Types/NeighbourInfo.cs +++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs | |||
@@ -1,42 +1,42 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | namespace OpenSim.Framework.Types | 28 | namespace OpenSim.Framework.Types |
29 | { | 29 | { |
30 | public class NeighbourInfo | 30 | public class NeighbourInfo |
31 | { | 31 | { |
32 | public NeighbourInfo() | 32 | public NeighbourInfo() |
33 | { | 33 | { |
34 | } | 34 | } |
35 | 35 | ||
36 | public ulong regionhandle; | 36 | public ulong regionhandle; |
37 | public uint RegionLocX; | 37 | public uint RegionLocX; |
38 | public uint RegionLocY; | 38 | public uint RegionLocY; |
39 | public string sim_ip; | 39 | public string sim_ip; |
40 | public uint sim_port; | 40 | public uint sim_port; |
41 | } | 41 | } |
42 | } | 42 | } |
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs index 900354c..6259d7b 100644 --- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs | |||
@@ -1,219 +1,219 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using OpenSim.Framework.Console; | 29 | using OpenSim.Framework.Console; |
30 | using OpenSim.Framework.Interfaces; | 30 | using OpenSim.Framework.Interfaces; |
31 | 31 | ||
32 | namespace OpenSim.Framework.Types | 32 | namespace OpenSim.Framework.Types |
33 | { | 33 | { |
34 | public class NetworkServersInfo | 34 | public class NetworkServersInfo |
35 | { | 35 | { |
36 | public string AssetURL = "http://127.0.0.1:8003/"; | 36 | public string AssetURL = "http://127.0.0.1:8003/"; |
37 | public string AssetSendKey = ""; | 37 | public string AssetSendKey = ""; |
38 | 38 | ||
39 | public string GridURL = ""; | 39 | public string GridURL = ""; |
40 | public string GridSendKey = ""; | 40 | public string GridSendKey = ""; |
41 | public string GridRecvKey = ""; | 41 | public string GridRecvKey = ""; |
42 | public string UserURL = ""; | 42 | public string UserURL = ""; |
43 | public string UserSendKey = ""; | 43 | public string UserSendKey = ""; |
44 | public string UserRecvKey = ""; | 44 | public string UserRecvKey = ""; |
45 | public bool isSandbox; | 45 | public bool isSandbox; |
46 | 46 | ||
47 | public uint DefaultHomeLocX = 1000; | 47 | public uint DefaultHomeLocX = 1000; |
48 | public uint DefaultHomeLocY = 1000; | 48 | public uint DefaultHomeLocY = 1000; |
49 | 49 | ||
50 | public int HttpListenerPort = 9000; | 50 | public int HttpListenerPort = 9000; |
51 | public int RemotingListenerPort = 8895; | 51 | public int RemotingListenerPort = 8895; |
52 | 52 | ||
53 | public void InitConfig(bool sandboxMode, IGenericConfig configData) | 53 | public void InitConfig(bool sandboxMode, IGenericConfig configData) |
54 | { | 54 | { |
55 | this.isSandbox = sandboxMode; | 55 | this.isSandbox = sandboxMode; |
56 | 56 | ||
57 | try | 57 | try |
58 | { | 58 | { |
59 | string attri = ""; | 59 | string attri = ""; |
60 | 60 | ||
61 | attri = ""; | 61 | attri = ""; |
62 | attri = configData.GetAttribute("HttpListenerPort"); | 62 | attri = configData.GetAttribute("HttpListenerPort"); |
63 | if (attri == "") | 63 | if (attri == "") |
64 | { | 64 | { |
65 | string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); | 65 | string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); |
66 | configData.SetAttribute("HttpListenerPort", location); | 66 | configData.SetAttribute("HttpListenerPort", location); |
67 | this.HttpListenerPort = Convert.ToInt32(location); | 67 | this.HttpListenerPort = Convert.ToInt32(location); |
68 | } | 68 | } |
69 | else | 69 | else |
70 | { | 70 | { |
71 | this.HttpListenerPort = Convert.ToInt32(attri); | 71 | this.HttpListenerPort = Convert.ToInt32(attri); |
72 | } | 72 | } |
73 | 73 | ||
74 | attri = ""; | 74 | attri = ""; |
75 | attri = configData.GetAttribute("RemotingListenerPort"); | 75 | attri = configData.GetAttribute("RemotingListenerPort"); |
76 | if (attri == "") | 76 | if (attri == "") |
77 | { | 77 | { |
78 | string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); | 78 | string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); |
79 | configData.SetAttribute("RemotingListenerPort", location); | 79 | configData.SetAttribute("RemotingListenerPort", location); |
80 | this.RemotingListenerPort = Convert.ToInt32(location); | 80 | this.RemotingListenerPort = Convert.ToInt32(location); |
81 | } | 81 | } |
82 | else | 82 | else |
83 | { | 83 | { |
84 | this.RemotingListenerPort = Convert.ToInt32(attri); | 84 | this.RemotingListenerPort = Convert.ToInt32(attri); |
85 | } | 85 | } |
86 | 86 | ||
87 | if (sandboxMode) | 87 | if (sandboxMode) |
88 | { | 88 | { |
89 | // default home location X | 89 | // default home location X |
90 | attri = ""; | 90 | attri = ""; |
91 | attri = configData.GetAttribute("DefaultLocationX"); | 91 | attri = configData.GetAttribute("DefaultLocationX"); |
92 | if (attri == "") | 92 | if (attri == "") |
93 | { | 93 | { |
94 | string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); | 94 | string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); |
95 | configData.SetAttribute("DefaultLocationX", location); | 95 | configData.SetAttribute("DefaultLocationX", location); |
96 | this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); | 96 | this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); |
97 | } | 97 | } |
98 | else | 98 | else |
99 | { | 99 | { |
100 | this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri); | 100 | this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri); |
101 | } | 101 | } |
102 | 102 | ||
103 | // default home location Y | 103 | // default home location Y |
104 | attri = ""; | 104 | attri = ""; |
105 | attri = configData.GetAttribute("DefaultLocationY"); | 105 | attri = configData.GetAttribute("DefaultLocationY"); |
106 | if (attri == "") | 106 | if (attri == "") |
107 | { | 107 | { |
108 | string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); | 108 | string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); |
109 | configData.SetAttribute("DefaultLocationY", location); | 109 | configData.SetAttribute("DefaultLocationY", location); |
110 | this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); | 110 | this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); |
111 | } | 111 | } |
112 | else | 112 | else |
113 | { | 113 | { |
114 | this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); | 114 | this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | if (!isSandbox) | 117 | if (!isSandbox) |
118 | { | 118 | { |
119 | //Grid Server | 119 | //Grid Server |
120 | attri = ""; | 120 | attri = ""; |
121 | attri = configData.GetAttribute("GridServerURL"); | 121 | attri = configData.GetAttribute("GridServerURL"); |
122 | if (attri == "") | 122 | if (attri == "") |
123 | { | 123 | { |
124 | this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); | 124 | this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); |
125 | configData.SetAttribute("GridServerURL", this.GridURL); | 125 | configData.SetAttribute("GridServerURL", this.GridURL); |
126 | } | 126 | } |
127 | else | 127 | else |
128 | { | 128 | { |
129 | this.GridURL = attri; | 129 | this.GridURL = attri; |
130 | } | 130 | } |
131 | 131 | ||
132 | //Grid Send Key | 132 | //Grid Send Key |
133 | attri = ""; | 133 | attri = ""; |
134 | attri = configData.GetAttribute("GridSendKey"); | 134 | attri = configData.GetAttribute("GridSendKey"); |
135 | if (attri == "") | 135 | if (attri == "") |
136 | { | 136 | { |
137 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); | 137 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); |
138 | configData.SetAttribute("GridSendKey", this.GridSendKey); | 138 | configData.SetAttribute("GridSendKey", this.GridSendKey); |
139 | } | 139 | } |
140 | else | 140 | else |
141 | { | 141 | { |
142 | this.GridSendKey = attri; | 142 | this.GridSendKey = attri; |
143 | } | 143 | } |
144 | 144 | ||
145 | //Grid Receive Key | 145 | //Grid Receive Key |
146 | attri = ""; | 146 | attri = ""; |
147 | attri = configData.GetAttribute("GridRecvKey"); | 147 | attri = configData.GetAttribute("GridRecvKey"); |
148 | if (attri == "") | 148 | if (attri == "") |
149 | { | 149 | { |
150 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); | 150 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); |
151 | configData.SetAttribute("GridRecvKey", this.GridRecvKey); | 151 | configData.SetAttribute("GridRecvKey", this.GridRecvKey); |
152 | } | 152 | } |
153 | else | 153 | else |
154 | { | 154 | { |
155 | this.GridRecvKey = attri; | 155 | this.GridRecvKey = attri; |
156 | } | 156 | } |
157 | 157 | ||
158 | //Grid Server | 158 | //Grid Server |
159 | attri = ""; | 159 | attri = ""; |
160 | attri = configData.GetAttribute("UserServerURL"); | 160 | attri = configData.GetAttribute("UserServerURL"); |
161 | if (attri == "") | 161 | if (attri == "") |
162 | { | 162 | { |
163 | this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); | 163 | this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); |
164 | configData.SetAttribute("UserServerURL", this.UserURL); | 164 | configData.SetAttribute("UserServerURL", this.UserURL); |
165 | } | 165 | } |
166 | else | 166 | else |
167 | { | 167 | { |
168 | this.UserURL = attri; | 168 | this.UserURL = attri; |
169 | } | 169 | } |
170 | 170 | ||
171 | //Grid Send Key | 171 | //Grid Send Key |
172 | attri = ""; | 172 | attri = ""; |
173 | attri = configData.GetAttribute("UserSendKey"); | 173 | attri = configData.GetAttribute("UserSendKey"); |
174 | if (attri == "") | 174 | if (attri == "") |
175 | { | 175 | { |
176 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); | 176 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); |
177 | configData.SetAttribute("UserSendKey", this.UserSendKey); | 177 | configData.SetAttribute("UserSendKey", this.UserSendKey); |
178 | } | 178 | } |
179 | else | 179 | else |
180 | { | 180 | { |
181 | this.UserSendKey = attri; | 181 | this.UserSendKey = attri; |
182 | } | 182 | } |
183 | 183 | ||
184 | //Grid Receive Key | 184 | //Grid Receive Key |
185 | attri = ""; | 185 | attri = ""; |
186 | attri = configData.GetAttribute("UserRecvKey"); | 186 | attri = configData.GetAttribute("UserRecvKey"); |
187 | if (attri == "") | 187 | if (attri == "") |
188 | { | 188 | { |
189 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); | 189 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); |
190 | configData.SetAttribute("UserRecvKey", this.UserRecvKey); | 190 | configData.SetAttribute("UserRecvKey", this.UserRecvKey); |
191 | } | 191 | } |
192 | else | 192 | else |
193 | { | 193 | { |
194 | this.UserRecvKey = attri; | 194 | this.UserRecvKey = attri; |
195 | } | 195 | } |
196 | 196 | ||
197 | attri = ""; | 197 | attri = ""; |
198 | attri = configData.GetAttribute("AssetServerURL"); | 198 | attri = configData.GetAttribute("AssetServerURL"); |
199 | if (attri == "") | 199 | if (attri == "") |
200 | { | 200 | { |
201 | this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); | 201 | this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); |
202 | configData.SetAttribute("AssetServerURL", this.GridURL); | 202 | configData.SetAttribute("AssetServerURL", this.GridURL); |
203 | } | 203 | } |
204 | else | 204 | else |
205 | { | 205 | { |
206 | this.AssetURL = attri; | 206 | this.AssetURL = attri; |
207 | } | 207 | } |
208 | 208 | ||
209 | } | 209 | } |
210 | configData.Commit(); | 210 | configData.Commit(); |
211 | } | 211 | } |
212 | catch (Exception e) | 212 | catch (Exception e) |
213 | { | 213 | { |
214 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | 214 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); |
215 | MainLog.Instance.Warn(e.ToString()); | 215 | MainLog.Instance.Warn(e.ToString()); |
216 | } | 216 | } |
217 | } | 217 | } |
218 | } | 218 | } |
219 | } | 219 | } |
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs index 17de655..5626299 100644 --- a/OpenSim/Framework/General/Types/ParcelData.cs +++ b/OpenSim/Framework/General/Types/ParcelData.cs | |||
@@ -1,120 +1,120 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | 32 | ||
33 | public class ParcelData | 33 | public class ParcelData |
34 | { | 34 | { |
35 | public byte[] parcelBitmapByteArray = new byte[512]; | 35 | public byte[] parcelBitmapByteArray = new byte[512]; |
36 | public string parcelName = "Your Parcel"; | 36 | public string parcelName = "Your Parcel"; |
37 | public string parcelDesc = ""; | 37 | public string parcelDesc = ""; |
38 | public LLUUID ownerID = new LLUUID(); | 38 | public LLUUID ownerID = new LLUUID(); |
39 | public bool isGroupOwned = false; | 39 | public bool isGroupOwned = false; |
40 | public LLVector3 AABBMin = new LLVector3(); | 40 | public LLVector3 AABBMin = new LLVector3(); |
41 | public LLVector3 AABBMax = new LLVector3(); | 41 | public LLVector3 AABBMax = new LLVector3(); |
42 | public int area = 0; | 42 | public int area = 0; |
43 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned | 43 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned |
44 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID | 44 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID |
45 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category | 45 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category |
46 | public int claimDate = 0; //Unemplemented | 46 | public int claimDate = 0; //Unemplemented |
47 | public int claimPrice = 0; //Unemplemented | 47 | public int claimPrice = 0; //Unemplemented |
48 | public LLUUID groupID = new LLUUID(); //Unemplemented | 48 | public LLUUID groupID = new LLUUID(); //Unemplemented |
49 | public int groupPrims = 0; | 49 | public int groupPrims = 0; |
50 | public int otherPrims = 0; | 50 | public int otherPrims = 0; |
51 | public int ownerPrims = 0; | 51 | public int ownerPrims = 0; |
52 | public int selectedPrims = 0; | 52 | public int selectedPrims = 0; |
53 | public int simwidePrims = 0; | 53 | public int simwidePrims = 0; |
54 | public int simwideArea = 0; | 54 | public int simwideArea = 0; |
55 | public int salePrice = 0; //Unemeplemented. Parcels price. | 55 | public int salePrice = 0; //Unemeplemented. Parcels price. |
56 | public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased; | 56 | public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased; |
57 | public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; | 57 | public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; |
58 | public byte landingType = 0; | 58 | public byte landingType = 0; |
59 | public byte mediaAutoScale = 0; | 59 | public byte mediaAutoScale = 0; |
60 | public LLUUID mediaID = LLUUID.Zero; | 60 | public LLUUID mediaID = LLUUID.Zero; |
61 | public int localID = 0; | 61 | public int localID = 0; |
62 | public LLUUID globalID = new LLUUID(); | 62 | public LLUUID globalID = new LLUUID(); |
63 | 63 | ||
64 | public string mediaURL = ""; | 64 | public string mediaURL = ""; |
65 | public string musicURL = ""; | 65 | public string musicURL = ""; |
66 | public float passHours = 0; | 66 | public float passHours = 0; |
67 | public int passPrice = 0; | 67 | public int passPrice = 0; |
68 | public LLUUID snapshotID = LLUUID.Zero; | 68 | public LLUUID snapshotID = LLUUID.Zero; |
69 | public LLVector3 userLocation = new LLVector3(); | 69 | public LLVector3 userLocation = new LLVector3(); |
70 | public LLVector3 userLookAt = new LLVector3(); | 70 | public LLVector3 userLookAt = new LLVector3(); |
71 | 71 | ||
72 | public ParcelData() | 72 | public ParcelData() |
73 | { | 73 | { |
74 | globalID = LLUUID.Random(); | 74 | globalID = LLUUID.Random(); |
75 | } | 75 | } |
76 | 76 | ||
77 | public ParcelData Copy() | 77 | public ParcelData Copy() |
78 | { | 78 | { |
79 | ParcelData parcelData = new ParcelData(); | 79 | ParcelData parcelData = new ParcelData(); |
80 | 80 | ||
81 | parcelData.AABBMax = this.AABBMax; | 81 | parcelData.AABBMax = this.AABBMax; |
82 | parcelData.AABBMin = this.AABBMin; | 82 | parcelData.AABBMin = this.AABBMin; |
83 | parcelData.area = this.area; | 83 | parcelData.area = this.area; |
84 | parcelData.auctionID = this.auctionID; | 84 | parcelData.auctionID = this.auctionID; |
85 | parcelData.authBuyerID = this.authBuyerID; | 85 | parcelData.authBuyerID = this.authBuyerID; |
86 | parcelData.category = this.category; | 86 | parcelData.category = this.category; |
87 | parcelData.claimDate = this.claimDate; | 87 | parcelData.claimDate = this.claimDate; |
88 | parcelData.claimPrice = this.claimPrice; | 88 | parcelData.claimPrice = this.claimPrice; |
89 | parcelData.globalID = this.globalID; | 89 | parcelData.globalID = this.globalID; |
90 | parcelData.groupID = this.groupID; | 90 | parcelData.groupID = this.groupID; |
91 | parcelData.groupPrims = this.groupPrims; | 91 | parcelData.groupPrims = this.groupPrims; |
92 | parcelData.otherPrims = this.otherPrims; | 92 | parcelData.otherPrims = this.otherPrims; |
93 | parcelData.ownerPrims = this.ownerPrims; | 93 | parcelData.ownerPrims = this.ownerPrims; |
94 | parcelData.selectedPrims = this.selectedPrims; | 94 | parcelData.selectedPrims = this.selectedPrims; |
95 | parcelData.isGroupOwned = this.isGroupOwned; | 95 | parcelData.isGroupOwned = this.isGroupOwned; |
96 | parcelData.localID = this.localID; | 96 | parcelData.localID = this.localID; |
97 | parcelData.landingType = this.landingType; | 97 | parcelData.landingType = this.landingType; |
98 | parcelData.mediaAutoScale = this.mediaAutoScale; | 98 | parcelData.mediaAutoScale = this.mediaAutoScale; |
99 | parcelData.mediaID = this.mediaID; | 99 | parcelData.mediaID = this.mediaID; |
100 | parcelData.mediaURL = this.mediaURL; | 100 | parcelData.mediaURL = this.mediaURL; |
101 | parcelData.musicURL = this.musicURL; | 101 | parcelData.musicURL = this.musicURL; |
102 | parcelData.ownerID = this.ownerID; | 102 | parcelData.ownerID = this.ownerID; |
103 | parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone(); | 103 | parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone(); |
104 | parcelData.parcelDesc = this.parcelDesc; | 104 | parcelData.parcelDesc = this.parcelDesc; |
105 | parcelData.parcelFlags = this.parcelFlags; | 105 | parcelData.parcelFlags = this.parcelFlags; |
106 | parcelData.parcelName = this.parcelName; | 106 | parcelData.parcelName = this.parcelName; |
107 | parcelData.parcelStatus = this.parcelStatus; | 107 | parcelData.parcelStatus = this.parcelStatus; |
108 | parcelData.passHours = this.passHours; | 108 | parcelData.passHours = this.passHours; |
109 | parcelData.passPrice = this.passPrice; | 109 | parcelData.passPrice = this.passPrice; |
110 | parcelData.salePrice = this.salePrice; | 110 | parcelData.salePrice = this.salePrice; |
111 | parcelData.snapshotID = this.snapshotID; | 111 | parcelData.snapshotID = this.snapshotID; |
112 | parcelData.userLocation = this.userLocation; | 112 | parcelData.userLocation = this.userLocation; |
113 | parcelData.userLookAt = this.userLookAt; | 113 | parcelData.userLookAt = this.userLookAt; |
114 | 114 | ||
115 | return parcelData; | 115 | return parcelData; |
116 | 116 | ||
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | } | 120 | } |
diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs index ff81bcd..6b8fa3a 100644 --- a/OpenSim/Framework/General/Types/PrimData.cs +++ b/OpenSim/Framework/General/Types/PrimData.cs | |||
@@ -1,228 +1,228 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework.Types | 31 | namespace OpenSim.Framework.Types |
32 | { | 32 | { |
33 | public class PrimData | 33 | public class PrimData |
34 | { | 34 | { |
35 | private const uint FULL_MASK_PERMISSIONS = 2147483647; | 35 | private const uint FULL_MASK_PERMISSIONS = 2147483647; |
36 | 36 | ||
37 | public LLUUID OwnerID; | 37 | public LLUUID OwnerID; |
38 | public byte PCode; | 38 | public byte PCode; |
39 | public ushort PathBegin; | 39 | public ushort PathBegin; |
40 | public ushort PathEnd; | 40 | public ushort PathEnd; |
41 | public byte PathScaleX; | 41 | public byte PathScaleX; |
42 | public byte PathScaleY; | 42 | public byte PathScaleY; |
43 | public byte PathShearX; | 43 | public byte PathShearX; |
44 | public byte PathShearY; | 44 | public byte PathShearY; |
45 | public sbyte PathSkew; | 45 | public sbyte PathSkew; |
46 | public ushort ProfileBegin; | 46 | public ushort ProfileBegin; |
47 | public ushort ProfileEnd; | 47 | public ushort ProfileEnd; |
48 | public LLVector3 Scale; | 48 | public LLVector3 Scale; |
49 | public byte PathCurve; | 49 | public byte PathCurve; |
50 | public byte ProfileCurve; | 50 | public byte ProfileCurve; |
51 | public uint ParentID = 0; | 51 | public uint ParentID = 0; |
52 | public ushort ProfileHollow; | 52 | public ushort ProfileHollow; |
53 | public sbyte PathRadiusOffset; | 53 | public sbyte PathRadiusOffset; |
54 | public byte PathRevolutions; | 54 | public byte PathRevolutions; |
55 | public sbyte PathTaperX; | 55 | public sbyte PathTaperX; |
56 | public sbyte PathTaperY; | 56 | public sbyte PathTaperY; |
57 | public sbyte PathTwist; | 57 | public sbyte PathTwist; |
58 | public sbyte PathTwistBegin; | 58 | public sbyte PathTwistBegin; |
59 | public byte[] TextureEntry; // a LL textureEntry in byte[] format | 59 | public byte[] TextureEntry; // a LL textureEntry in byte[] format |
60 | 60 | ||
61 | public Int32 CreationDate; | 61 | public Int32 CreationDate; |
62 | public uint OwnerMask = FULL_MASK_PERMISSIONS; | 62 | public uint OwnerMask = FULL_MASK_PERMISSIONS; |
63 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS; | 63 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS; |
64 | public uint GroupMask = FULL_MASK_PERMISSIONS; | 64 | public uint GroupMask = FULL_MASK_PERMISSIONS; |
65 | public uint EveryoneMask = FULL_MASK_PERMISSIONS; | 65 | public uint EveryoneMask = FULL_MASK_PERMISSIONS; |
66 | public uint BaseMask = FULL_MASK_PERMISSIONS; | 66 | public uint BaseMask = FULL_MASK_PERMISSIONS; |
67 | 67 | ||
68 | //following only used during prim storage | 68 | //following only used during prim storage |
69 | public LLVector3 Position; | 69 | public LLVector3 Position; |
70 | public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0); | 70 | public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0); |
71 | public uint LocalID; | 71 | public uint LocalID; |
72 | public LLUUID FullID; | 72 | public LLUUID FullID; |
73 | 73 | ||
74 | public PrimData() | 74 | public PrimData() |
75 | { | 75 | { |
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | public PrimData(byte[] data) | 79 | public PrimData(byte[] data) |
80 | { | 80 | { |
81 | int i = 0; | 81 | int i = 0; |
82 | 82 | ||
83 | this.OwnerID = new LLUUID(data, i); i += 16; | 83 | this.OwnerID = new LLUUID(data, i); i += 16; |
84 | this.PCode = data[i++]; | 84 | this.PCode = data[i++]; |
85 | this.PathBegin = (ushort)(data[i++] + (data[i++] << 8)); | 85 | this.PathBegin = (ushort)(data[i++] + (data[i++] << 8)); |
86 | this.PathEnd = (ushort)(data[i++] + (data[i++] << 8)); | 86 | this.PathEnd = (ushort)(data[i++] + (data[i++] << 8)); |
87 | this.PathScaleX = data[i++]; | 87 | this.PathScaleX = data[i++]; |
88 | this.PathScaleY = data[i++]; | 88 | this.PathScaleY = data[i++]; |
89 | this.PathShearX = data[i++]; | 89 | this.PathShearX = data[i++]; |
90 | this.PathShearY = data[i++]; | 90 | this.PathShearY = data[i++]; |
91 | this.PathSkew = (sbyte)data[i++]; | 91 | this.PathSkew = (sbyte)data[i++]; |
92 | this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8)); | 92 | this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8)); |
93 | this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8)); | 93 | this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8)); |
94 | this.Scale = new LLVector3(data, i); i += 12; | 94 | this.Scale = new LLVector3(data, i); i += 12; |
95 | this.PathCurve = data[i++]; | 95 | this.PathCurve = data[i++]; |
96 | this.ProfileCurve = data[i++]; | 96 | this.ProfileCurve = data[i++]; |
97 | this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 97 | this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
98 | this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8)); | 98 | this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8)); |
99 | this.PathRadiusOffset = (sbyte)data[i++]; | 99 | this.PathRadiusOffset = (sbyte)data[i++]; |
100 | this.PathRevolutions = data[i++]; | 100 | this.PathRevolutions = data[i++]; |
101 | this.PathTaperX = (sbyte)data[i++]; | 101 | this.PathTaperX = (sbyte)data[i++]; |
102 | this.PathTaperY = (sbyte)data[i++]; | 102 | this.PathTaperY = (sbyte)data[i++]; |
103 | this.PathTwist = (sbyte)data[i++]; | 103 | this.PathTwist = (sbyte)data[i++]; |
104 | this.PathTwistBegin = (sbyte)data[i++]; | 104 | this.PathTwistBegin = (sbyte)data[i++]; |
105 | ushort length = (ushort)(data[i++] + (data[i++] << 8)); | 105 | ushort length = (ushort)(data[i++] + (data[i++] << 8)); |
106 | this.TextureEntry = new byte[length]; | 106 | this.TextureEntry = new byte[length]; |
107 | Array.Copy(data, i, TextureEntry, 0, length); i += length; | 107 | Array.Copy(data, i, TextureEntry, 0, length); i += length; |
108 | this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 108 | this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
109 | this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 109 | this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
110 | this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 110 | this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
111 | this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 111 | this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
112 | this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 112 | this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
113 | this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 113 | this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
114 | this.Position = new LLVector3(data, i); i += 12; | 114 | this.Position = new LLVector3(data, i); i += 12; |
115 | this.Rotation = new LLQuaternion(data, i, true); i += 12; | 115 | this.Rotation = new LLQuaternion(data, i, true); i += 12; |
116 | this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); | 116 | this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); |
117 | this.FullID = new LLUUID(data, i); i += 16; | 117 | this.FullID = new LLUUID(data, i); i += 16; |
118 | 118 | ||
119 | } | 119 | } |
120 | 120 | ||
121 | public byte[] ToBytes() | 121 | public byte[] ToBytes() |
122 | { | 122 | { |
123 | int i = 0; | 123 | int i = 0; |
124 | byte[] bytes = new byte[126 + TextureEntry.Length]; | 124 | byte[] bytes = new byte[126 + TextureEntry.Length]; |
125 | Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; | 125 | Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; |
126 | bytes[i++] = this.PCode; | 126 | bytes[i++] = this.PCode; |
127 | bytes[i++] = (byte)(this.PathBegin % 256); | 127 | bytes[i++] = (byte)(this.PathBegin % 256); |
128 | bytes[i++] = (byte)((this.PathBegin >> 8) % 256); | 128 | bytes[i++] = (byte)((this.PathBegin >> 8) % 256); |
129 | bytes[i++] = (byte)(this.PathEnd % 256); | 129 | bytes[i++] = (byte)(this.PathEnd % 256); |
130 | bytes[i++] = (byte)((this.PathEnd >> 8) % 256); | 130 | bytes[i++] = (byte)((this.PathEnd >> 8) % 256); |
131 | bytes[i++] = this.PathScaleX; | 131 | bytes[i++] = this.PathScaleX; |
132 | bytes[i++] = this.PathScaleY; | 132 | bytes[i++] = this.PathScaleY; |
133 | bytes[i++] = this.PathShearX; | 133 | bytes[i++] = this.PathShearX; |
134 | bytes[i++] = this.PathShearY; | 134 | bytes[i++] = this.PathShearY; |
135 | bytes[i++] = (byte)this.PathSkew; | 135 | bytes[i++] = (byte)this.PathSkew; |
136 | bytes[i++] = (byte)(this.ProfileBegin % 256); | 136 | bytes[i++] = (byte)(this.ProfileBegin % 256); |
137 | bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256); | 137 | bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256); |
138 | bytes[i++] = (byte)(this.ProfileEnd % 256); | 138 | bytes[i++] = (byte)(this.ProfileEnd % 256); |
139 | bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256); | 139 | bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256); |
140 | Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; | 140 | Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; |
141 | bytes[i++] = this.PathCurve; | 141 | bytes[i++] = this.PathCurve; |
142 | bytes[i++] = this.ProfileCurve; | 142 | bytes[i++] = this.ProfileCurve; |
143 | bytes[i++] = (byte)(ParentID % 256); | 143 | bytes[i++] = (byte)(ParentID % 256); |
144 | bytes[i++] = (byte)((ParentID >> 8) % 256); | 144 | bytes[i++] = (byte)((ParentID >> 8) % 256); |
145 | bytes[i++] = (byte)((ParentID >> 16) % 256); | 145 | bytes[i++] = (byte)((ParentID >> 16) % 256); |
146 | bytes[i++] = (byte)((ParentID >> 24) % 256); | 146 | bytes[i++] = (byte)((ParentID >> 24) % 256); |
147 | bytes[i++] = (byte)(this.ProfileHollow % 256); | 147 | bytes[i++] = (byte)(this.ProfileHollow % 256); |
148 | bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256); | 148 | bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256); |
149 | bytes[i++] = ((byte)this.PathRadiusOffset); | 149 | bytes[i++] = ((byte)this.PathRadiusOffset); |
150 | bytes[i++] = this.PathRevolutions; | 150 | bytes[i++] = this.PathRevolutions; |
151 | bytes[i++] = ((byte)this.PathTaperX); | 151 | bytes[i++] = ((byte)this.PathTaperX); |
152 | bytes[i++] = ((byte)this.PathTaperY); | 152 | bytes[i++] = ((byte)this.PathTaperY); |
153 | bytes[i++] = ((byte)this.PathTwist); | 153 | bytes[i++] = ((byte)this.PathTwist); |
154 | bytes[i++] = ((byte)this.PathTwistBegin); | 154 | bytes[i++] = ((byte)this.PathTwistBegin); |
155 | bytes[i++] = (byte)(TextureEntry.Length % 256); | 155 | bytes[i++] = (byte)(TextureEntry.Length % 256); |
156 | bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256); | 156 | bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256); |
157 | Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length; | 157 | Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length; |
158 | bytes[i++] = (byte)(this.CreationDate % 256); | 158 | bytes[i++] = (byte)(this.CreationDate % 256); |
159 | bytes[i++] = (byte)((this.CreationDate >> 8) % 256); | 159 | bytes[i++] = (byte)((this.CreationDate >> 8) % 256); |
160 | bytes[i++] = (byte)((this.CreationDate >> 16) % 256); | 160 | bytes[i++] = (byte)((this.CreationDate >> 16) % 256); |
161 | bytes[i++] = (byte)((this.CreationDate >> 24) % 256); | 161 | bytes[i++] = (byte)((this.CreationDate >> 24) % 256); |
162 | bytes[i++] = (byte)(this.OwnerMask % 256); | 162 | bytes[i++] = (byte)(this.OwnerMask % 256); |
163 | bytes[i++] = (byte)((this.OwnerMask >> 8) % 256); | 163 | bytes[i++] = (byte)((this.OwnerMask >> 8) % 256); |
164 | bytes[i++] = (byte)((this.OwnerMask >> 16) % 256); | 164 | bytes[i++] = (byte)((this.OwnerMask >> 16) % 256); |
165 | bytes[i++] = (byte)((this.OwnerMask >> 24) % 256); | 165 | bytes[i++] = (byte)((this.OwnerMask >> 24) % 256); |
166 | bytes[i++] = (byte)(this.NextOwnerMask % 256); | 166 | bytes[i++] = (byte)(this.NextOwnerMask % 256); |
167 | bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256); | 167 | bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256); |
168 | bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256); | 168 | bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256); |
169 | bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256); | 169 | bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256); |
170 | bytes[i++] = (byte)(this.GroupMask % 256); | 170 | bytes[i++] = (byte)(this.GroupMask % 256); |
171 | bytes[i++] = (byte)((this.GroupMask >> 8) % 256); | 171 | bytes[i++] = (byte)((this.GroupMask >> 8) % 256); |
172 | bytes[i++] = (byte)((this.GroupMask >> 16) % 256); | 172 | bytes[i++] = (byte)((this.GroupMask >> 16) % 256); |
173 | bytes[i++] = (byte)((this.GroupMask >> 24) % 256); | 173 | bytes[i++] = (byte)((this.GroupMask >> 24) % 256); |
174 | bytes[i++] = (byte)(this.EveryoneMask % 256); | 174 | bytes[i++] = (byte)(this.EveryoneMask % 256); |
175 | bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256); | 175 | bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256); |
176 | bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256); | 176 | bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256); |
177 | bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256); | 177 | bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256); |
178 | bytes[i++] = (byte)(this.BaseMask % 256); | 178 | bytes[i++] = (byte)(this.BaseMask % 256); |
179 | bytes[i++] = (byte)((this.BaseMask >> 8) % 256); | 179 | bytes[i++] = (byte)((this.BaseMask >> 8) % 256); |
180 | bytes[i++] = (byte)((this.BaseMask >> 16) % 256); | 180 | bytes[i++] = (byte)((this.BaseMask >> 16) % 256); |
181 | bytes[i++] = (byte)((this.BaseMask >> 24) % 256); | 181 | bytes[i++] = (byte)((this.BaseMask >> 24) % 256); |
182 | Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; | 182 | Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; |
183 | if (this.Rotation == new LLQuaternion(0, 0, 0, 0)) | 183 | if (this.Rotation == new LLQuaternion(0, 0, 0, 0)) |
184 | { | 184 | { |
185 | this.Rotation = new LLQuaternion(0, 1, 0, 0); | 185 | this.Rotation = new LLQuaternion(0, 1, 0, 0); |
186 | } | 186 | } |
187 | Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; | 187 | Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; |
188 | bytes[i++] = (byte)(this.LocalID % 256); | 188 | bytes[i++] = (byte)(this.LocalID % 256); |
189 | bytes[i++] = (byte)((this.LocalID >> 8) % 256); | 189 | bytes[i++] = (byte)((this.LocalID >> 8) % 256); |
190 | bytes[i++] = (byte)((this.LocalID >> 16) % 256); | 190 | bytes[i++] = (byte)((this.LocalID >> 16) % 256); |
191 | bytes[i++] = (byte)((this.LocalID >> 24) % 256); | 191 | bytes[i++] = (byte)((this.LocalID >> 24) % 256); |
192 | Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16; | 192 | Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16; |
193 | 193 | ||
194 | return bytes; | 194 | return bytes; |
195 | } | 195 | } |
196 | 196 | ||
197 | public static PrimData DefaultCube() | 197 | public static PrimData DefaultCube() |
198 | { | 198 | { |
199 | PrimData primData = new PrimData(); | 199 | PrimData primData = new PrimData(); |
200 | primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 200 | primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
201 | primData.FullID = LLUUID.Random(); | 201 | primData.FullID = LLUUID.Random(); |
202 | primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 202 | primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
203 | primData.Rotation = new LLQuaternion(0, 0, 0, 1); | 203 | primData.Rotation = new LLQuaternion(0, 0, 0, 1); |
204 | primData.PCode = 9; | 204 | primData.PCode = 9; |
205 | primData.ParentID = 0; | 205 | primData.ParentID = 0; |
206 | primData.PathBegin = 0; | 206 | primData.PathBegin = 0; |
207 | primData.PathEnd = 0; | 207 | primData.PathEnd = 0; |
208 | primData.PathScaleX = 0; | 208 | primData.PathScaleX = 0; |
209 | primData.PathScaleY = 0; | 209 | primData.PathScaleY = 0; |
210 | primData.PathShearX = 0; | 210 | primData.PathShearX = 0; |
211 | primData.PathShearY = 0; | 211 | primData.PathShearY = 0; |
212 | primData.PathSkew = 0; | 212 | primData.PathSkew = 0; |
213 | primData.ProfileBegin = 0; | 213 | primData.ProfileBegin = 0; |
214 | primData.ProfileEnd = 0; | 214 | primData.ProfileEnd = 0; |
215 | primData.PathCurve = 16; | 215 | primData.PathCurve = 16; |
216 | primData.ProfileCurve = 1; | 216 | primData.ProfileCurve = 1; |
217 | primData.ProfileHollow = 0; | 217 | primData.ProfileHollow = 0; |
218 | primData.PathRadiusOffset = 0; | 218 | primData.PathRadiusOffset = 0; |
219 | primData.PathRevolutions = 0; | 219 | primData.PathRevolutions = 0; |
220 | primData.PathTaperX = 0; | 220 | primData.PathTaperX = 0; |
221 | primData.PathTaperY = 0; | 221 | primData.PathTaperY = 0; |
222 | primData.PathTwist = 0; | 222 | primData.PathTwist = 0; |
223 | primData.PathTwistBegin = 0; | 223 | primData.PathTwistBegin = 0; |
224 | 224 | ||
225 | return primData; | 225 | return primData; |
226 | } | 226 | } |
227 | } | 227 | } |
228 | } | 228 | } |
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index a085a44..e058c07 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -1,109 +1,109 @@ | |||
1 | using libsecondlife; | 1 | using libsecondlife; |
2 | using libsecondlife.Packets; | 2 | using libsecondlife.Packets; |
3 | 3 | ||
4 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
5 | { | 5 | { |
6 | public enum ShapeType | 6 | public enum ShapeType |
7 | { | 7 | { |
8 | Box, | 8 | Box, |
9 | Sphere, | 9 | Sphere, |
10 | Ring, | 10 | Ring, |
11 | Tube, | 11 | Tube, |
12 | Torus, | 12 | Torus, |
13 | Prism, | 13 | Prism, |
14 | Scuplted, | 14 | Scuplted, |
15 | Cylinder, | 15 | Cylinder, |
16 | Foliage, | 16 | Foliage, |
17 | Unknown | 17 | Unknown |
18 | } | 18 | } |
19 | 19 | ||
20 | public class PrimitiveBaseShape | 20 | public class PrimitiveBaseShape |
21 | { | 21 | { |
22 | private ShapeType type = ShapeType.Unknown; | 22 | private ShapeType type = ShapeType.Unknown; |
23 | 23 | ||
24 | public byte PCode; | 24 | public byte PCode; |
25 | public ushort PathBegin; | 25 | public ushort PathBegin; |
26 | public ushort PathEnd; | 26 | public ushort PathEnd; |
27 | public byte PathScaleX; | 27 | public byte PathScaleX; |
28 | public byte PathScaleY; | 28 | public byte PathScaleY; |
29 | public byte PathShearX; | 29 | public byte PathShearX; |
30 | public byte PathShearY; | 30 | public byte PathShearY; |
31 | public sbyte PathSkew; | 31 | public sbyte PathSkew; |
32 | public ushort ProfileBegin; | 32 | public ushort ProfileBegin; |
33 | public ushort ProfileEnd; | 33 | public ushort ProfileEnd; |
34 | public LLVector3 Scale; | 34 | public LLVector3 Scale; |
35 | public byte PathCurve; | 35 | public byte PathCurve; |
36 | public byte ProfileCurve; | 36 | public byte ProfileCurve; |
37 | public ushort ProfileHollow; | 37 | public ushort ProfileHollow; |
38 | public sbyte PathRadiusOffset; | 38 | public sbyte PathRadiusOffset; |
39 | public byte PathRevolutions; | 39 | public byte PathRevolutions; |
40 | public sbyte PathTaperX; | 40 | public sbyte PathTaperX; |
41 | public sbyte PathTaperY; | 41 | public sbyte PathTaperY; |
42 | public sbyte PathTwist; | 42 | public sbyte PathTwist; |
43 | public sbyte PathTwistBegin; | 43 | public sbyte PathTwistBegin; |
44 | public byte[] TextureEntry; // a LL textureEntry in byte[] format | 44 | public byte[] TextureEntry; // a LL textureEntry in byte[] format |
45 | 45 | ||
46 | public ShapeType PrimType | 46 | public ShapeType PrimType |
47 | { | 47 | { |
48 | get | 48 | get |
49 | { | 49 | { |
50 | return this.type; | 50 | return this.type; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | public LLVector3 PrimScale | 54 | public LLVector3 PrimScale |
55 | { | 55 | { |
56 | get | 56 | get |
57 | { | 57 | { |
58 | return this.Scale; | 58 | return this.Scale; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | public PrimitiveBaseShape() | 62 | public PrimitiveBaseShape() |
63 | { | 63 | { |
64 | 64 | ||
65 | } | 65 | } |
66 | 66 | ||
67 | //void returns need to change of course | 67 | //void returns need to change of course |
68 | public void GetMesh() | 68 | public void GetMesh() |
69 | { | 69 | { |
70 | 70 | ||
71 | } | 71 | } |
72 | 72 | ||
73 | public PrimitiveBaseShape Copy() | 73 | public PrimitiveBaseShape Copy() |
74 | { | 74 | { |
75 | return (PrimitiveBaseShape) this.MemberwiseClone(); | 75 | return (PrimitiveBaseShape) this.MemberwiseClone(); |
76 | } | 76 | } |
77 | 77 | ||
78 | public static PrimitiveBaseShape DefaultBox() | 78 | public static PrimitiveBaseShape DefaultBox() |
79 | { | 79 | { |
80 | PrimitiveBaseShape primShape = new PrimitiveBaseShape(); | 80 | PrimitiveBaseShape primShape = new PrimitiveBaseShape(); |
81 | 81 | ||
82 | primShape.type = ShapeType.Box; | 82 | primShape.type = ShapeType.Box; |
83 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 83 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
84 | primShape.PCode = 9; | 84 | primShape.PCode = 9; |
85 | primShape.PathBegin = 0; | 85 | primShape.PathBegin = 0; |
86 | primShape.PathEnd = 0; | 86 | primShape.PathEnd = 0; |
87 | primShape.PathScaleX = 0; | 87 | primShape.PathScaleX = 0; |
88 | primShape.PathScaleY = 0; | 88 | primShape.PathScaleY = 0; |
89 | primShape.PathShearX = 0; | 89 | primShape.PathShearX = 0; |
90 | primShape.PathShearY = 0; | 90 | primShape.PathShearY = 0; |
91 | primShape.PathSkew = 0; | 91 | primShape.PathSkew = 0; |
92 | primShape.ProfileBegin = 0; | 92 | primShape.ProfileBegin = 0; |
93 | primShape.ProfileEnd = 0; | 93 | primShape.ProfileEnd = 0; |
94 | primShape.PathCurve = 16; | 94 | primShape.PathCurve = 16; |
95 | primShape.ProfileCurve = 1; | 95 | primShape.ProfileCurve = 1; |
96 | primShape.ProfileHollow = 0; | 96 | primShape.ProfileHollow = 0; |
97 | primShape.PathRadiusOffset = 0; | 97 | primShape.PathRadiusOffset = 0; |
98 | primShape.PathRevolutions = 0; | 98 | primShape.PathRevolutions = 0; |
99 | primShape.PathTaperX = 0; | 99 | primShape.PathTaperX = 0; |
100 | primShape.PathTaperY = 0; | 100 | primShape.PathTaperY = 0; |
101 | primShape.PathTwist = 0; | 101 | primShape.PathTwist = 0; |
102 | primShape.PathTwistBegin = 0; | 102 | primShape.PathTwistBegin = 0; |
103 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | 103 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); |
104 | primShape.TextureEntry = ntex.ToBytes(); | 104 | primShape.TextureEntry = ntex.ToBytes(); |
105 | 105 | ||
106 | return primShape; | 106 | return primShape; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } | 109 | } |
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs index 4a055ad..d90acc6 100644 --- a/OpenSim/Framework/General/Types/RegionHandle.cs +++ b/OpenSim/Framework/General/Types/RegionHandle.cs | |||
@@ -1,121 +1,121 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Net; | 2 | using System.Net; |
3 | 3 | ||
4 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
5 | { | 5 | { |
6 | /// <summary> | 6 | /// <summary> |
7 | /// A class for manipulating RegionHandle coordinates | 7 | /// A class for manipulating RegionHandle coordinates |
8 | /// </summary> | 8 | /// </summary> |
9 | class RegionHandle | 9 | class RegionHandle |
10 | { | 10 | { |
11 | private UInt64 handle; | 11 | private UInt64 handle; |
12 | 12 | ||
13 | /// <summary> | 13 | /// <summary> |
14 | /// Initialises a new grid-aware RegionHandle | 14 | /// Initialises a new grid-aware RegionHandle |
15 | /// </summary> | 15 | /// </summary> |
16 | /// <param name="ip">IP Address of the Grid Server for this region</param> | 16 | /// <param name="ip">IP Address of the Grid Server for this region</param> |
17 | /// <param name="x">Grid X Coordinate</param> | 17 | /// <param name="x">Grid X Coordinate</param> |
18 | /// <param name="y">Grid Y Coordinate</param> | 18 | /// <param name="y">Grid Y Coordinate</param> |
19 | public RegionHandle(string ip, short x, short y) | 19 | public RegionHandle(string ip, short x, short y) |
20 | { | 20 | { |
21 | IPAddress addr = IPAddress.Parse(ip); | 21 | IPAddress addr = IPAddress.Parse(ip); |
22 | 22 | ||
23 | if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) | 23 | if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) |
24 | throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); | 24 | throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); |
25 | 25 | ||
26 | uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); | 26 | uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); |
27 | 27 | ||
28 | // Split the IP address in half | 28 | // Split the IP address in half |
29 | short a = (short)((baseHandle << 16) & 0xFFFF); | 29 | short a = (short)((baseHandle << 16) & 0xFFFF); |
30 | short b = (short)((baseHandle << 0) & 0xFFFF); | 30 | short b = (short)((baseHandle << 0) & 0xFFFF); |
31 | 31 | ||
32 | // Raise the bounds a little | 32 | // Raise the bounds a little |
33 | uint nx = (uint)x; | 33 | uint nx = (uint)x; |
34 | uint ny = (uint)y; | 34 | uint ny = (uint)y; |
35 | 35 | ||
36 | // Multiply grid coords to get region coords | 36 | // Multiply grid coords to get region coords |
37 | nx *= 256; | 37 | nx *= 256; |
38 | ny *= 256; | 38 | ny *= 256; |
39 | 39 | ||
40 | // Stuff the IP address in too | 40 | // Stuff the IP address in too |
41 | nx = (uint)a << 16; | 41 | nx = (uint)a << 16; |
42 | ny = (uint)b << 16; | 42 | ny = (uint)b << 16; |
43 | 43 | ||
44 | handle = ((UInt64)nx << 32) | (uint)ny; | 44 | handle = ((UInt64)nx << 32) | (uint)ny; |
45 | } | 45 | } |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Initialises a new RegionHandle that is not inter-grid aware | 48 | /// Initialises a new RegionHandle that is not inter-grid aware |
49 | /// </summary> | 49 | /// </summary> |
50 | /// <param name="x">Grid X Coordinate</param> | 50 | /// <param name="x">Grid X Coordinate</param> |
51 | /// <param name="y">Grid Y Coordinate</param> | 51 | /// <param name="y">Grid Y Coordinate</param> |
52 | public RegionHandle(uint x, uint y) | 52 | public RegionHandle(uint x, uint y) |
53 | { | 53 | { |
54 | handle = ((x * 256) << 32) | (y * 256); | 54 | handle = ((x * 256) << 32) | (y * 256); |
55 | } | 55 | } |
56 | 56 | ||
57 | /// <summary> | 57 | /// <summary> |
58 | /// Initialises a new RegionHandle from an existing value | 58 | /// Initialises a new RegionHandle from an existing value |
59 | /// </summary> | 59 | /// </summary> |
60 | /// <param name="Region">A U64 RegionHandle</param> | 60 | /// <param name="Region">A U64 RegionHandle</param> |
61 | public RegionHandle(UInt64 Region) | 61 | public RegionHandle(UInt64 Region) |
62 | { | 62 | { |
63 | handle = Region; | 63 | handle = Region; |
64 | } | 64 | } |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. | 67 | /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. |
68 | /// </summary> | 68 | /// </summary> |
69 | /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> | 69 | /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> |
70 | /// <returns>Region Handle including IP Address encoding</returns> | 70 | /// <returns>Region Handle including IP Address encoding</returns> |
71 | public UInt64 getTeleportHandle() | 71 | public UInt64 getTeleportHandle() |
72 | { | 72 | { |
73 | return handle; | 73 | return handle; |
74 | } | 74 | } |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. | 77 | /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. |
78 | /// </summary> | 78 | /// </summary> |
79 | /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> | 79 | /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> |
80 | public UInt64 getNeighbourHandle() | 80 | public UInt64 getNeighbourHandle() |
81 | { | 81 | { |
82 | UInt64 mask = 0x0000FFFF0000FFFF; | 82 | UInt64 mask = 0x0000FFFF0000FFFF; |
83 | 83 | ||
84 | return handle | mask; | 84 | return handle | mask; |
85 | } | 85 | } |
86 | 86 | ||
87 | /// <summary> | 87 | /// <summary> |
88 | /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle | 88 | /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle |
89 | /// </summary> | 89 | /// </summary> |
90 | /// <returns>Grid Server IP Address</returns> | 90 | /// <returns>Grid Server IP Address</returns> |
91 | public IPAddress getGridIP() | 91 | public IPAddress getGridIP() |
92 | { | 92 | { |
93 | uint a = (uint)((handle >> 16) & 0xFFFF); | 93 | uint a = (uint)((handle >> 16) & 0xFFFF); |
94 | uint b = (uint)((handle >> 48) & 0xFFFF); | 94 | uint b = (uint)((handle >> 48) & 0xFFFF); |
95 | 95 | ||
96 | return new IPAddress((long)(a << 16) | (long)b); | 96 | return new IPAddress((long)(a << 16) | (long)b); |
97 | } | 97 | } |
98 | 98 | ||
99 | /// <summary> | 99 | /// <summary> |
100 | /// Returns the X Coordinate from a Grid-Encoded RegionHandle | 100 | /// Returns the X Coordinate from a Grid-Encoded RegionHandle |
101 | /// </summary> | 101 | /// </summary> |
102 | /// <returns>X Coordinate</returns> | 102 | /// <returns>X Coordinate</returns> |
103 | public uint getGridX() | 103 | public uint getGridX() |
104 | { | 104 | { |
105 | uint x = (uint)((handle >> 32) & 0xFFFF); | 105 | uint x = (uint)((handle >> 32) & 0xFFFF); |
106 | 106 | ||
107 | return x; | 107 | return x; |
108 | } | 108 | } |
109 | 109 | ||
110 | /// <summary> | 110 | /// <summary> |
111 | /// Returns the Y Coordinate from a Grid-Encoded RegionHandle | 111 | /// Returns the Y Coordinate from a Grid-Encoded RegionHandle |
112 | /// </summary> | 112 | /// </summary> |
113 | /// <returns>Y Coordinate</returns> | 113 | /// <returns>Y Coordinate</returns> |
114 | public uint getGridY() | 114 | public uint getGridY() |
115 | { | 115 | { |
116 | uint y = (uint)((handle >> 0) & 0xFFFF); | 116 | uint y = (uint)((handle >> 0) & 0xFFFF); |
117 | 117 | ||
118 | return y; | 118 | return y; |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index cfc0925..a216b52 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs | |||
@@ -1,342 +1,342 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Globalization; | 29 | using System.Globalization; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
34 | using OpenSim.Framework.Interfaces; | 34 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Framework.Utilities; | 35 | using OpenSim.Framework.Utilities; |
36 | 36 | ||
37 | namespace OpenSim.Framework.Types | 37 | namespace OpenSim.Framework.Types |
38 | { | 38 | { |
39 | public class RegionInfo | 39 | public class RegionInfo |
40 | { | 40 | { |
41 | public LLUUID SimUUID = new LLUUID(); | 41 | public LLUUID SimUUID = new LLUUID(); |
42 | public string RegionName = ""; | 42 | public string RegionName = ""; |
43 | 43 | ||
44 | private IPEndPoint m_internalEndPoint; | 44 | private IPEndPoint m_internalEndPoint; |
45 | public IPEndPoint InternalEndPoint | 45 | public IPEndPoint InternalEndPoint |
46 | { | 46 | { |
47 | get | 47 | get |
48 | { | 48 | { |
49 | return m_internalEndPoint; | 49 | return m_internalEndPoint; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | public IPEndPoint ExternalEndPoint | 53 | public IPEndPoint ExternalEndPoint |
54 | { | 54 | { |
55 | get | 55 | get |
56 | { | 56 | { |
57 | // Old one defaults to IPv6 | 57 | // Old one defaults to IPv6 |
58 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); | 58 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); |
59 | 59 | ||
60 | // New method favors IPv4 | 60 | // New method favors IPv4 |
61 | IPAddress ia = null; | 61 | IPAddress ia = null; |
62 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) | 62 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) |
63 | { | 63 | { |
64 | if (ia == null) | 64 | if (ia == null) |
65 | ia = Adr; | 65 | ia = Adr; |
66 | 66 | ||
67 | if (Adr.AddressFamily == AddressFamily.InterNetwork) | 67 | if (Adr.AddressFamily == AddressFamily.InterNetwork) |
68 | { | 68 | { |
69 | ia = Adr; | 69 | ia = Adr; |
70 | break; | 70 | break; |
71 | } | 71 | } |
72 | 72 | ||
73 | } | 73 | } |
74 | 74 | ||
75 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 75 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||
79 | private string m_externalHostName; | 79 | private string m_externalHostName; |
80 | public string ExternalHostName | 80 | public string ExternalHostName |
81 | { | 81 | { |
82 | get | 82 | get |
83 | { | 83 | { |
84 | return m_externalHostName; | 84 | return m_externalHostName; |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | private uint? m_regionLocX; | 88 | private uint? m_regionLocX; |
89 | public uint RegionLocX | 89 | public uint RegionLocX |
90 | { | 90 | { |
91 | get | 91 | get |
92 | { | 92 | { |
93 | return m_regionLocX.Value; | 93 | return m_regionLocX.Value; |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | private uint? m_regionLocY; | 97 | private uint? m_regionLocY; |
98 | public uint RegionLocY | 98 | public uint RegionLocY |
99 | { | 99 | { |
100 | get | 100 | get |
101 | { | 101 | { |
102 | return m_regionLocY.Value; | 102 | return m_regionLocY.Value; |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | private ulong? m_regionHandle; | 106 | private ulong? m_regionHandle; |
107 | public ulong RegionHandle | 107 | public ulong RegionHandle |
108 | { | 108 | { |
109 | get | 109 | get |
110 | { | 110 | { |
111 | if (!m_regionHandle.HasValue) | 111 | if (!m_regionHandle.HasValue) |
112 | { | 112 | { |
113 | m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); | 113 | m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); |
114 | } | 114 | } |
115 | 115 | ||
116 | return m_regionHandle.Value; | 116 | return m_regionHandle.Value; |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | // Only used for remote regions , ie ones not in the current instance | 120 | // Only used for remote regions , ie ones not in the current instance |
121 | private uint m_remotingPort; | 121 | private uint m_remotingPort; |
122 | public uint RemotingPort | 122 | public uint RemotingPort |
123 | { | 123 | { |
124 | get | 124 | get |
125 | { | 125 | { |
126 | return m_remotingPort; | 126 | return m_remotingPort; |
127 | } | 127 | } |
128 | set | 128 | set |
129 | { | 129 | { |
130 | m_remotingPort = value; | 130 | m_remotingPort = value; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | public string RemotingAddress; | 133 | public string RemotingAddress; |
134 | 134 | ||
135 | public string DataStore = ""; | 135 | public string DataStore = ""; |
136 | public bool isSandbox = false; | 136 | public bool isSandbox = false; |
137 | 137 | ||
138 | public LLUUID MasterAvatarAssignedUUID = new LLUUID(); | 138 | public LLUUID MasterAvatarAssignedUUID = new LLUUID(); |
139 | public string MasterAvatarFirstName = ""; | 139 | public string MasterAvatarFirstName = ""; |
140 | public string MasterAvatarLastName = ""; | 140 | public string MasterAvatarLastName = ""; |
141 | public string MasterAvatarSandboxPassword = ""; | 141 | public string MasterAvatarSandboxPassword = ""; |
142 | 142 | ||
143 | public EstateSettings estateSettings; | 143 | public EstateSettings estateSettings; |
144 | 144 | ||
145 | public RegionInfo() | 145 | public RegionInfo() |
146 | { | 146 | { |
147 | estateSettings = new EstateSettings(); | 147 | estateSettings = new EstateSettings(); |
148 | } | 148 | } |
149 | 149 | ||
150 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 150 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
151 | : this() | 151 | : this() |
152 | { | 152 | { |
153 | m_regionLocX = regionLocX; | 153 | m_regionLocX = regionLocX; |
154 | m_regionLocY = regionLocY; | 154 | m_regionLocY = regionLocY; |
155 | 155 | ||
156 | m_internalEndPoint = internalEndPoint; | 156 | m_internalEndPoint = internalEndPoint; |
157 | m_externalHostName = externalUri; | 157 | m_externalHostName = externalUri; |
158 | } | 158 | } |
159 | 159 | ||
160 | public void InitConfig(bool sandboxMode, IGenericConfig configData) | 160 | public void InitConfig(bool sandboxMode, IGenericConfig configData) |
161 | { | 161 | { |
162 | this.isSandbox = sandboxMode; | 162 | this.isSandbox = sandboxMode; |
163 | try | 163 | try |
164 | { | 164 | { |
165 | string attri = ""; | 165 | string attri = ""; |
166 | 166 | ||
167 | // Sim UUID | 167 | // Sim UUID |
168 | string simId = configData.GetAttribute("SimUUID"); | 168 | string simId = configData.GetAttribute("SimUUID"); |
169 | if (String.IsNullOrEmpty( simId )) | 169 | if (String.IsNullOrEmpty( simId )) |
170 | { | 170 | { |
171 | this.SimUUID = LLUUID.Random(); | 171 | this.SimUUID = LLUUID.Random(); |
172 | } | 172 | } |
173 | else | 173 | else |
174 | { | 174 | { |
175 | this.SimUUID = new LLUUID(simId); | 175 | this.SimUUID = new LLUUID(simId); |
176 | } | 176 | } |
177 | configData.SetAttribute("SimUUID", this.SimUUID.ToString()); | 177 | configData.SetAttribute("SimUUID", this.SimUUID.ToString()); |
178 | 178 | ||
179 | this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name"); | 179 | this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name"); |
180 | 180 | ||
181 | //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X"); | 181 | //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X"); |
182 | 182 | ||
183 | attri = ""; | 183 | attri = ""; |
184 | attri = configData.GetAttribute("SimLocationX"); | 184 | attri = configData.GetAttribute("SimLocationX"); |
185 | if (attri == "") | 185 | if (attri == "") |
186 | { | 186 | { |
187 | string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); | 187 | string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); |
188 | configData.SetAttribute("SimLocationX", location); | 188 | configData.SetAttribute("SimLocationX", location); |
189 | m_regionLocX = (uint)Convert.ToUInt32(location); | 189 | m_regionLocX = (uint)Convert.ToUInt32(location); |
190 | } | 190 | } |
191 | else | 191 | else |
192 | { | 192 | { |
193 | m_regionLocX = (uint)Convert.ToUInt32(attri); | 193 | m_regionLocX = (uint)Convert.ToUInt32(attri); |
194 | } | 194 | } |
195 | // Sim/Grid location Y | 195 | // Sim/Grid location Y |
196 | attri = ""; | 196 | attri = ""; |
197 | attri = configData.GetAttribute("SimLocationY"); | 197 | attri = configData.GetAttribute("SimLocationY"); |
198 | if (attri == "") | 198 | if (attri == "") |
199 | { | 199 | { |
200 | string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); | 200 | string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); |
201 | configData.SetAttribute("SimLocationY", location); | 201 | configData.SetAttribute("SimLocationY", location); |
202 | m_regionLocY = (uint)Convert.ToUInt32(location); | 202 | m_regionLocY = (uint)Convert.ToUInt32(location); |
203 | } | 203 | } |
204 | else | 204 | else |
205 | { | 205 | { |
206 | m_regionLocY = (uint)Convert.ToUInt32(attri); | 206 | m_regionLocY = (uint)Convert.ToUInt32(attri); |
207 | } | 207 | } |
208 | 208 | ||
209 | m_regionHandle = null; | 209 | m_regionHandle = null; |
210 | 210 | ||
211 | this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage"); | 211 | this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage"); |
212 | 212 | ||
213 | IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections"); | 213 | IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections"); |
214 | int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); | 214 | int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); |
215 | m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); | 215 | m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); |
216 | 216 | ||
217 | m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name"); | 217 | m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name"); |
218 | 218 | ||
219 | estateSettings.terrainFile = | 219 | estateSettings.terrainFile = |
220 | GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File"); | 220 | GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File"); |
221 | 221 | ||
222 | attri = ""; | 222 | attri = ""; |
223 | attri = configData.GetAttribute("TerrainMultiplier"); | 223 | attri = configData.GetAttribute("TerrainMultiplier"); |
224 | if (attri == "") | 224 | if (attri == "") |
225 | { | 225 | { |
226 | string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); | 226 | string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); |
227 | this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); | 227 | this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); |
228 | configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); | 228 | configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); |
229 | } | 229 | } |
230 | else | 230 | else |
231 | { | 231 | { |
232 | this.estateSettings.terrainMultiplier = Convert.ToDouble(attri); | 232 | this.estateSettings.terrainMultiplier = Convert.ToDouble(attri); |
233 | } | 233 | } |
234 | 234 | ||
235 | attri = ""; | 235 | attri = ""; |
236 | attri = configData.GetAttribute("MasterAvatarFirstName"); | 236 | attri = configData.GetAttribute("MasterAvatarFirstName"); |
237 | if (attri == "") | 237 | if (attri == "") |
238 | { | 238 | { |
239 | this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); | 239 | this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); |
240 | 240 | ||
241 | configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); | 241 | configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); |
242 | } | 242 | } |
243 | else | 243 | else |
244 | { | 244 | { |
245 | this.MasterAvatarFirstName = attri; | 245 | this.MasterAvatarFirstName = attri; |
246 | } | 246 | } |
247 | 247 | ||
248 | attri = ""; | 248 | attri = ""; |
249 | attri = configData.GetAttribute("MasterAvatarLastName"); | 249 | attri = configData.GetAttribute("MasterAvatarLastName"); |
250 | if (attri == "") | 250 | if (attri == "") |
251 | { | 251 | { |
252 | this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); | 252 | this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); |
253 | 253 | ||
254 | configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); | 254 | configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); |
255 | } | 255 | } |
256 | else | 256 | else |
257 | { | 257 | { |
258 | this.MasterAvatarLastName = attri; | 258 | this.MasterAvatarLastName = attri; |
259 | } | 259 | } |
260 | 260 | ||
261 | if (isSandbox) //Sandbox Mode Specific Settings | 261 | if (isSandbox) //Sandbox Mode Specific Settings |
262 | { | 262 | { |
263 | attri = ""; | 263 | attri = ""; |
264 | attri = configData.GetAttribute("MasterAvatarSandboxPassword"); | 264 | attri = configData.GetAttribute("MasterAvatarSandboxPassword"); |
265 | if (attri == "") | 265 | if (attri == "") |
266 | { | 266 | { |
267 | this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); | 267 | this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); |
268 | 268 | ||
269 | //Should I store this? | 269 | //Should I store this? |
270 | configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); | 270 | configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); |
271 | } | 271 | } |
272 | else | 272 | else |
273 | { | 273 | { |
274 | this.MasterAvatarSandboxPassword = attri; | 274 | this.MasterAvatarSandboxPassword = attri; |
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||
278 | configData.Commit(); | 278 | configData.Commit(); |
279 | } | 279 | } |
280 | catch (Exception e) | 280 | catch (Exception e) |
281 | { | 281 | { |
282 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | 282 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); |
283 | MainLog.Instance.Warn(e.ToString()); | 283 | MainLog.Instance.Warn(e.ToString()); |
284 | } | 284 | } |
285 | 285 | ||
286 | MainLog.Instance.Verbose("Sim settings loaded:"); | 286 | MainLog.Instance.Verbose("Sim settings loaded:"); |
287 | MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); | 287 | MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); |
288 | MainLog.Instance.Verbose("Name: " + this.RegionName); | 288 | MainLog.Instance.Verbose("Name: " + this.RegionName); |
289 | MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); | 289 | MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); |
290 | MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); | 290 | MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); |
291 | MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); | 291 | MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); |
292 | MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); | 292 | MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); |
293 | 293 | ||
294 | } | 294 | } |
295 | 295 | ||
296 | private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4) | 296 | private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4) |
297 | { | 297 | { |
298 | throw new Exception("The method or operation is not implemented."); | 298 | throw new Exception("The method or operation is not implemented."); |
299 | } | 299 | } |
300 | 300 | ||
301 | private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | 301 | private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) |
302 | { | 302 | { |
303 | string s = configData.GetAttribute(attrName); | 303 | string s = configData.GetAttribute(attrName); |
304 | 304 | ||
305 | if (String.IsNullOrEmpty( s )) | 305 | if (String.IsNullOrEmpty( s )) |
306 | { | 306 | { |
307 | s = MainLog.Instance.CmdPrompt(prompt, defaultvalue); | 307 | s = MainLog.Instance.CmdPrompt(prompt, defaultvalue); |
308 | configData.SetAttribute(attrName, s ); | 308 | configData.SetAttribute(attrName, s ); |
309 | } | 309 | } |
310 | return s; | 310 | return s; |
311 | } | 311 | } |
312 | 312 | ||
313 | private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | 313 | private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) |
314 | { | 314 | { |
315 | string addressStr = configData.GetAttribute(attrName); | 315 | string addressStr = configData.GetAttribute(attrName); |
316 | 316 | ||
317 | IPAddress address; | 317 | IPAddress address; |
318 | 318 | ||
319 | if (!IPAddress.TryParse(addressStr, out address)) | 319 | if (!IPAddress.TryParse(addressStr, out address)) |
320 | { | 320 | { |
321 | address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue); | 321 | address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue); |
322 | configData.SetAttribute(attrName, address.ToString()); | 322 | configData.SetAttribute(attrName, address.ToString()); |
323 | } | 323 | } |
324 | return address; | 324 | return address; |
325 | } | 325 | } |
326 | 326 | ||
327 | private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | 327 | private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt) |
328 | { | 328 | { |
329 | string portStr = configData.GetAttribute(attrName); | 329 | string portStr = configData.GetAttribute(attrName); |
330 | 330 | ||
331 | int port; | 331 | int port; |
332 | 332 | ||
333 | if (!int.TryParse(portStr, out port)) | 333 | if (!int.TryParse(portStr, out port)) |
334 | { | 334 | { |
335 | port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue); | 335 | port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue); |
336 | configData.SetAttribute(attrName, port.ToString()); | 336 | configData.SetAttribute(attrName, port.ToString()); |
337 | } | 337 | } |
338 | 338 | ||
339 | return port; | 339 | return port; |
340 | } | 340 | } |
341 | } | 341 | } |
342 | } | 342 | } |
diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs index 9cde18e..9e9654d 100644 --- a/OpenSim/Framework/General/Types/UUID.cs +++ b/OpenSim/Framework/General/Types/UUID.cs | |||
@@ -1,127 +1,127 @@ | |||
1 | using System; | 1 | using System; |
2 | using libsecondlife; | 2 | using libsecondlife; |
3 | 3 | ||
4 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
5 | { | 5 | { |
6 | class UUID | 6 | class UUID |
7 | { | 7 | { |
8 | public LLUUID llUUID; | 8 | public LLUUID llUUID; |
9 | 9 | ||
10 | public UUID(string uuid) | 10 | public UUID(string uuid) |
11 | { | 11 | { |
12 | llUUID = new LLUUID(uuid); | 12 | llUUID = new LLUUID(uuid); |
13 | } | 13 | } |
14 | 14 | ||
15 | public UUID(byte[] uuid) | 15 | public UUID(byte[] uuid) |
16 | { | 16 | { |
17 | llUUID = new LLUUID(uuid, 0); | 17 | llUUID = new LLUUID(uuid, 0); |
18 | } | 18 | } |
19 | 19 | ||
20 | public UUID(byte[] uuid, int offset) | 20 | public UUID(byte[] uuid, int offset) |
21 | { | 21 | { |
22 | llUUID = new LLUUID(uuid, offset); | 22 | llUUID = new LLUUID(uuid, offset); |
23 | } | 23 | } |
24 | 24 | ||
25 | public UUID() | 25 | public UUID() |
26 | { | 26 | { |
27 | llUUID = LLUUID.Zero; | 27 | llUUID = LLUUID.Zero; |
28 | } | 28 | } |
29 | 29 | ||
30 | public UUID(ulong uuid) | 30 | public UUID(ulong uuid) |
31 | { | 31 | { |
32 | llUUID = new LLUUID(uuid); | 32 | llUUID = new LLUUID(uuid); |
33 | } | 33 | } |
34 | 34 | ||
35 | public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) | 35 | public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) |
36 | { | 36 | { |
37 | byte[] uuid = new byte[16]; | 37 | byte[] uuid = new byte[16]; |
38 | 38 | ||
39 | byte[] n = BitConverter.GetBytes(first); | 39 | byte[] n = BitConverter.GetBytes(first); |
40 | n.CopyTo(uuid, 0); | 40 | n.CopyTo(uuid, 0); |
41 | n = BitConverter.GetBytes(second); | 41 | n = BitConverter.GetBytes(second); |
42 | n.CopyTo(uuid, 4); | 42 | n.CopyTo(uuid, 4); |
43 | n = BitConverter.GetBytes(third); | 43 | n = BitConverter.GetBytes(third); |
44 | n.CopyTo(uuid, 8); | 44 | n.CopyTo(uuid, 8); |
45 | n = BitConverter.GetBytes(fourth); | 45 | n = BitConverter.GetBytes(fourth); |
46 | n.CopyTo(uuid, 12); | 46 | n.CopyTo(uuid, 12); |
47 | 47 | ||
48 | llUUID = new LLUUID(uuid,0); | 48 | llUUID = new LLUUID(uuid,0); |
49 | } | 49 | } |
50 | 50 | ||
51 | public override string ToString() | 51 | public override string ToString() |
52 | { | 52 | { |
53 | return llUUID.ToString(); | 53 | return llUUID.ToString(); |
54 | } | 54 | } |
55 | 55 | ||
56 | public string ToStringHyphenated() | 56 | public string ToStringHyphenated() |
57 | { | 57 | { |
58 | return llUUID.ToStringHyphenated(); | 58 | return llUUID.ToStringHyphenated(); |
59 | } | 59 | } |
60 | 60 | ||
61 | public byte[] GetBytes() | 61 | public byte[] GetBytes() |
62 | { | 62 | { |
63 | return llUUID.GetBytes(); | 63 | return llUUID.GetBytes(); |
64 | } | 64 | } |
65 | 65 | ||
66 | public UInt32[] GetInts() | 66 | public UInt32[] GetInts() |
67 | { | 67 | { |
68 | UInt32[] ints = new UInt32[4]; | 68 | UInt32[] ints = new UInt32[4]; |
69 | ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); | 69 | ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); |
70 | ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); | 70 | ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); |
71 | ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); | 71 | ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); |
72 | ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); | 72 | ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); |
73 | 73 | ||
74 | return ints; | 74 | return ints; |
75 | } | 75 | } |
76 | 76 | ||
77 | public LLUUID GetLLUUID() | 77 | public LLUUID GetLLUUID() |
78 | { | 78 | { |
79 | return llUUID; | 79 | return llUUID; |
80 | } | 80 | } |
81 | 81 | ||
82 | public uint CRC() | 82 | public uint CRC() |
83 | { | 83 | { |
84 | return llUUID.CRC(); | 84 | return llUUID.CRC(); |
85 | } | 85 | } |
86 | 86 | ||
87 | public override int GetHashCode() | 87 | public override int GetHashCode() |
88 | { | 88 | { |
89 | return llUUID.GetHashCode(); | 89 | return llUUID.GetHashCode(); |
90 | } | 90 | } |
91 | 91 | ||
92 | public void Combine(UUID other) | 92 | public void Combine(UUID other) |
93 | { | 93 | { |
94 | llUUID.Combine(other.GetLLUUID()); | 94 | llUUID.Combine(other.GetLLUUID()); |
95 | } | 95 | } |
96 | 96 | ||
97 | public void Combine(LLUUID other) | 97 | public void Combine(LLUUID other) |
98 | { | 98 | { |
99 | llUUID.Combine(other); | 99 | llUUID.Combine(other); |
100 | } | 100 | } |
101 | 101 | ||
102 | public override bool Equals(Object other) | 102 | public override bool Equals(Object other) |
103 | { | 103 | { |
104 | return llUUID.Equals(other); | 104 | return llUUID.Equals(other); |
105 | } | 105 | } |
106 | 106 | ||
107 | public static bool operator ==(UUID a, UUID b) | 107 | public static bool operator ==(UUID a, UUID b) |
108 | { | 108 | { |
109 | return a.llUUID.Equals(b.GetLLUUID()); | 109 | return a.llUUID.Equals(b.GetLLUUID()); |
110 | } | 110 | } |
111 | 111 | ||
112 | public static bool operator !=(UUID a, UUID b) | 112 | public static bool operator !=(UUID a, UUID b) |
113 | { | 113 | { |
114 | return !a.llUUID.Equals(b.GetLLUUID()); | 114 | return !a.llUUID.Equals(b.GetLLUUID()); |
115 | } | 115 | } |
116 | 116 | ||
117 | public static bool operator ==(UUID a, LLUUID b) | 117 | public static bool operator ==(UUID a, LLUUID b) |
118 | { | 118 | { |
119 | return a.Equals(b); | 119 | return a.Equals(b); |
120 | } | 120 | } |
121 | 121 | ||
122 | public static bool operator !=(UUID a, LLUUID b) | 122 | public static bool operator !=(UUID a, LLUUID b) |
123 | { | 123 | { |
124 | return !a.Equals(b); | 124 | return !a.Equals(b); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | } | 127 | } |