diff options
author | idb | 2009-01-18 14:46:43 +0000 |
---|---|---|
committer | idb | 2009-01-18 14:46:43 +0000 |
commit | 63d2885008b0e5b01dd362c7e932e3c1818efa0a (patch) | |
tree | be05aac5ff83789da95b476a686fa494fb440cae /OpenSim/Region | |
parent | Subscribe to collision events if needed when turning an object to non-phantom... (diff) | |
download | opensim-SC-63d2885008b0e5b01dd362c7e932e3c1818efa0a.zip opensim-SC-63d2885008b0e5b01dd362c7e932e3c1818efa0a.tar.gz opensim-SC-63d2885008b0e5b01dd362c7e932e3c1818efa0a.tar.bz2 opensim-SC-63d2885008b0e5b01dd362c7e932e3c1818efa0a.tar.xz |
Moved applying an impulse to a newly rezzed object to minimise the delay getting the object moving.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 750b5b9..4db735a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -2472,7 +2472,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2472 | } | 2472 | } |
2473 | group.UpdateGroupRotation(rot); | 2473 | group.UpdateGroupRotation(rot); |
2474 | //group.ApplyPhysics(m_physicalPrim); | 2474 | //group.ApplyPhysics(m_physicalPrim); |
2475 | group.Velocity = vel; | 2475 | if (group.RootPart.PhysActor != null && group.RootPart.PhysActor.IsPhysical && vel != Vector3.Zero) |
2476 | { | ||
2477 | group.RootPart.ApplyImpulse(vel, false); | ||
2478 | group.Velocity = vel; | ||
2479 | rootPart.ScheduleFullUpdate(); | ||
2480 | } | ||
2476 | group.CreateScriptInstances(param, true, DefaultScriptEngine, 2); | 2481 | group.CreateScriptInstances(param, true, DefaultScriptEngine, 2); |
2477 | rootPart.ScheduleFullUpdate(); | 2482 | rootPart.ScheduleFullUpdate(); |
2478 | 2483 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8fd1ba3..51393a9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2491,7 +2491,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2491 | 2491 | ||
2492 | if (new_group.RootPart.PhysActor != null && new_group.RootPart.PhysActor.IsPhysical && llvel != Vector3.Zero) | 2492 | if (new_group.RootPart.PhysActor != null && new_group.RootPart.PhysActor.IsPhysical && llvel != Vector3.Zero) |
2493 | { | 2493 | { |
2494 | new_group.RootPart.ApplyImpulse(llvel, false); | ||
2495 | //Recoil. | 2494 | //Recoil. |
2496 | llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); | 2495 | llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); |
2497 | } | 2496 | } |