aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorUbitUmarov2012-06-29 01:17:53 +0100
committerUbitUmarov2012-06-29 01:17:53 +0100
commit7ab8bc0a60e88a8c7099829ff8cf70d2450432a2 (patch)
tree4499eda42e768d4378ee78c716bdef2c3d997e9d /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-7ab8bc0a60e88a8c7099829ff8cf70d2450432a2.zip
opensim-SC-7ab8bc0a60e88a8c7099829ff8cf70d2450432a2.tar.gz
opensim-SC-7ab8bc0a60e88a8c7099829ff8cf70d2450432a2.tar.bz2
opensim-SC-7ab8bc0a60e88a8c7099829ff8cf70d2450432a2.tar.xz
don't recoil attachments doing llRezObject()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-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 }