diff options
author | UbitUmarov | 2012-03-20 16:46:16 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-20 16:46:16 +0000 |
commit | efd7ff31468755c7066c68fb6b5910f7b18aa3f0 (patch) | |
tree | 1d5a73e701ac8d2260b39911bf21df09aed5156e /OpenSim/Region/Framework/Scenes | |
parent | Cause prims to be saved if extra physics parameters are changed (diff) | |
download | opensim-SC-efd7ff31468755c7066c68fb6b5910f7b18aa3f0.zip opensim-SC-efd7ff31468755c7066c68fb6b5910f7b18aa3f0.tar.gz opensim-SC-efd7ff31468755c7066c68fb6b5910f7b18aa3f0.tar.bz2 opensim-SC-efd7ff31468755c7066c68fb6b5910f7b18aa3f0.tar.xz |
add some more notifications about changes on physical parameters ( still incomple and there should be a better away )
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 18069af..ccc3f32 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1521,7 +1521,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1521 | { | 1521 | { |
1522 | SceneObjectPart part = GetSceneObjectPart(localID); | 1522 | SceneObjectPart part = GetSceneObjectPart(localID); |
1523 | if (part != null) | 1523 | if (part != null) |
1524 | { | ||
1524 | part.UpdateExtraPhysics(PhysData); | 1525 | part.UpdateExtraPhysics(PhysData); |
1526 | if (part.UpdatePhysRequired) | ||
1527 | remoteClient.SendPartPhysicsProprieties(part); | ||
1528 | } | ||
1525 | } | 1529 | } |
1526 | } | 1530 | } |
1527 | } | 1531 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9914c78..0ffd114 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1030,6 +1030,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | public UpdateRequired UpdateFlag { get; set; } | 1032 | public UpdateRequired UpdateFlag { get; set; } |
1033 | public bool UpdatePhysRequired { get; set; } | ||
1033 | 1034 | ||
1034 | /// <summary> | 1035 | /// <summary> |
1035 | /// Used for media on a prim. | 1036 | /// Used for media on a prim. |
@@ -1410,6 +1411,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1410 | if(ParentGroup != null) | 1411 | if(ParentGroup != null) |
1411 | ParentGroup.HasGroupChanged = true; | 1412 | ParentGroup.HasGroupChanged = true; |
1412 | ScheduleFullUpdateIfNone(); | 1413 | ScheduleFullUpdateIfNone(); |
1414 | UpdatePhysRequired = true; | ||
1413 | } | 1415 | } |
1414 | } | 1416 | } |
1415 | } | 1417 | } |
@@ -1501,11 +1503,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1501 | m_physicsShapeType = DefaultPhysicsShapeType(); | 1503 | m_physicsShapeType = DefaultPhysicsShapeType(); |
1502 | else | 1504 | else |
1503 | m_physicsShapeType = value; | 1505 | m_physicsShapeType = value; |
1504 | ScheduleFullUpdateIfNone(); | ||
1505 | } | 1506 | } |
1506 | else | 1507 | else |
1507 | m_physicsShapeType = DefaultPhysicsShapeType(); | 1508 | m_physicsShapeType = DefaultPhysicsShapeType(); |
1508 | ParentGroup.HasGroupChanged = true; | 1509 | |
1510 | if(m_physicsShapeType != value) | ||
1511 | UpdatePhysRequired = true; | ||
1509 | } | 1512 | } |
1510 | } | 1513 | } |
1511 | 1514 | ||
@@ -1517,9 +1520,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1517 | if (value >=1 && value <= 22587.0) | 1520 | if (value >=1 && value <= 22587.0) |
1518 | { | 1521 | { |
1519 | m_density = value; | 1522 | m_density = value; |
1520 | ScheduleFullUpdateIfNone(); | 1523 | UpdatePhysRequired = true; |
1521 | } | 1524 | } |
1522 | ParentGroup.HasGroupChanged = true; | ||
1523 | } | 1525 | } |
1524 | } | 1526 | } |
1525 | 1527 | ||
@@ -1529,8 +1531,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1529 | set | 1531 | set |
1530 | { if( value >= -1 && value <=28.0f) | 1532 | { if( value >= -1 && value <=28.0f) |
1531 | m_gravitymod = value; | 1533 | m_gravitymod = value; |
1532 | ScheduleFullUpdateIfNone(); | 1534 | UpdatePhysRequired = true; |
1533 | ParentGroup.HasGroupChanged = true; | ||
1534 | } | 1535 | } |
1535 | } | 1536 | } |
1536 | 1537 | ||
@@ -1542,9 +1543,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1542 | if (value >= 0 && value <= 255.0f) | 1543 | if (value >= 0 && value <= 255.0f) |
1543 | { | 1544 | { |
1544 | m_friction = value; | 1545 | m_friction = value; |
1545 | ScheduleFullUpdateIfNone(); | 1546 | UpdatePhysRequired = true; |
1546 | } | 1547 | } |
1547 | ParentGroup.HasGroupChanged = true; | ||
1548 | } | 1548 | } |
1549 | } | 1549 | } |
1550 | 1550 | ||
@@ -1556,9 +1556,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1556 | if (value >= 0 && value <= 1.0f) | 1556 | if (value >= 0 && value <= 1.0f) |
1557 | { | 1557 | { |
1558 | m_bounce = value; | 1558 | m_bounce = value; |
1559 | ScheduleFullUpdateIfNone(); | 1559 | UpdatePhysRequired = true; |
1560 | } | 1560 | } |
1561 | ParentGroup.HasGroupChanged = true; | ||
1562 | } | 1561 | } |
1563 | } | 1562 | } |
1564 | 1563 | ||