aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index f475b99..8c51473 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3129,13 +3129,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3129 new_group.RootPart.UUID.ToString()) }, 3129 new_group.RootPart.UUID.ToString()) },
3130 new DetectParams[0])); 3130 new DetectParams[0]));
3131 3131
3132 float groupmass = new_group.GetMass(); 3132 // do recoil
3133 SceneObjectGroup hostgrp = m_host.ParentGroup;
3134 if (hostgrp == null)
3135 return;
3136
3137 if (hostgrp.IsAttachment) // don't recoil avatars
3138 return;
3133 3139
3134 PhysicsActor pa = new_group.RootPart.PhysActor; 3140 PhysicsActor pa = new_group.RootPart.PhysActor;
3135 3141
3136 if (pa != null && pa.IsPhysical && llvel != Vector3.Zero) 3142 if (pa != null && pa.IsPhysical && llvel != Vector3.Zero)
3137 { 3143 {
3138 // recoil 3144 float groupmass = new_group.GetMass();
3139 llvel *= -groupmass; 3145 llvel *= -groupmass;
3140 llApplyImpulse(new LSL_Vector(llvel.X, llvel.Y,llvel.Z), 0); 3146 llApplyImpulse(new LSL_Vector(llvel.X, llvel.Y,llvel.Z), 0);
3141 } 3147 }