aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2014-11-18 10:37:46 +0000
committerUbitUmarov2014-11-18 10:37:46 +0000
commit07074d068b21e6b93efa86d294cbcff527c826fa (patch)
tree6cd5a61cf30760b9980fb64c485167dcdf5237a9 /OpenSim/Region/ScriptEngine
parentn llPushObject if pushed object is a avatar use its rotation, not pusher (diff)
downloadopensim-SC_OLD-07074d068b21e6b93efa86d294cbcff527c826fa.zip
opensim-SC_OLD-07074d068b21e6b93efa86d294cbcff527c826fa.tar.gz
opensim-SC_OLD-07074d068b21e6b93efa86d294cbcff527c826fa.tar.bz2
opensim-SC_OLD-07074d068b21e6b93efa86d294cbcff527c826fa.tar.xz
dont do recoil on llRezObject called from attachments, as seem to happen
at sl
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 702993b..5141e0e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3269,6 +3269,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3269 if (new_groups == null) 3269 if (new_groups == null)
3270 return; 3270 return;
3271 3271
3272 bool notAttachment = !m_host.ParentGroup.IsAttachment;
3273
3272 foreach (SceneObjectGroup group in new_groups) 3274 foreach (SceneObjectGroup group in new_groups)
3273 { 3275 {
3274 // objects rezzed with this method are die_at_edge by default. 3276 // objects rezzed with this method are die_at_edge by default.
@@ -3282,17 +3284,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3282 group.RootPart.UUID.ToString()) }, 3284 group.RootPart.UUID.ToString()) },
3283 new DetectParams[0])); 3285 new DetectParams[0]));
3284 3286
3285 float groupmass = group.GetMass(); 3287 if (notAttachment)
3288 {
3289 float groupmass = group.GetMass();
3286 3290
3287 PhysicsActor pa = group.RootPart.PhysActor; 3291 PhysicsActor pa = group.RootPart.PhysActor;
3288 3292
3289 //Recoil. 3293 //Recoil.
3290 if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) 3294 if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero)
3291 {
3292 Vector3 recoil = -vel * groupmass * m_recoilScaleFactor;
3293 if (recoil != Vector3.Zero)
3294 { 3295 {
3295 llApplyImpulse(recoil, 0); 3296 Vector3 recoil = -vel * groupmass * m_recoilScaleFactor;
3297 if (recoil != Vector3.Zero)
3298 {
3299 llApplyImpulse(recoil, 0);
3300 }
3296 } 3301 }
3297 } 3302 }
3298 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 3303 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)