diff options
author | Melanie | 2011-10-26 17:48:51 +0100 |
---|---|---|
committer | Melanie | 2011-10-26 17:48:51 +0100 |
commit | 6a96c9546d4fd89f6e9319246cc2270836cf19f7 (patch) | |
tree | e6492419b9a03cb78435e911b345b4a31f749162 | |
parent | Merge branch 'master' into bigmerge (diff) | |
parent | Merge branch 'master' of /home/opensim/var/repo/opensim (diff) | |
download | opensim-SC_OLD-6a96c9546d4fd89f6e9319246cc2270836cf19f7.zip opensim-SC_OLD-6a96c9546d4fd89f6e9319246cc2270836cf19f7.tar.gz opensim-SC_OLD-6a96c9546d4fd89f6e9319246cc2270836cf19f7.tar.bz2 opensim-SC_OLD-6a96c9546d4fd89f6e9319246cc2270836cf19f7.tar.xz |
Merge branch 'master' into bigmerge
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | OpenSim/Framework/Watchdog.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 67 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/OpenSim.ini.example | 7 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 7 |
10 files changed, 120 insertions, 22 deletions
@@ -73,4 +73,20 @@ TAGS | |||
73 | Makefile.local | 73 | Makefile.local |
74 | bin/.version | 74 | bin/.version |
75 | compile.bat | 75 | compile.bat |
76 | 76 | addon-modules | |
77 | OpenSim/Data/Tests/test-results/ | ||
78 | OpenSim/Framework/Serialization/Tests/test-results/ | ||
79 | OpenSim/Framework/Servers/Tests/test-results/ | ||
80 | OpenSim/Framework/Tests/test-results/ | ||
81 | OpenSim/Region/ClientStack/Linden/Caps/test-results/ | ||
82 | OpenSim/Region/ClientStack/Linden/UDP/Tests/test-results/ | ||
83 | OpenSim/Region/CoreModules/test-results/ | ||
84 | OpenSim/Region/Framework/test-results/ | ||
85 | OpenSim/Region/OptionalModules/test-results/ | ||
86 | OpenSim/Region/Physics/BulletDotNETPlugin/ | ||
87 | OpenSim/Region/Physics/Manager/test-results/ | ||
88 | OpenSim/Region/Physics/OdePlugin/Tests/test-results/ | ||
89 | OpenSim/Region/ScriptEngine/test-results/ | ||
90 | OpenSim/Tests/Common/test-results/ | ||
91 | OpenSim/Tests/test-results/ | ||
92 | test-results/ | ||
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs index 952f039..e26a6f2 100644 --- a/OpenSim/Framework/Watchdog.cs +++ b/OpenSim/Framework/Watchdog.cs | |||
@@ -164,11 +164,7 @@ namespace OpenSim.Framework | |||
164 | return m_threads.Remove(threadID); | 164 | return m_threads.Remove(threadID); |
165 | } | 165 | } |
166 | 166 | ||
167 | <<<<<<< HEAD:OpenSim/Framework/Watchdog.cs | ||
168 | public static bool RemoveThread(int threadID) | ||
169 | ======= | ||
170 | public static bool AbortThread(int threadID) | 167 | public static bool AbortThread(int threadID) |
171 | >>>>>>> master:OpenSim/Framework/Watchdog.cs | ||
172 | { | 168 | { |
173 | lock (m_threads) | 169 | lock (m_threads) |
174 | { | 170 | { |
@@ -198,14 +194,10 @@ namespace OpenSim.Framework | |||
198 | try | 194 | try |
199 | { | 195 | { |
200 | if (m_threads.TryGetValue(threadID, out threadInfo)) | 196 | if (m_threads.TryGetValue(threadID, out threadInfo)) |
201 | <<<<<<< HEAD:OpenSim/Framework/Watchdog.cs | ||
202 | threadInfo.LastTick = Environment.TickCount; | ||
203 | ======= | ||
204 | { | 197 | { |
205 | threadInfo.LastTick = Environment.TickCount & Int32.MaxValue; | 198 | threadInfo.LastTick = Environment.TickCount & Int32.MaxValue; |
206 | threadInfo.IsTimedOut = false; | 199 | threadInfo.IsTimedOut = false; |
207 | } | 200 | } |
208 | >>>>>>> master:OpenSim/Framework/Watchdog.cs | ||
209 | else | 201 | else |
210 | { | 202 | { |
211 | m_log.WarnFormat("[WATCHDOG]: Asked to update thread {0} which is not being monitored", threadID); | 203 | m_log.WarnFormat("[WATCHDOG]: Asked to update thread {0} which is not being monitored", threadID); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8c7ce24..b2f5279 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1203,7 +1203,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1203 | { | 1203 | { |
1204 | m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); | 1204 | m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); |
1205 | HeartbeatThread.Abort(); | 1205 | HeartbeatThread.Abort(); |
1206 | Watchdog.RemoveThread(HeartbeatThread.ManagedThreadId); | 1206 | Watchdog.AbortThread(HeartbeatThread.ManagedThreadId); |
1207 | HeartbeatThread = null; | 1207 | HeartbeatThread = null; |
1208 | } | 1208 | } |
1209 | m_lastUpdate = Util.EnvironmentTickCount(); | 1209 | m_lastUpdate = Util.EnvironmentTickCount(); |
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs index 1bce760..58e2e4c 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | |||
@@ -1299,7 +1299,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1299 | { | 1299 | { |
1300 | if (m_eventsubscription > 0) | 1300 | if (m_eventsubscription > 0) |
1301 | { | 1301 | { |
1302 | CollisionEventsThisFrame.addCollider(CollidedWith, contact); | 1302 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); |
1303 | } | 1303 | } |
1304 | } | 1304 | } |
1305 | 1305 | ||
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 82f1b94..5f802d0 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | |||
@@ -2438,7 +2438,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!"); | |||
2438 | { | 2438 | { |
2439 | if (CollisionEventsThisFrame == null) | 2439 | if (CollisionEventsThisFrame == null) |
2440 | CollisionEventsThisFrame = new CollisionEventUpdate(); | 2440 | CollisionEventsThisFrame = new CollisionEventUpdate(); |
2441 | CollisionEventsThisFrame.addCollider(CollidedWith, contact); | 2441 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); |
2442 | } | 2442 | } |
2443 | 2443 | ||
2444 | public void SendCollisions() | 2444 | public void SendCollisions() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0e0c2b7..e53fd5d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3648,12 +3648,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3648 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) | 3648 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) |
3649 | { | 3649 | { |
3650 | m_host.AddScriptLPS(1); | 3650 | m_host.AddScriptLPS(1); |
3651 | m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 3651 | TargetOmega(m_host, axis, spinrate, gain); |
3652 | m_host.ScheduleTerseUpdate(); | ||
3653 | m_host.SendTerseUpdateToAllClients(); | ||
3654 | m_host.ParentGroup.HasGroupChanged = true; | ||
3655 | } | 3652 | } |
3656 | 3653 | ||
3654 | protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) | ||
3655 | { | ||
3656 | part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | ||
3657 | part.ScheduleTerseUpdate(); | ||
3658 | part.SendTerseUpdateToAllClients(); | ||
3659 | part.ParentGroup.HasGroupChanged = true; | ||
3660 | } | ||
3661 | |||
3657 | public LSL_Integer llGetStartParameter() | 3662 | public LSL_Integer llGetStartParameter() |
3658 | { | 3663 | { |
3659 | m_host.AddScriptLPS(1); | 3664 | m_host.AddScriptLPS(1); |
@@ -7936,6 +7941,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7936 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); | 7941 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); |
7937 | SetRot(part, Rot2Quaternion(lr)); | 7942 | SetRot(part, Rot2Quaternion(lr)); |
7938 | break; | 7943 | break; |
7944 | case (int)ScriptBaseClass.PRIM_OMEGA: | ||
7945 | if (remain < 3) | ||
7946 | return; | ||
7947 | LSL_Vector axis = rules.GetVector3Item(idx++); | ||
7948 | LSL_Float spinrate = rules.GetLSLFloatItem(idx++); | ||
7949 | LSL_Float gain = rules.GetLSLFloatItem(idx++); | ||
7950 | TargetOmega(part, axis, (double)spinrate, (double)gain); | ||
7951 | break; | ||
7952 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: | ||
7953 | if (remain < 1) | ||
7954 | return; | ||
7955 | LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++); | ||
7956 | part = part.ParentGroup.GetLinkNumPart((int)new_linknumber); | ||
7957 | break; | ||
7939 | } | 7958 | } |
7940 | } | 7959 | } |
7941 | 7960 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ed2f221..ab0eec9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -113,11 +113,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
113 | { | 113 | { |
114 | public List<UUID> AllowedCreators; | 114 | public List<UUID> AllowedCreators; |
115 | public List<UUID> AllowedOwners; | 115 | public List<UUID> AllowedOwners; |
116 | public List<string> AllowedOwnerClasses; | ||
116 | 117 | ||
117 | public FunctionPerms() | 118 | public FunctionPerms() |
118 | { | 119 | { |
119 | AllowedCreators = new List<UUID>(); | 120 | AllowedCreators = new List<UUID>(); |
120 | AllowedOwners = new List<UUID>(); | 121 | AllowedOwners = new List<UUID>(); |
122 | AllowedOwnerClasses = new List<string>(); | ||
121 | } | 123 | } |
122 | } | 124 | } |
123 | 125 | ||
@@ -254,6 +256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
254 | // Default behavior | 256 | // Default behavior |
255 | perms.AllowedOwners = null; | 257 | perms.AllowedOwners = null; |
256 | perms.AllowedCreators = null; | 258 | perms.AllowedCreators = null; |
259 | perms.AllowedOwnerClasses = null; | ||
257 | } | 260 | } |
258 | else | 261 | else |
259 | { | 262 | { |
@@ -274,12 +277,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
274 | foreach (string id in ids) | 277 | foreach (string id in ids) |
275 | { | 278 | { |
276 | string current = id.Trim(); | 279 | string current = id.Trim(); |
277 | UUID uuid; | 280 | if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER") |
278 | |||
279 | if (UUID.TryParse(current, out uuid)) | ||
280 | { | 281 | { |
281 | if (uuid != UUID.Zero) | 282 | if (!perms.AllowedOwnerClasses.Contains(current)) |
282 | perms.AllowedOwners.Add(uuid); | 283 | perms.AllowedOwnerClasses.Add(current.ToUpper()); |
284 | } | ||
285 | else | ||
286 | { | ||
287 | UUID uuid; | ||
288 | |||
289 | if (UUID.TryParse(current, out uuid)) | ||
290 | { | ||
291 | if (uuid != UUID.Zero) | ||
292 | perms.AllowedOwners.Add(uuid); | ||
293 | } | ||
283 | } | 294 | } |
284 | } | 295 | } |
285 | 296 | ||
@@ -335,11 +346,55 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
335 | String.Format("{0} permission error. Can't find script in prim inventory.", | 346 | String.Format("{0} permission error. Can't find script in prim inventory.", |
336 | function)); | 347 | function)); |
337 | } | 348 | } |
349 | |||
350 | UUID ownerID = ti.OwnerID; | ||
351 | |||
352 | //OSSL only may be used if objet is in the same group as the parcel | ||
353 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER")) | ||
354 | { | ||
355 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
356 | |||
357 | if (land.LandData.GroupID == ti.GroupID && land.LandData.GroupID != UUID.Zero) | ||
358 | { | ||
359 | return; | ||
360 | } | ||
361 | } | ||
362 | |||
363 | //Only Parcelowners may use the function | ||
364 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_OWNER")) | ||
365 | { | ||
366 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
367 | |||
368 | if (land.LandData.OwnerID == ownerID) | ||
369 | { | ||
370 | return; | ||
371 | } | ||
372 | } | ||
373 | |||
374 | //Only Estate Managers may use the function | ||
375 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ESTATE_MANAGER")) | ||
376 | { | ||
377 | //Only Estate Managers may use the function | ||
378 | if (World.RegionInfo.EstateSettings.IsEstateManager(ownerID) && World.RegionInfo.EstateSettings.EstateOwner != ownerID) | ||
379 | { | ||
380 | return; | ||
381 | } | ||
382 | } | ||
383 | |||
384 | //Only regionowners may use the function | ||
385 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ESTATE_OWNER")) | ||
386 | { | ||
387 | if (World.RegionInfo.EstateSettings.EstateOwner == ownerID) | ||
388 | { | ||
389 | return; | ||
390 | } | ||
391 | } | ||
392 | |||
338 | if (!m_FunctionPerms[function].AllowedCreators.Contains(ti.CreatorID)) | 393 | if (!m_FunctionPerms[function].AllowedCreators.Contains(ti.CreatorID)) |
339 | OSSLError( | 394 | OSSLError( |
340 | String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", | 395 | String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", |
341 | function)); | 396 | function)); |
342 | if (ti.CreatorID != ti.OwnerID) | 397 | if (ti.CreatorID != ownerID) |
343 | { | 398 | { |
344 | if ((ti.CurrentPermissions & (uint)PermissionMask.Modify) != 0) | 399 | if ((ti.CurrentPermissions & (uint)PermissionMask.Modify) != 0) |
345 | OSSLError( | 400 | OSSLError( |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 3af9911..a1cf3df 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -322,6 +322,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
322 | public const int PRIM_NAME = 27; | 322 | public const int PRIM_NAME = 27; |
323 | public const int PRIM_DESC = 28; | 323 | public const int PRIM_DESC = 28; |
324 | public const int PRIM_ROT_LOCAL = 29; | 324 | public const int PRIM_ROT_LOCAL = 29; |
325 | public const int PRIM_OMEGA = 32; | ||
326 | public const int PRIM_LINK_TARGET = 34; | ||
325 | public const int PRIM_TEXGEN_DEFAULT = 0; | 327 | public const int PRIM_TEXGEN_DEFAULT = 0; |
326 | public const int PRIM_TEXGEN_PLANAR = 1; | 328 | public const int PRIM_TEXGEN_PLANAR = 1; |
327 | 329 | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 44da31c..80f4c0e 100644..100755 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -617,6 +617,13 @@ | |||
617 | 617 | ||
618 | ; Comma separated list of UUIDS allows the function for that list of UUIDS | 618 | ; Comma separated list of UUIDS allows the function for that list of UUIDS |
619 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb | 619 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb |
620 | |||
621 | ; Comma separated list of owner classes that allow the function for a particular class of owners. Choices are | ||
622 | ; - PARCEL_GROUP_MEMBER: allow if objectgroup is the same group as the parcel | ||
623 | ; - PARCEL_OWNER: allow if the objectowner is parcelowner | ||
624 | ; - ESTATE_MANAGER: allow if the object owner is a estate manager | ||
625 | ; - ESTATE_OWNER: allow if objectowner is estateowner | ||
626 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb, PARCEL_OWNER, ESTATE_OWNER>, ... | ||
620 | 627 | ||
621 | ; You can also use script creators as the uuid | 628 | ; You can also use script creators as the uuid |
622 | ; Creators_osSetRegionWaterHeight = <uuid>, ... | 629 | ; Creators_osSetRegionWaterHeight = <uuid>, ... |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 306c17f..de2f787 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1196,6 +1196,13 @@ | |||
1196 | 1196 | ||
1197 | ; Comma separated list of UUIDS allows the function for that list of UUIDS | 1197 | ; Comma separated list of UUIDS allows the function for that list of UUIDS |
1198 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb | 1198 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb |
1199 | |||
1200 | ; Comma separated list of owner classes that allow the function for a particular class of owners. Choices are | ||
1201 | ; - PARCEL_GROUP_MEMBER: allow if objectgroup is the same group as the parcel | ||
1202 | ; - PARCEL_OWNER: allow if the objectowner is parcelowner | ||
1203 | ; - ESTATE_MANAGER: allow if the object owner is a estate manager | ||
1204 | ; - ESTATE_OWNER: allow if objectowner is estateowner | ||
1205 | ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb, PARCEL_OWNER, ESTATE_OWNER>, ... | ||
1199 | 1206 | ||
1200 | ; You can also use script creators as the uuid | 1207 | ; You can also use script creators as the uuid |
1201 | ; Creators_osSetRegionWaterHeight = <uuid>, ... | 1208 | ; Creators_osSetRegionWaterHeight = <uuid>, ... |