diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f9ee590..4c6950d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4888,6 +4888,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4888 | } | 4888 | } |
4889 | } | 4889 | } |
4890 | } | 4890 | } |
4891 | |||
4891 | if (pushAllowed) | 4892 | if (pushAllowed) |
4892 | { | 4893 | { |
4893 | float distance = (PusheePos - m_host.AbsolutePosition).Length(); | 4894 | float distance = (PusheePos - m_host.AbsolutePosition).Length(); |
@@ -4917,17 +4918,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4917 | applied_linear_impulse *= scaling_factor; | 4918 | applied_linear_impulse *= scaling_factor; |
4918 | 4919 | ||
4919 | } | 4920 | } |
4921 | |||
4920 | if (pusheeIsAvatar) | 4922 | if (pusheeIsAvatar) |
4921 | { | 4923 | { |
4922 | if (pusheeav != null) | 4924 | if (pusheeav != null) |
4923 | { | 4925 | { |
4924 | if (pusheeav.PhysicsActor != null) | 4926 | PhysicsActor pa = pusheeav.PhysicsActor; |
4927 | |||
4928 | if (pa != null) | ||
4925 | { | 4929 | { |
4926 | if (local != 0) | 4930 | if (local != 0) |
4927 | { | 4931 | { |
4928 | applied_linear_impulse *= m_host.GetWorldRotation(); | 4932 | applied_linear_impulse *= m_host.GetWorldRotation(); |
4929 | } | 4933 | } |
4930 | pusheeav.PhysicsActor.AddForce(applied_linear_impulse, true); | 4934 | |
4935 | pa.AddForce(applied_linear_impulse, true); | ||
4931 | } | 4936 | } |
4932 | } | 4937 | } |
4933 | } | 4938 | } |