aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BasicPhysicsPlugin
diff options
context:
space:
mode:
authorUbitUmarov2015-08-19 08:48:50 +0100
committerUbitUmarov2015-08-19 08:48:50 +0100
commit0b105da626ae8c2fb519a817b827f90534ed7d08 (patch)
tree509e6d091fb12f38fd09528335e51aeedbe59c08 /OpenSim/Region/Physics/BasicPhysicsPlugin
parentMerge branch 'master' into ubitworkmaster (diff)
parentvarregion: update MapImageServiceModule to upload multiple map tiles for larg... (diff)
downloadopensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.zip
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.gz
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.bz2
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.xz
Merge branch 'mbworkvar2' into ubitvar
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
index 0816b7b..8e40561 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
@@ -46,6 +46,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
46 private List<BasicActor> _actors = new List<BasicActor>(); 46 private List<BasicActor> _actors = new List<BasicActor>();
47 private List<BasicPhysicsPrim> _prims = new List<BasicPhysicsPrim>(); 47 private List<BasicPhysicsPrim> _prims = new List<BasicPhysicsPrim>();
48 private float[] _heightMap; 48 private float[] _heightMap;
49 private Vector3 m_regionExtent;
49 50
50 //protected internal string sceneIdentifier; 51 //protected internal string sceneIdentifier;
51 52
@@ -58,6 +59,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
58 59
59 public override void Initialise(IMesher meshmerizer, IConfigSource config) 60 public override void Initialise(IMesher meshmerizer, IConfigSource config)
60 { 61 {
62 throw new Exception("Should not be called.");
63 }
64
65 public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent)
66 {
67 m_regionExtent = regionExtent;
61 } 68 }
62 69
63 public override void Dispose() {} 70 public override void Dispose() {}
@@ -121,23 +128,23 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
121 { 128 {
122 actorPosition.Y = 0.1F; 129 actorPosition.Y = 0.1F;
123 } 130 }
124 else if (actor.Position.Y >= Constants.RegionSize) 131 else if (actor.Position.Y >= m_regionExtent.Y)
125 { 132 {
126 actorPosition.Y = ((int)Constants.RegionSize - 0.1f); 133 actorPosition.Y = (m_regionExtent.Y - 0.1f);
127 } 134 }
128 135
129 if (actor.Position.X < 0) 136 if (actor.Position.X < 0)
130 { 137 {
131 actorPosition.X = 0.1F; 138 actorPosition.X = 0.1F;
132 } 139 }
133 else if (actor.Position.X >= Constants.RegionSize) 140 else if (actor.Position.X >= m_regionExtent.X)
134 { 141 {
135 actorPosition.X = ((int)Constants.RegionSize - 0.1f); 142 actorPosition.X = (m_regionExtent.X - 0.1f);
136 } 143 }
137 144
138 float terrainHeight = 0; 145 float terrainHeight = 0;
139 if (_heightMap != null) 146 if (_heightMap != null)
140 terrainHeight = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X]; 147 terrainHeight = _heightMap[(int)actor.Position.Y * (int)m_regionExtent.Y + (int)actor.Position.X];
141 148
142 float height = terrainHeight + actor.Size.Z; 149 float height = terrainHeight + actor.Size.Z;
143 150