aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2013-11-03 21:34:36 +0000
committerMelanie2013-11-03 21:34:36 +0000
commitba203ed94fb9fb27e4da2663dad6cac21d5892e3 (patch)
treec03981fa7b9070af3cec331234b78762c49a8a06 /OpenSim/Region/ScriptEngine/Shared
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
parentAdd current .NET windows framework requirement to README. (diff)
downloadopensim-SC-ba203ed94fb9fb27e4da2663dad6cac21d5892e3.zip
opensim-SC-ba203ed94fb9fb27e4da2663dad6cac21d5892e3.tar.gz
opensim-SC-ba203ed94fb9fb27e4da2663dad6cac21d5892e3.tar.bz2
opensim-SC-ba203ed94fb9fb27e4da2663dad6cac21d5892e3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs49
1 files changed, 22 insertions, 27 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8892b69..89f4706 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3247,46 +3247,41 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3247 // need the magnitude later 3247 // need the magnitude later
3248 // float velmag = (float)Util.GetMagnitude(llvel); 3248 // float velmag = (float)Util.GetMagnitude(llvel);
3249 3249
3250 SceneObjectGroup new_group = World.RezObject(m_host, item, pos, rot, vel, param); 3250 List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param);
3251 3251
3252 // If either of these are null, then there was an unknown error. 3252 // If either of these are null, then there was an unknown error.
3253 if (new_group == null) 3253 if (new_groups == null)
3254 return; 3254 return;
3255 3255
3256 // objects rezzed with this method are die_at_edge by default. 3256 foreach (SceneObjectGroup group in new_groups)
3257 new_group.RootPart.SetDieAtEdge(true); 3257 {
3258 3258 // objects rezzed with this method are die_at_edge by default.
3259 new_group.ResumeScripts(); 3259 group.RootPart.SetDieAtEdge(true);
3260 3260
3261 m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( 3261 group.ResumeScripts();
3262 "object_rez", new Object[] {
3263 new LSL_String(
3264 new_group.RootPart.UUID.ToString()) },
3265 new DetectParams[0]));
3266 3262
3267 // do recoil 3263 m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams(
3268 SceneObjectGroup hostgrp = m_host.ParentGroup; 3264 "object_rez", new Object[] {
3269 if (hostgrp == null) 3265 new LSL_String(
3270 return; 3266 group.RootPart.UUID.ToString()) },
3267 new DetectParams[0]));
3271 3268
3272 if (hostgrp.IsAttachment) // don't recoil avatars 3269 float groupmass = group.GetMass();
3273 return;
3274 3270
3275 PhysicsActor pa = new_group.RootPart.PhysActor; 3271 PhysicsActor pa = group.RootPart.PhysActor;
3276 3272
3277 //Recoil. 3273 //Recoil.
3278 if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) 3274 if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero)
3279 {
3280 float groupmass = new_group.GetMass();
3281 Vector3 recoil = -vel * groupmass * m_recoilScaleFactor;
3282 if (recoil != Vector3.Zero)
3283 { 3275 {
3284 llApplyImpulse(recoil, 0); 3276 Vector3 recoil = -vel * groupmass * m_recoilScaleFactor;
3277 if (recoil != Vector3.Zero)
3278 {
3279 llApplyImpulse(recoil, 0);
3280 }
3285 } 3281 }
3282 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
3286 } 3283 }
3287 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
3288 return; 3284 return;
3289
3290 }); 3285 });
3291 3286
3292 //ScriptSleep((int)((groupmass * velmag) / 10)); 3287 //ScriptSleep((int)((groupmass * velmag) / 10));