diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 702993b..5141e0e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3269,6 +3269,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3269 | if (new_groups == null) | 3269 | if (new_groups == null) |
3270 | return; | 3270 | return; |
3271 | 3271 | ||
3272 | bool notAttachment = !m_host.ParentGroup.IsAttachment; | ||
3273 | |||
3272 | foreach (SceneObjectGroup group in new_groups) | 3274 | foreach (SceneObjectGroup group in new_groups) |
3273 | { | 3275 | { |
3274 | // objects rezzed with this method are die_at_edge by default. | 3276 | // objects rezzed with this method are die_at_edge by default. |
@@ -3282,17 +3284,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3282 | group.RootPart.UUID.ToString()) }, | 3284 | group.RootPart.UUID.ToString()) }, |
3283 | new DetectParams[0])); | 3285 | new DetectParams[0])); |
3284 | 3286 | ||
3285 | float groupmass = group.GetMass(); | 3287 | if (notAttachment) |
3288 | { | ||
3289 | float groupmass = group.GetMass(); | ||
3286 | 3290 | ||
3287 | PhysicsActor pa = group.RootPart.PhysActor; | 3291 | PhysicsActor pa = group.RootPart.PhysActor; |
3288 | 3292 | ||
3289 | //Recoil. | 3293 | //Recoil. |
3290 | if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) | 3294 | if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) |
3291 | { | ||
3292 | Vector3 recoil = -vel * groupmass * m_recoilScaleFactor; | ||
3293 | if (recoil != Vector3.Zero) | ||
3294 | { | 3295 | { |
3295 | llApplyImpulse(recoil, 0); | 3296 | Vector3 recoil = -vel * groupmass * m_recoilScaleFactor; |
3297 | if (recoil != Vector3.Zero) | ||
3298 | { | ||
3299 | llApplyImpulse(recoil, 0); | ||
3300 | } | ||
3296 | } | 3301 | } |
3297 | } | 3302 | } |
3298 | // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) | 3303 | // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) |