Stop llRezAtRoot() from applying velocity setting impulse in World.RezObject, doing it only in itself, so its applyed after resuming scripts etc. It was giving twice the requested velocity.

avinationmerge
UbitUmarov 2012-06-05 04:43:23 +01:00
parent 170b820a11
commit 768447e41b
1 changed files with 3 additions and 2 deletions

View File

@ -3079,7 +3079,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// need the magnitude later
// float velmag = (float)Util.GetMagnitude(llvel);
SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), llvel, param);
// rez with zero velocity so we can apply it here after resume scripts etc
// SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), llvel, param);
SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, Rot2Quaternion(rot), Vector3.Zero, param);
// If either of these are null, then there was an unknown error.
if (new_group == null)
@ -3102,7 +3104,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (pa != null && pa.IsPhysical && llvel != Vector3.Zero)
{
//Recoil.
llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
}
// Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)