From 7ab8bc0a60e88a8c7099829ff8cf70d2450432a2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 29 Jun 2012 01:17:53 +0100 Subject: don't recoil attachments doing llRezObject() --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') 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 new_group.RootPart.UUID.ToString()) }, new DetectParams[0])); - float groupmass = new_group.GetMass(); + // do recoil + SceneObjectGroup hostgrp = m_host.ParentGroup; + if (hostgrp == null) + return; + + if (hostgrp.IsAttachment) // don't recoil avatars + return; PhysicsActor pa = new_group.RootPart.PhysActor; if (pa != null && pa.IsPhysical && llvel != Vector3.Zero) { - // recoil + float groupmass = new_group.GetMass(); llvel *= -groupmass; llApplyImpulse(new LSL_Vector(llvel.X, llvel.Y,llvel.Z), 0); } -- cgit v1.1