diff options
author | Justin Clarke Casey | 2008-06-27 16:36:19 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-27 16:36:19 +0000 |
commit | 9bf67201c31d531e0480e67d8a96472d0a5b0c76 (patch) | |
tree | cb3123ab6062efd7f32762b5a8a88bf1f58a35a5 /OpenSim/Region/ScriptEngine | |
parent | dr scofield's warning safari: hunting down those little buggers (diff) | |
download | opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.zip opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.gz opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.bz2 opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.xz |
* Remove responsibilty for signalling scene object change from SceneObjectPart.SendFullUpdate()
* This means that we will no longer pointlessly repersist all the prims in the scene when OpenSim first starts up
* This also means that force-update on the console will not trigger repersistence.
* Also, in other places persistence is no longer done where it wasn't actually necessary
* I think I changed the code for all instances correctly, but it's not possible that I missed some and some things which did persist properly have stopped
* Please patch or mantis if this is the case
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 30 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 28 |
2 files changed, 54 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 0514573..7df1173 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -1058,6 +1058,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1058 | } | 1058 | } |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | /// <summary> | ||
1062 | /// Set flexi parameters of a part. | ||
1063 | /// | ||
1064 | /// FIXME: Much of this code should probably be within the part itself. | ||
1065 | /// </summary> | ||
1066 | /// <param name="part"></param> | ||
1067 | /// <param name="flexi"></param> | ||
1068 | /// <param name="softness"></param> | ||
1069 | /// <param name="gravity"></param> | ||
1070 | /// <param name="friction"></param> | ||
1071 | /// <param name="wind"></param> | ||
1072 | /// <param name="tension"></param> | ||
1073 | /// <param name="Force"></param> | ||
1061 | private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, | 1074 | private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, |
1062 | float wind, float tension, LSL_Types.Vector3 Force) | 1075 | float wind, float tension, LSL_Types.Vector3 Force) |
1063 | { | 1076 | { |
@@ -1097,14 +1110,26 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1097 | if (needs_fakedelete) | 1110 | if (needs_fakedelete) |
1098 | { | 1111 | { |
1099 | if (part.ParentGroup != null) | 1112 | if (part.ParentGroup != null) |
1100 | { | 1113 | { |
1101 | part.ParentGroup.FakeDeleteGroup(); | 1114 | part.ParentGroup.FakeDeleteGroup(); |
1102 | } | 1115 | } |
1103 | } | 1116 | } |
1104 | 1117 | ||
1118 | part.ParentGroup.HasGroupChanged = true; | ||
1105 | part.ScheduleFullUpdate(); | 1119 | part.ScheduleFullUpdate(); |
1106 | } | 1120 | } |
1107 | 1121 | ||
1122 | /// <summary> | ||
1123 | /// Set a light point on a part | ||
1124 | /// | ||
1125 | /// FIXME: Much of this code should probably be in SceneObjectGroup | ||
1126 | /// </summary> | ||
1127 | /// <param name="part"></param> | ||
1128 | /// <param name="light"></param> | ||
1129 | /// <param name="color"></param> | ||
1130 | /// <param name="intensity"></param> | ||
1131 | /// <param name="radius"></param> | ||
1132 | /// <param name="falloff"></param> | ||
1108 | private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) | 1133 | private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) |
1109 | { | 1134 | { |
1110 | if (part == null) | 1135 | if (part == null) |
@@ -1125,6 +1150,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1125 | part.Shape.LightEntry = false; | 1150 | part.Shape.LightEntry = false; |
1126 | } | 1151 | } |
1127 | 1152 | ||
1153 | part.ParentGroup.HasGroupChanged = true; | ||
1128 | part.ScheduleFullUpdate(); | 1154 | part.ScheduleFullUpdate(); |
1129 | } | 1155 | } |
1130 | 1156 | ||
@@ -1583,7 +1609,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1583 | m_host.SoundGain = volume; | 1609 | m_host.SoundGain = volume; |
1584 | m_host.SoundFlags = 1; // looping | 1610 | m_host.SoundFlags = 1; // looping |
1585 | m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? | 1611 | m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? |
1586 | 1612 | ||
1587 | m_host.ScheduleFullUpdate(); | 1613 | m_host.ScheduleFullUpdate(); |
1588 | m_host.SendFullUpdateToAllClients(); | 1614 | m_host.SendFullUpdateToAllClients(); |
1589 | } | 1615 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 477c6a8..fea3fc2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -911,6 +911,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
911 | } | 911 | } |
912 | } | 912 | } |
913 | 913 | ||
914 | /// <summary> | ||
915 | /// Set flexi parameters of a part. | ||
916 | /// | ||
917 | /// FIXME: Much of this code should probably be within the part itself. | ||
918 | /// </summary> | ||
919 | /// <param name="part"></param> | ||
920 | /// <param name="flexi"></param> | ||
921 | /// <param name="softness"></param> | ||
922 | /// <param name="gravity"></param> | ||
923 | /// <param name="friction"></param> | ||
924 | /// <param name="wind"></param> | ||
925 | /// <param name="tension"></param> | ||
926 | /// <param name="Force"></param> | ||
914 | private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, | 927 | private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, |
915 | float wind, float tension, LSL_Types.Vector3 Force) | 928 | float wind, float tension, LSL_Types.Vector3 Force) |
916 | { | 929 | { |
@@ -955,9 +968,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
955 | } | 968 | } |
956 | } | 969 | } |
957 | 970 | ||
971 | part.ParentGroup.HasGroupChanged = true; | ||
958 | part.ScheduleFullUpdate(); | 972 | part.ScheduleFullUpdate(); |
959 | } | 973 | } |
960 | 974 | ||
975 | /// <summary> | ||
976 | /// Set a light point on a part | ||
977 | /// | ||
978 | /// FIXME: Much of this code should probably be in SceneObjectGroup | ||
979 | /// </summary> | ||
980 | /// <param name="part"></param> | ||
981 | /// <param name="light"></param> | ||
982 | /// <param name="color"></param> | ||
983 | /// <param name="intensity"></param> | ||
984 | /// <param name="radius"></param> | ||
985 | /// <param name="falloff"></param> | ||
961 | private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) | 986 | private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) |
962 | { | 987 | { |
963 | if (part == null) | 988 | if (part == null) |
@@ -978,11 +1003,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
978 | part.Shape.LightEntry = false; | 1003 | part.Shape.LightEntry = false; |
979 | } | 1004 | } |
980 | 1005 | ||
1006 | part.ParentGroup.HasGroupChanged = true; | ||
981 | part.ScheduleFullUpdate(); | 1007 | part.ScheduleFullUpdate(); |
982 | } | 1008 | } |
983 | 1009 | ||
984 | |||
985 | |||
986 | public LSL_Types.Vector3 llGetColor(int face) | 1010 | public LSL_Types.Vector3 llGetColor(int face) |
987 | { | 1011 | { |
988 | m_host.AddScriptLPS(1); | 1012 | m_host.AddScriptLPS(1); |