diff options
author | Justin Clark-Casey (justincc) | 2013-02-07 23:09:47 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-07 23:09:47 +0000 |
commit | 9e17dc3daa04644c1a565d819a614c02022bdeed (patch) | |
tree | 014eb8cec88c68b2dedde009a508dde3b5b52aca /OpenSim/Region/Framework | |
parent | Fix a recent regression in e17392a where JsonSetValue() stopped working (prob... (diff) | |
parent | Plumb the path from the client to the extra physics params and back (diff) | |
download | opensim-SC_OLD-9e17dc3daa04644c1a565d819a614c02022bdeed.zip opensim-SC_OLD-9e17dc3daa04644c1a565d819a614c02022bdeed.tar.gz opensim-SC_OLD-9e17dc3daa04644c1a565d819a614c02022bdeed.tar.bz2 opensim-SC_OLD-9e17dc3daa04644c1a565d819a614c02022bdeed.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
4 files changed, 32 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index bfa5d17..5512642 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs | |||
@@ -59,5 +59,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
59 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); | 59 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); |
60 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); | 60 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); |
61 | OSD BuildEvent(string eventName, OSD eventBody); | 61 | OSD BuildEvent(string eventName, OSD eventBody); |
62 | void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID); | ||
63 | |||
62 | } | 64 | } |
63 | } | 65 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a4383fd..a84f6d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1408,7 +1408,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1408 | /// <param name="SetPhantom"></param> | 1408 | /// <param name="SetPhantom"></param> |
1409 | /// <param name="remoteClient"></param> | 1409 | /// <param name="remoteClient"></param> |
1410 | protected internal void UpdatePrimFlags( | 1410 | protected internal void UpdatePrimFlags( |
1411 | uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, IClientAPI remoteClient) | 1411 | uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, ExtraPhysicsData PhysData, IClientAPI remoteClient) |
1412 | { | 1412 | { |
1413 | SceneObjectGroup group = GetGroupByPrim(localID); | 1413 | SceneObjectGroup group = GetGroupByPrim(localID); |
1414 | if (group != null) | 1414 | if (group != null) |
@@ -1416,7 +1416,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1416 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) | 1416 | if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId)) |
1417 | { | 1417 | { |
1418 | // VolumeDetect can't be set via UI and will always be off when a change is made there | 1418 | // VolumeDetect can't be set via UI and will always be off when a change is made there |
1419 | group.UpdatePrimFlags(localID, UsePhysics, SetTemporary, SetPhantom, false); | 1419 | // now only change volume dtc if phantom off |
1420 | |||
1421 | if (PhysData.PhysShapeType == PhysShapeType.invalid) // check for extraPhysics data | ||
1422 | { | ||
1423 | bool vdtc; | ||
1424 | if (SetPhantom) // if phantom keep volumedtc | ||
1425 | vdtc = group.RootPart.VolumeDetectActive; | ||
1426 | else // else turn it off | ||
1427 | vdtc = false; | ||
1428 | |||
1429 | group.UpdatePrimFlags(localID, UsePhysics, SetTemporary, SetPhantom, vdtc); | ||
1430 | } | ||
1431 | else | ||
1432 | { | ||
1433 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1434 | if (part != null) | ||
1435 | { | ||
1436 | part.UpdateExtraPhysics(PhysData); | ||
1437 | if (part.UpdatePhysRequired) | ||
1438 | remoteClient.SendPartPhysicsProprieties(part); | ||
1439 | } | ||
1440 | } | ||
1420 | } | 1441 | } |
1421 | } | 1442 | } |
1422 | } | 1443 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 55b5462..cd40b29 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1042,6 +1042,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | public UpdateRequired UpdateFlag { get; set; } | 1044 | public UpdateRequired UpdateFlag { get; set; } |
1045 | public bool UpdatePhysRequired { get; set; } | ||
1045 | 1046 | ||
1046 | /// <summary> | 1047 | /// <summary> |
1047 | /// Used for media on a prim. | 1048 | /// Used for media on a prim. |
@@ -1390,7 +1391,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1390 | public float Density { get; set; } | 1391 | public float Density { get; set; } |
1391 | public float GravityModifier { get; set; } | 1392 | public float GravityModifier { get; set; } |
1392 | public float Friction { get; set; } | 1393 | public float Friction { get; set; } |
1393 | public float Bounciness { get; set; } | 1394 | public float Restitution { get; set; } |
1394 | 1395 | ||
1395 | #endregion Public Properties with only Get | 1396 | #endregion Public Properties with only Get |
1396 | 1397 | ||
@@ -3964,8 +3965,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3964 | GravityModifier = physdata.GravitationModifier; | 3965 | GravityModifier = physdata.GravitationModifier; |
3965 | if(Friction != physdata.Friction) | 3966 | if(Friction != physdata.Friction) |
3966 | Friction = physdata.Friction; | 3967 | Friction = physdata.Friction; |
3967 | if(Bounciness != physdata.Bounce) | 3968 | if(Restitution != physdata.Bounce) |
3968 | Bounciness = physdata.Bounce; | 3969 | Restitution = physdata.Bounce; |
3969 | } | 3970 | } |
3970 | /// <summary> | 3971 | /// <summary> |
3971 | /// Update the flags on this prim. This covers properties such as phantom, physics and temporary. | 3972 | /// Update the flags on this prim. This covers properties such as phantom, physics and temporary. |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 78229fe..39420a6 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -618,7 +618,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
618 | 618 | ||
619 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) | 619 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) |
620 | { | 620 | { |
621 | obj.Bounciness = reader.ReadElementContentAsFloat("Bounce", String.Empty); | 621 | obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); |
622 | } | 622 | } |
623 | 623 | ||
624 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) | 624 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) |
@@ -1295,8 +1295,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1295 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); | 1295 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); |
1296 | if (sop.Friction != 0.6f) | 1296 | if (sop.Friction != 0.6f) |
1297 | writer.WriteElementString("Friction", sop.Friction.ToString().ToLower()); | 1297 | writer.WriteElementString("Friction", sop.Friction.ToString().ToLower()); |
1298 | if (sop.Bounciness != 0.5f) | 1298 | if (sop.Restitution != 0.5f) |
1299 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); | 1299 | writer.WriteElementString("Bounce", sop.Restitution.ToString().ToLower()); |
1300 | if (sop.GravityModifier != 1.0f) | 1300 | if (sop.GravityModifier != 1.0f) |
1301 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); | 1301 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); |
1302 | 1302 | ||