aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs22
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs25
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs4
4 files changed, 40 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b797cc3..ba2a2cf 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -745,7 +745,7 @@ namespace OpenSim.Region.Environment.Scenes
745 } 745 }
746 catch (Exception e) 746 catch (Exception e)
747 { 747 {
748 m_log.Error("[Scene]: Failed with exception " + e.ToString()); 748 m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
749 } 749 }
750 finally 750 finally
751 { 751 {
@@ -1230,32 +1230,32 @@ namespace OpenSim.Region.Environment.Scenes
1230 int thisx = (int)RegionInfo.RegionLocX; 1230 int thisx = (int)RegionInfo.RegionLocX;
1231 int thisy = (int)RegionInfo.RegionLocY; 1231 int thisy = (int)RegionInfo.RegionLocY;
1232 ulong newRegionHandle = 0; 1232 ulong newRegionHandle = 0;
1233 LLVector3 pos = grp.AbsolutePosition; 1233 LLVector3 pos = position;
1234 1234
1235 if (position.X > 255.6f) 1235 if (position.X > 257f)
1236 { 1236 {
1237 pos.X = ((pos.X - 256) + 10); 1237 pos.X = ((pos.X - 256));
1238 1238
1239 newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * 256), (uint)(thisy * 256)); 1239 newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * 256), (uint)(thisy * 256));
1240 1240
1241 // x + 1 1241 // x + 1
1242 } 1242 }
1243 else if (position.X < 0.4f) 1243 else if (position.X < -1f)
1244 { 1244 {
1245 pos.X = ((pos.X + 256) - 10); 1245 pos.X = ((pos.X + 256));
1246 newRegionHandle = Util.UIntsToLong((uint)((thisx - 1) * 256), (uint)(thisy * 256)); 1246 newRegionHandle = Util.UIntsToLong((uint)((thisx - 1) * 256), (uint)(thisy * 256));
1247 // x - 1 1247 // x - 1
1248 } 1248 }
1249 1249
1250 if (position.Y > 255.6f) 1250 if (position.Y > 257f)
1251 { 1251 {
1252 pos.Y = ((pos.Y - 256) + 10); 1252 pos.Y = ((pos.Y - 256));
1253 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy + 1) * 256)); 1253 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy + 1) * 256));
1254 // y + 1 1254 // y + 1
1255 } 1255 }
1256 else if (position.Y < 0.4f) 1256 else if (position.Y < -1f)
1257 { 1257 {
1258 pos.Y = ((pos.Y + 256) - 10); 1258 pos.Y = ((pos.Y + 256));
1259 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy - 1) * 256)); 1259 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy - 1) * 256));
1260 // y - 1 1260 // y - 1
1261 } 1261 }
@@ -1287,7 +1287,7 @@ namespace OpenSim.Region.Environment.Scenes
1287 } 1287 }
1288 public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) 1288 public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData)
1289 { 1289 {
1290 m_log.Warn("{[INTERREGION]: OMG! A new prim arrived from a neighbor!.. Kyill eeehht! before it corrupts my entire database! AHHH! I feel so dirty now! yuck! ack! arg!"); 1290 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
1291 m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); 1291 m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData);
1292 1292
1293 } 1293 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 3b146ea..117bcbc 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Scenes
126 set 126 set
127 { 127 {
128 LLVector3 val = value; 128 LLVector3 val = value;
129 if (val.X > 255.6f || val.X < 0.4f || val.Y > 255.6f || val.Y < 0.4f) 129 if (val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f)
130 { 130 {
131 m_scene.CrossPrimGroupIntoNewRegion(val, this); 131 m_scene.CrossPrimGroupIntoNewRegion(val, this);
132 } 132 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 7900900..4f5eefe 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -405,7 +405,19 @@ namespace OpenSim.Region.Environment.Scenes
405 405
406 return m_velocity; 406 return m_velocity;
407 } 407 }
408 set { m_velocity = value; } 408 set {
409
410 m_velocity = value;
411 if (PhysActor != null)
412 {
413 if (PhysActor.IsPhysical)
414 {
415 PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
416 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
417 }
418 }
419
420 }
409 } 421 }
410 422
411 public LLVector3 RotationalVelocity 423 public LLVector3 RotationalVelocity
@@ -742,6 +754,7 @@ namespace OpenSim.Region.Environment.Scenes
742 { 754 {
743 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); 755 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
744 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); 756 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader);
757
745 return newobject; 758 return newobject;
746 } 759 }
747 760
@@ -1776,6 +1789,16 @@ namespace OpenSim.Region.Environment.Scenes
1776 1789
1777 public void PhysicsRequestingTerseUpdate() 1790 public void PhysicsRequestingTerseUpdate()
1778 { 1791 {
1792 if (PhysActor != null)
1793 {
1794 LLVector3 newpos = new LLVector3(PhysActor.Position.GetBytes(), 0);
1795 if (newpos.X > 257f || newpos.X < -1f || newpos.Y > 257f || newpos.Y < -1f)
1796 {
1797 m_parentGroup.AbsolutePosition = newpos;
1798 return;
1799 }
1800
1801 }
1779 ScheduleTerseUpdate(); 1802 ScheduleTerseUpdate();
1780 1803
1781 //SendTerseUpdateToAllClients(); 1804 //SendTerseUpdateToAllClients();
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
index 6d911f1..4982613 100644
--- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
@@ -175,6 +175,8 @@ namespace OpenSim.Region.Environment.Scenes
175 public void CreatePrimFromXml(string xmlData) 175 public void CreatePrimFromXml(string xmlData)
176 { 176 {
177 SceneObjectGroup obj = new SceneObjectGroup(xmlData); 177 SceneObjectGroup obj = new SceneObjectGroup(xmlData);
178 LLVector3 receivedVelocity = obj.RootPart.Velocity;
179 //System.Console.WriteLine(obj.RootPart.Velocity.ToString());
178 m_innerScene.AddEntityFromStorage(obj); 180 m_innerScene.AddEntityFromStorage(obj);
179 181
180 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 182 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
@@ -191,6 +193,8 @@ namespace OpenSim.Region.Environment.Scenes
191 new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, 193 new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
192 rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); 194 rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
193 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 195 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
196 rootPart.Velocity = receivedVelocity;
197
194 } 198 }
195 } 199 }
196 200