From 995cd25f3027e1debb0ae5fc60b5dde831c31d17 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 15 May 2012 02:36:11 +0200 Subject: Port the mel/dahlia fix --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 9 ++++++++- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 33c184f..ec7a454 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -170,6 +170,7 @@ namespace OpenSim.Data.MySQL "ParticleSystem, ClickAction, Material, " + "CollisionSound, CollisionSoundVolume, " + "PassTouches, " + + "PassCollisions, " + "LinkNumber, MediaURL, KeyframeMotion, " + "PhysicsShapeType, Density, GravityModifier, " + "Friction, Restitution) values (" + "?UUID, " + @@ -203,7 +204,7 @@ namespace OpenSim.Data.MySQL "?SaleType, ?ColorR, ?ColorG, " + "?ColorB, ?ColorA, ?ParticleSystem, " + "?ClickAction, ?Material, ?CollisionSound, " + - "?CollisionSoundVolume, ?PassTouches, " + + "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " + "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + "?PhysicsShapeType, ?Density, ?GravityModifier, " + "?Friction, ?Restitution)"; @@ -1231,6 +1232,7 @@ namespace OpenSim.Data.MySQL prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; prim.PassTouches = ((sbyte)row["PassTouches"] != 0); + prim.PassCollisions = ((sbyte)row["PassCollisions"] != 0); prim.LinkNum = (int)row["LinkNumber"]; if (!(row["MediaURL"] is System.DBNull)) @@ -1605,6 +1607,11 @@ namespace OpenSim.Data.MySQL else cmd.Parameters.AddWithValue("PassTouches", 0); + if (prim.PassCollisions) + cmd.Parameters.AddWithValue("PassCollisions", 1); + else + cmd.Parameters.AddWithValue("PassCollisions", 0); + cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 81244ef..7a1720c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4706,6 +4706,9 @@ namespace OpenSim.Region.Framework.Scenes public void aggregateScriptEvents() { + if (ParentGroup == null || ParentGroup.RootPart == null) + return; + AggregateScriptEvents = 0; // Aggregate script events -- cgit v1.1