aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml1
-rw-r--r--OpenSim/Region/CoreModules/World/Land/DwellModule.cs110
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs1
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
5 files changed, 127 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 424e0ab..6c73d91 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -15,6 +15,7 @@
15 <RegionModule id="InventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.BasicInventoryAccessModule" /> 15 <RegionModule id="InventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.BasicInventoryAccessModule" />
16 <RegionModule id="HGInventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.HGInventoryAccessModule" /> 16 <RegionModule id="HGInventoryAccessModule" type="OpenSim.Region.CoreModules.Framework.InventoryAccess.HGInventoryAccessModule" />
17 <RegionModule id="LandManagementModule" type="OpenSim.Region.CoreModules.World.Land.LandManagementModule" /> 17 <RegionModule id="LandManagementModule" type="OpenSim.Region.CoreModules.World.Land.LandManagementModule" />
18 <RegionModule id="DwellModule" type="OpenSim.Region.CoreModules.World.Land.DwellModule" />
18 <RegionModule id="PrimCountModule" type="OpenSim.Region.CoreModules.World.Land.PrimCountModule" /> 19 <RegionModule id="PrimCountModule" type="OpenSim.Region.CoreModules.World.Land.PrimCountModule" />
19 <RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" /> 20 <RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" />
20 <RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" /> 21 <RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" />
diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs
new file mode 100644
index 0000000..d1f05a7
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs
@@ -0,0 +1,110 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Diagnostics;
32using System.Reflection;
33using System.Text;
34using log4net;
35using Nini.Config;
36using OpenMetaverse;
37using OpenMetaverse.StructuredData;
38using OpenMetaverse.Messages.Linden;
39using OpenSim.Framework;
40using OpenSim.Framework.Capabilities;
41using OpenSim.Framework.Console;
42using OpenSim.Framework.Servers;
43using OpenSim.Framework.Servers.HttpServer;
44using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
45using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes;
47using OpenSim.Region.Physics.Manager;
48using OpenSim.Services.Interfaces;
49using Caps = OpenSim.Framework.Capabilities.Caps;
50using GridRegion = OpenSim.Services.Interfaces.GridRegion;
51
52namespace OpenSim.Region.CoreModules.World.Land
53{
54 public class DwellModule : IDwellModule, INonSharedRegionModule
55 {
56 private Scene m_scene;
57
58 public Type ReplaceableInterface
59 {
60 get { return typeof(IDwellModule); }
61 }
62
63 public string Name
64 {
65 get { return "DwellModule"; }
66 }
67
68 public void Initialise(IConfigSource source)
69 {
70 }
71
72 public void AddRegion(Scene scene)
73 {
74 m_scene = scene;
75
76 m_scene.EventManager.OnNewClient += OnNewClient;
77 }
78
79 public void RegionLoaded(Scene scene)
80 {
81 }
82
83 public void RemoveRegion(Scene scene)
84 {
85 }
86
87 public void Close()
88 {
89 }
90
91 public void OnNewClient(IClientAPI client)
92 {
93 client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
94 }
95
96 private void ClientOnParcelDwellRequest(int localID, IClientAPI client)
97 {
98 ILandObject parcel = m_scene.LandChannel.GetLandObject(localID);
99 if (parcel == null)
100 return;
101
102 client.SendParcelDwellReply(localID, parcel.LandData.GlobalID, parcel.LandData.Dwell);
103 }
104
105 public int GetDwell(UUID parcelID)
106 {
107 return 0;
108 }
109 }
110}
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index aae6603..b5e2bc3 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -927,6 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land
927 ILandObject newLand = startLandObject.Copy(); 927 ILandObject newLand = startLandObject.Copy();
928 newLand.LandData.Name = newLand.LandData.Name; 928 newLand.LandData.Name = newLand.LandData.Name;
929 newLand.LandData.GlobalID = UUID.Random(); 929 newLand.LandData.GlobalID = UUID.Random();
930 newLand.LandData.Dwell = 0;
930 931
931 newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y)); 932 newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y));
932 933
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index ab58075..421ec79 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -67,6 +67,14 @@ namespace OpenSim.Region.Physics.OdePlugin
67 private int m_expectedCollisionContacts = 0; 67 private int m_expectedCollisionContacts = 0;
68 68
69 /// <summary> 69 /// <summary>
70 /// Gets collide bits so that we can still perform land collisions if a mesh fails to load.
71 /// </summary>
72 private int BadMeshAssetCollideBits
73 {
74 get { return m_isphysical ? (int)CollisionCategories.Land : 0; }
75 }
76
77 /// <summary>
70 /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. 78 /// Is this prim subject to physics? Even if not, it's still solid for collision purposes.
71 /// </summary> 79 /// </summary>
72 public override bool IsPhysical 80 public override bool IsPhysical
@@ -344,11 +352,10 @@ namespace OpenSim.Region.Physics.OdePlugin
344 if (m_assetFailed) 352 if (m_assetFailed)
345 { 353 {
346 d.GeomSetCategoryBits(prim_geom, 0); 354 d.GeomSetCategoryBits(prim_geom, 0);
347 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 355 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
348 } 356 }
349 else 357 else
350 { 358 {
351
352 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); 359 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
353 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 360 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
354 } 361 }
@@ -418,7 +425,7 @@ namespace OpenSim.Region.Physics.OdePlugin
418 if (m_assetFailed) 425 if (m_assetFailed)
419 { 426 {
420 d.GeomSetCategoryBits(prim_geom, 0); 427 d.GeomSetCategoryBits(prim_geom, 0);
421 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 428 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
422 } 429 }
423 else 430 else
424 { 431 {
@@ -851,11 +858,6 @@ namespace OpenSim.Region.Physics.OdePlugin
851 858
852 private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>(); 859 private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>();
853 860
854 public int BadAssetColideBits()
855 {
856 return (m_isphysical ? (int)CollisionCategories.Land : 0);
857 }
858
859 private void setMesh(OdeScene parent_scene, IMesh mesh) 861 private void setMesh(OdeScene parent_scene, IMesh mesh)
860 { 862 {
861// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); 863// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh);
@@ -1137,7 +1139,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1137 if (prm.m_assetFailed) 1139 if (prm.m_assetFailed)
1138 { 1140 {
1139 d.GeomSetCategoryBits(prm.prim_geom, 0); 1141 d.GeomSetCategoryBits(prm.prim_geom, 0);
1140 d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits()); 1142 d.GeomSetCollideBits(prm.prim_geom, prm.BadMeshAssetCollideBits);
1141 } 1143 }
1142 else 1144 else
1143 { 1145 {
@@ -1191,7 +1193,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1191 if (m_assetFailed) 1193 if (m_assetFailed)
1192 { 1194 {
1193 d.GeomSetCategoryBits(prim_geom, 0); 1195 d.GeomSetCategoryBits(prim_geom, 0);
1194 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 1196 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
1195 } 1197 }
1196 else 1198 else
1197 { 1199 {
@@ -1393,7 +1395,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1393 if (m_assetFailed) 1395 if (m_assetFailed)
1394 { 1396 {
1395 d.GeomSetCategoryBits(prim_geom, 0); 1397 d.GeomSetCategoryBits(prim_geom, 0);
1396 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 1398 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
1397 } 1399 }
1398 else 1400 else
1399 { 1401 {
@@ -2137,7 +2139,7 @@ Console.WriteLine(" JointCreateFixed");
2137 } 2139 }
2138 2140
2139 if (m_assetFailed) 2141 if (m_assetFailed)
2140 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 2142 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
2141 else 2143 else
2142 2144
2143 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 2145 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index c788407..bf66eb6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -613,6 +613,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
613 public const int CLICK_ACTION_OPEN = 4; 613 public const int CLICK_ACTION_OPEN = 4;
614 public const int CLICK_ACTION_PLAY = 5; 614 public const int CLICK_ACTION_PLAY = 5;
615 public const int CLICK_ACTION_OPEN_MEDIA = 6; 615 public const int CLICK_ACTION_OPEN_MEDIA = 6;
616 public const int CLICK_ACTION_ZOOM = 7;
616 617
617 // constants for the llDetectedTouch* functions 618 // constants for the llDetectedTouch* functions
618 public const int TOUCH_INVALID_FACE = -1; 619 public const int TOUCH_INVALID_FACE = -1;