aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2012-06-05 05:52:25 +0100
committerUbitUmarov2012-06-05 05:52:25 +0100
commit372b76031bc6ae43d075a53574581d451e1200f3 (patch)
treebac8e6fb0146763ab01ac8b7695d184a087655f5 /OpenSim/Region/ScriptEngine
parent Stop llRezAtRoot() from applying velocity setting impulse in World.RezObject... (diff)
downloadopensim-SC_OLD-372b76031bc6ae43d075a53574581d451e1200f3.zip
opensim-SC_OLD-372b76031bc6ae43d075a53574581d451e1200f3.tar.gz
opensim-SC_OLD-372b76031bc6ae43d075a53574581d451e1200f3.tar.bz2
opensim-SC_OLD-372b76031bc6ae43d075a53574581d451e1200f3.tar.xz
revert last bad commit but fix recoil direction
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e825b74..d83b05d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3079,9 +3079,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3079 // need the magnitude later 3079 // need the magnitude later
3080 // float velmag = (float)Util.GetMagnitude(llvel); 3080 // float velmag = (float)Util.GetMagnitude(llvel);
3081 3081
3082 // rez with zero velocity so we can apply it here after resume scripts etc 3082 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), llvel, param);
3083// SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), llvel, param);
3084 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), Vector3.Zero, param);
3085 3083
3086 // If either of these are null, then there was an unknown error. 3084 // If either of these are null, then there was an unknown error.
3087 if (new_group == null) 3085 if (new_group == null)
@@ -3104,7 +3102,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3104 3102
3105 if (pa != null && pa.IsPhysical && llvel != Vector3.Zero) 3103 if (pa != null && pa.IsPhysical && llvel != Vector3.Zero)
3106 { 3104 {
3107 llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); 3105 // recoil
3106 llvel *= -groupmass;
3107 llApplyImpulse(new LSL_Vector(llvel.X, llvel.Y,llvel.Z), 0);
3108 } 3108 }
3109 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 3109 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
3110 return; 3110 return;