diff options
author | Melanie | 2012-03-15 10:24:40 +0100 |
---|---|---|
committer | Melanie | 2012-03-15 10:24:40 +0100 |
commit | b4adf652e70173775e3de01e2a556badb9fed8b4 (patch) | |
tree | 9d1a32d51ee3f96acf6f6a06b20dc9dcbd062429 | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Playing with object costs CAPS ... (diff) | |
download | opensim-SC_OLD-b4adf652e70173775e3de01e2a556badb9fed8b4.zip opensim-SC_OLD-b4adf652e70173775e3de01e2a556badb9fed8b4.tar.gz opensim-SC_OLD-b4adf652e70173775e3de01e2a556badb9fed8b4.tar.bz2 opensim-SC_OLD-b4adf652e70173775e3de01e2a556badb9fed8b4.tar.xz |
Merge branch 'ubitwork'
13 files changed, 276 insertions, 21 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c70b2a0..94acdba 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1320,6 +1320,8 @@ namespace OpenSim.Framework | |||
1320 | 1320 | ||
1321 | void SendObjectPropertiesReply(ISceneEntity Entity); | 1321 | void SendObjectPropertiesReply(ISceneEntity Entity); |
1322 | 1322 | ||
1323 | void SendPartPhysicsProprieties(ISceneEntity Entity); | ||
1324 | |||
1323 | void SendAgentOffline(UUID[] agentIDs); | 1325 | void SendAgentOffline(UUID[] agentIDs); |
1324 | 1326 | ||
1325 | void SendAgentOnline(UUID[] agentIDs); | 1327 | void SendAgentOnline(UUID[] agentIDs); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index df65af9..5542680 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -97,7 +97,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
97 | private static readonly string m_copyFromNotecardPath = "0007/"; | 97 | private static readonly string m_copyFromNotecardPath = "0007/"; |
98 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. | 98 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. |
99 | private static readonly string m_getObjectPhysicsDataPath = "0101/"; | 99 | private static readonly string m_getObjectPhysicsDataPath = "0101/"; |
100 | 100 | private static readonly string m_getObjectCostPath = "0102/"; | |
101 | private static readonly string m_ResourceCostSelectedPath = "0103/"; | ||
102 | |||
101 | 103 | ||
102 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 104 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
103 | // receive capability calls | 105 | // receive capability calls |
@@ -185,7 +187,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
185 | m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); | 187 | m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); |
186 | IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData); | 188 | IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData); |
187 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | 189 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); |
188 | 190 | IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); | |
191 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | ||
192 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | ||
193 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | ||
194 | |||
195 | |||
189 | // As of RC 1.22.9 of the Linden client this is | 196 | // As of RC 1.22.9 of the Linden client this is |
190 | // supported | 197 | // supported |
191 | 198 | ||
@@ -834,6 +841,115 @@ namespace OpenSim.Region.ClientStack.Linden | |||
834 | Console.WriteLine(response); | 841 | Console.WriteLine(response); |
835 | return response; | 842 | return response; |
836 | } | 843 | } |
844 | |||
845 | public string GetObjectCost(string request, string path, | ||
846 | string param, IOSHttpRequest httpRequest, | ||
847 | IOSHttpResponse httpResponse) | ||
848 | { | ||
849 | // see being triggered but see no efect .. have something wrong ?? | ||
850 | // | ||
851 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | ||
852 | OSDMap resp = new OSDMap(); | ||
853 | |||
854 | OSDArray object_ids = (OSDArray)req["object_ids"]; | ||
855 | |||
856 | for (int i = 0; i < object_ids.Count; i++) | ||
857 | { | ||
858 | UUID uuid = object_ids[i].AsUUID(); | ||
859 | |||
860 | // only see root parts .. so guess should go by SOG only | ||
861 | SceneObjectPart obj = m_Scene.GetSceneObjectPart(uuid); | ||
862 | if (obj != null) | ||
863 | { | ||
864 | OSDMap object_data = new OSDMap(); | ||
865 | |||
866 | object_data["linked_set_resource_cost"] = 1.0f; | ||
867 | object_data["resource_cost"] = 1.0f; | ||
868 | object_data["physics_cost"] = 1.0f; | ||
869 | object_data["linked_set_physics_cost"] = 1.0f; | ||
870 | |||
871 | resp[uuid.ToString()] = object_data; | ||
872 | } | ||
873 | } | ||
874 | |||
875 | string response = OSDParser.SerializeLLSDXmlString(resp); | ||
876 | Console.WriteLine(response); | ||
877 | return response; | ||
878 | } | ||
879 | |||
880 | public string ResourceCostSelected(string request, string path, | ||
881 | string param, IOSHttpRequest httpRequest, | ||
882 | IOSHttpResponse httpResponse) | ||
883 | { | ||
884 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | ||
885 | OSDMap resp = new OSDMap(); | ||
886 | |||
887 | |||
888 | float phys=0; | ||
889 | float stream=0; | ||
890 | float simul=0; | ||
891 | |||
892 | if (req.ContainsKey("selected_roots")) | ||
893 | { | ||
894 | OSDArray object_ids = (OSDArray)req["selected_roots"]; | ||
895 | |||
896 | // should go by SOG suming costs for all parts | ||
897 | // ll v3 works ok with several objects select we get the list and adds ok | ||
898 | // FS calls per object so results are wrong guess fs bug | ||
899 | for (int i = 0; i < object_ids.Count; i++) | ||
900 | { | ||
901 | UUID uuid = object_ids[i].AsUUID(); | ||
902 | |||
903 | SceneObjectPart obj = m_Scene.GetSceneObjectPart(uuid); | ||
904 | if (obj != null) | ||
905 | { | ||
906 | phys += 0.1f; // just to see... | ||
907 | stream += 0.2f; | ||
908 | simul += 0.5f; | ||
909 | } | ||
910 | } | ||
911 | } | ||
912 | else if (req.ContainsKey("selected_prims")) | ||
913 | { | ||
914 | OSDArray object_ids = (OSDArray)req["selected_prims"]; | ||
915 | |||
916 | // don't see in use in any of the 2 viewers | ||
917 | // guess it should be for edit linked but... nothing | ||
918 | // should go to SOP per part | ||
919 | for (int i = 0; i < object_ids.Count; i++) | ||
920 | { | ||
921 | UUID uuid = object_ids[i].AsUUID(); | ||
922 | |||
923 | SceneObjectPart obj = m_Scene.GetSceneObjectPart(uuid); | ||
924 | if (obj != null) | ||
925 | { | ||
926 | phys += 0.1f; | ||
927 | stream += 0.2f; | ||
928 | simul += 0.5f; | ||
929 | } | ||
930 | } | ||
931 | } | ||
932 | |||
933 | if (simul != 0) | ||
934 | { | ||
935 | OSDMap object_data = new OSDMap(); | ||
936 | |||
937 | object_data["physics"] = phys; | ||
938 | object_data["streaming"] = stream; | ||
939 | object_data["simulation"] = simul; | ||
940 | |||
941 | resp["selected"] = object_data; | ||
942 | } | ||
943 | |||
944 | string response = OSDParser.SerializeLLSDXmlString(resp); | ||
945 | Console.WriteLine(response); | ||
946 | return response; | ||
947 | } | ||
948 | |||
949 | |||
950 | |||
951 | |||
952 | |||
837 | } | 953 | } |
838 | 954 | ||
839 | public class AssetUploader | 955 | public class AssetUploader |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 7c07c56..a91b02c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -805,5 +805,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
805 | { | 805 | { |
806 | return EventQueueHelper.BuildEvent(eventName, eventBody); | 806 | return EventQueueHelper.BuildEvent(eventName, eventBody); |
807 | } | 807 | } |
808 | |||
809 | public void partPhysicsProperties(uint localID, byte physhapetype, | ||
810 | float density, float friction, float bounce, float gravmod,UUID avatarID) | ||
811 | { | ||
812 | OSD item = EventQueueHelper.partPhysicsProperties(localID, physhapetype, | ||
813 | density, friction, bounce, gravmod); | ||
814 | Enqueue(item, avatarID); | ||
815 | } | ||
808 | } | 816 | } |
809 | } | 817 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 3f49aba..b9222e3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | |||
@@ -395,5 +395,25 @@ namespace OpenSim.Region.ClientStack.Linden | |||
395 | return message; | 395 | return message; |
396 | } | 396 | } |
397 | 397 | ||
398 | public static OSD partPhysicsProperties(uint localID, byte physhapetype, | ||
399 | float density, float friction, float bounce, float gravmod) | ||
400 | { | ||
401 | |||
402 | OSDMap physinfo = new OSDMap(6); | ||
403 | physinfo["LocalID"] = localID; | ||
404 | physinfo["Density"] = density; | ||
405 | physinfo["Friction"] = friction; | ||
406 | physinfo["GravityMultiplier"] = gravmod; | ||
407 | physinfo["Restitution"] = bounce; | ||
408 | physinfo["PhysicsShapeType"] = (int)physhapetype; | ||
409 | |||
410 | OSDArray array = new OSDArray(1); | ||
411 | array.Add(physinfo); | ||
412 | |||
413 | OSDMap llsdBody = new OSDMap(1); | ||
414 | llsdBody.Add("ObjectData", array); | ||
415 | |||
416 | return BuildEvent("ObjectPhysicsProperties", llsdBody); | ||
417 | } | ||
398 | } | 418 | } |
399 | } | 419 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 23beaec..dd3b8aa 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2609,6 +2609,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2609 | } | 2609 | } |
2610 | } | 2610 | } |
2611 | 2611 | ||
2612 | public void SendPartPhysicsProprieties(ISceneEntity entity) | ||
2613 | { | ||
2614 | SceneObjectPart part = (SceneObjectPart)entity; | ||
2615 | if (part != null && AgentId != UUID.Zero) | ||
2616 | { | ||
2617 | try | ||
2618 | { | ||
2619 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
2620 | if (eq != null) | ||
2621 | { | ||
2622 | uint localid = part.LocalId; | ||
2623 | byte physshapetype = part.PhysicsShapeType; | ||
2624 | float density = part.Density; | ||
2625 | float friction = part.Friction; | ||
2626 | float bounce = part.Bounciness; | ||
2627 | float gravmod = part.GravityModifier; | ||
2628 | |||
2629 | eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId); | ||
2630 | } | ||
2631 | } | ||
2632 | catch (Exception ex) | ||
2633 | { | ||
2634 | m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString()); | ||
2635 | } | ||
2636 | } | ||
2637 | } | ||
2638 | |||
2639 | |||
2612 | 2640 | ||
2613 | public void SendGroupNameReply(UUID groupLLUID, string GroupName) | 2641 | public void SendGroupNameReply(UUID groupLLUID, string GroupName) |
2614 | { | 2642 | { |
@@ -7029,7 +7057,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7029 | physdata.Bounce = phsblock.Restitution; | 7057 | physdata.Bounce = phsblock.Restitution; |
7030 | physdata.Density = phsblock.Density; | 7058 | physdata.Density = phsblock.Density; |
7031 | physdata.Friction = phsblock.Friction; | 7059 | physdata.Friction = phsblock.Friction; |
7060 | physdata.GravitationModifier = phsblock.GravityMultiplier; | ||
7032 | } | 7061 | } |
7062 | |||
7033 | handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this); | 7063 | handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this); |
7034 | } | 7064 | } |
7035 | return true; | 7065 | return true; |
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 7b77ea0..4e9a8f8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1695,6 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1695 | { | 1695 | { |
1696 | part.Material = Convert.ToByte(material); | 1696 | part.Material = Convert.ToByte(material); |
1697 | group.HasGroupChanged = true; | 1697 | group.HasGroupChanged = true; |
1698 | remoteClient.SendPartPhysicsProprieties(part); | ||
1698 | } | 1699 | } |
1699 | } | 1700 | } |
1700 | } | 1701 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6feb333..5507aa0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2723,6 +2723,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2723 | // When we delete a group, we currently have to force persist to the database if the object id has changed | 2723 | // When we delete a group, we currently have to force persist to the database if the object id has changed |
2724 | // (since delete works by deleting all rows which have a given object id) | 2724 | // (since delete works by deleting all rows which have a given object id) |
2725 | 2725 | ||
2726 | // this is as it seems to be in sl now | ||
2727 | if(linkPart.PhysicsShapeType == (byte)PhysShapeType.none) | ||
2728 | linkPart.PhysicsShapeType = linkPart.DefaultPhysicsShapeType(); // root prims can't have type none for now | ||
2729 | |||
2726 | if (m_rootPart.PhysActor != null) | 2730 | if (m_rootPart.PhysActor != null) |
2727 | m_rootPart.PhysActor.Building = false; | 2731 | m_rootPart.PhysActor.Building = false; |
2728 | 2732 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a68b3eb..f188e8d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -986,7 +986,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
986 | public PrimitiveBaseShape Shape | 986 | public PrimitiveBaseShape Shape |
987 | { | 987 | { |
988 | get { return m_shape; } | 988 | get { return m_shape; } |
989 | set { m_shape = value;} | 989 | set |
990 | { | ||
991 | m_shape = value; | ||
992 | m_physicsShapeType = DefaultPhysicsShapeType(); | ||
993 | } | ||
990 | } | 994 | } |
991 | 995 | ||
992 | /// <summary> | 996 | /// <summary> |
@@ -1377,31 +1381,68 @@ namespace OpenSim.Region.Framework.Scenes | |||
1377 | { | 1381 | { |
1378 | if (value >= 0 && value <= (byte)SOPMaterialData.MaxMaterial) | 1382 | if (value >= 0 && value <= (byte)SOPMaterialData.MaxMaterial) |
1379 | { | 1383 | { |
1380 | m_material = (Material)value; | 1384 | bool update = false; |
1381 | m_friction = SOPMaterialData.friction(m_material); | 1385 | |
1382 | m_bounce = SOPMaterialData.bounce(m_material); | 1386 | if (m_material != (Material)value) |
1383 | if (PhysActor != null) | ||
1384 | { | 1387 | { |
1385 | PhysActor.SetMaterial((int)value); | 1388 | update = true; |
1389 | m_material = (Material)value; | ||
1390 | } | ||
1391 | |||
1392 | if (m_friction != SOPMaterialData.friction(m_material)) | ||
1393 | { | ||
1394 | update = true; | ||
1395 | m_friction = SOPMaterialData.friction(m_material); | ||
1396 | } | ||
1397 | |||
1398 | if (m_bounce != SOPMaterialData.bounce(m_material)) | ||
1399 | { | ||
1400 | update = true; | ||
1401 | m_bounce = SOPMaterialData.bounce(m_material); | ||
1402 | } | ||
1403 | |||
1404 | if (update) | ||
1405 | { | ||
1406 | if (PhysActor != null) | ||
1407 | { | ||
1408 | PhysActor.SetMaterial((int)value); | ||
1409 | } | ||
1410 | if(ParentGroup != null) | ||
1411 | ParentGroup.HasGroupChanged = true; | ||
1412 | ScheduleFullUpdateIfNone(); | ||
1386 | } | 1413 | } |
1387 | } | 1414 | } |
1388 | } | 1415 | } |
1389 | } | 1416 | } |
1390 | 1417 | ||
1418 | // not a propriety to move to methods place later | ||
1419 | public byte DefaultPhysicsShapeType() | ||
1420 | { | ||
1421 | byte type; | ||
1422 | |||
1423 | if (Shape != null && (Shape.SculptType == (byte)SculptType.Mesh)) | ||
1424 | type = (byte)PhysShapeType.convex; | ||
1425 | else | ||
1426 | type = (byte)PhysShapeType.prim; | ||
1427 | |||
1428 | return type; | ||
1429 | } | ||
1430 | |||
1391 | public byte PhysicsShapeType | 1431 | public byte PhysicsShapeType |
1392 | { | 1432 | { |
1393 | get { return m_physicsShapeType; } | 1433 | get { return m_physicsShapeType; } |
1394 | set | 1434 | set |
1395 | { | 1435 | { |
1396 | if (value < 0 || value >= (byte)PhysShapeType.convex) | 1436 | if (value >= 0 && value <= (byte)PhysShapeType.convex) |
1397 | value = (byte)PhysShapeType.prim; //convex not supported ? | ||
1398 | |||
1399 | else if (value == (byte)PhysShapeType.none) | ||
1400 | { | 1437 | { |
1401 | if (ParentGroup == null || ParentGroup.RootPart == this) | 1438 | if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) |
1402 | value = (byte)PhysShapeType.prim; | 1439 | m_physicsShapeType = DefaultPhysicsShapeType(); |
1440 | else | ||
1441 | m_physicsShapeType = value; | ||
1442 | ScheduleFullUpdateIfNone(); | ||
1403 | } | 1443 | } |
1404 | m_physicsShapeType = value; | 1444 | else |
1445 | m_physicsShapeType = DefaultPhysicsShapeType(); | ||
1405 | } | 1446 | } |
1406 | } | 1447 | } |
1407 | 1448 | ||
@@ -1413,6 +1454,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1413 | if (value >=1 && value <= 22587.0) | 1454 | if (value >=1 && value <= 22587.0) |
1414 | { | 1455 | { |
1415 | m_density = value; | 1456 | m_density = value; |
1457 | ScheduleFullUpdateIfNone(); | ||
1416 | } | 1458 | } |
1417 | } | 1459 | } |
1418 | } | 1460 | } |
@@ -1423,6 +1465,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1423 | set | 1465 | set |
1424 | { if( value >= -1 && value <=28.0f) | 1466 | { if( value >= -1 && value <=28.0f) |
1425 | m_gravitymod = value; | 1467 | m_gravitymod = value; |
1468 | ScheduleFullUpdateIfNone(); | ||
1426 | } | 1469 | } |
1427 | } | 1470 | } |
1428 | 1471 | ||
@@ -1434,6 +1477,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1434 | if (value >= 0 && value <= 255.0f) | 1477 | if (value >= 0 && value <= 255.0f) |
1435 | { | 1478 | { |
1436 | m_friction = value; | 1479 | m_friction = value; |
1480 | ScheduleFullUpdateIfNone(); | ||
1437 | } | 1481 | } |
1438 | } | 1482 | } |
1439 | } | 1483 | } |
@@ -1446,6 +1490,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1446 | if (value >= 0 && value <= 1.0f) | 1490 | if (value >= 0 && value <= 1.0f) |
1447 | { | 1491 | { |
1448 | m_bounce = value; | 1492 | m_bounce = value; |
1493 | ScheduleFullUpdateIfNone(); | ||
1449 | } | 1494 | } |
1450 | } | 1495 | } |
1451 | } | 1496 | } |
@@ -2942,6 +2987,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2942 | APIDTarget = Quaternion.Identity; | 2987 | APIDTarget = Quaternion.Identity; |
2943 | } | 2988 | } |
2944 | 2989 | ||
2990 | |||
2991 | |||
2992 | public void ScheduleFullUpdateIfNone() | ||
2993 | { | ||
2994 | if (ParentGroup == null) | ||
2995 | return; | ||
2996 | |||
2997 | // ??? ParentGroup.HasGroupChanged = true; | ||
2998 | |||
2999 | if (UpdateFlag != UpdateRequired.FULL) | ||
3000 | ScheduleFullUpdate(); | ||
3001 | } | ||
3002 | |||
2945 | /// <summary> | 3003 | /// <summary> |
2946 | /// Schedules this prim for a full update | 3004 | /// Schedules this prim for a full update |
2947 | /// </summary> | 3005 | /// </summary> |
@@ -4672,7 +4730,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4672 | ParentGroup.HasGroupChanged = true; | 4730 | ParentGroup.HasGroupChanged = true; |
4673 | ScheduleFullUpdate(); | 4731 | ScheduleFullUpdate(); |
4674 | } | 4732 | } |
4675 | 4733 | ||
4676 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); | 4734 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); |
4677 | } | 4735 | } |
4678 | 4736 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index dfa24e5..1cd8189 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -597,22 +597,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
597 | 597 | ||
598 | private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) | 598 | private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) |
599 | { | 599 | { |
600 | obj.Density = (byte)reader.ReadElementContentAsInt("Density", String.Empty); | 600 | obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); |
601 | } | 601 | } |
602 | 602 | ||
603 | private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) | 603 | private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) |
604 | { | 604 | { |
605 | obj.Friction = (byte)reader.ReadElementContentAsInt("Friction", String.Empty); | 605 | obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); |
606 | } | 606 | } |
607 | 607 | ||
608 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) | 608 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) |
609 | { | 609 | { |
610 | obj.Bounciness = (byte)reader.ReadElementContentAsInt("Bounce", String.Empty); | 610 | obj.Bounciness = reader.ReadElementContentAsFloat("Bounce", String.Empty); |
611 | } | 611 | } |
612 | 612 | ||
613 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) | 613 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) |
614 | { | 614 | { |
615 | obj.GravityModifier = (byte)reader.ReadElementContentAsInt("GravityModifier", String.Empty); | 615 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); |
616 | } | 616 | } |
617 | 617 | ||
618 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | 618 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) |
@@ -1321,7 +1321,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1321 | if (sop.sopVehicle != null) | 1321 | if (sop.sopVehicle != null) |
1322 | sop.sopVehicle.ToXml2(writer); | 1322 | sop.sopVehicle.ToXml2(writer); |
1323 | 1323 | ||
1324 | if(sop.PhysicsShapeType != (byte)PhysShapeType.prim) | 1324 | if(sop.PhysicsShapeType != sop.DefaultPhysicsShapeType()) |
1325 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); | 1325 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); |
1326 | if (sop.Density != 1000.0f) | 1326 | if (sop.Density != 1000.0f) |
1327 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); | 1327 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 18f8f34..1e87eed 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1703,5 +1703,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1703 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | 1703 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) |
1704 | { | 1704 | { |
1705 | } | 1705 | } |
1706 | |||
1707 | public void SendPartPhysicsProprieties(ISceneEntity entity) | ||
1708 | { | ||
1709 | } | ||
1710 | |||
1706 | } | 1711 | } |
1707 | } | 1712 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 5b9b071..7bd5590 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -1195,5 +1195,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1195 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | 1195 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) |
1196 | { | 1196 | { |
1197 | } | 1197 | } |
1198 | |||
1199 | public void SendPartPhysicsProprieties(ISceneEntity entity) | ||
1200 | { | ||
1201 | } | ||
1202 | |||
1198 | } | 1203 | } |
1199 | } | 1204 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index be6b81b..2fe22a5 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -1258,5 +1258,9 @@ namespace OpenSim.Tests.Common.Mock | |||
1258 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | 1258 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) |
1259 | { | 1259 | { |
1260 | } | 1260 | } |
1261 | |||
1262 | public void SendPartPhysicsProprieties(ISceneEntity entity) | ||
1263 | { | ||
1264 | } | ||
1261 | } | 1265 | } |
1262 | } | 1266 | } |