diff options
author | Bill Blight | 2018-09-28 01:45:33 -0700 |
---|---|---|
committer | UbitUmarov | 2018-09-29 21:16:33 +0100 |
commit | 6d9de17d77d20e078b0e7c7546ac3ec047d334e8 (patch) | |
tree | cbf761ca67b97790bc8cc85f230db368e9ceba80 /OpenSim/Region | |
parent | add a few more gc collect in some spots (diff) | |
download | opensim-SC-6d9de17d77d20e078b0e7c7546ac3ec047d334e8.zip opensim-SC-6d9de17d77d20e078b0e7c7546ac3ec047d334e8.tar.gz opensim-SC-6d9de17d77d20e078b0e7c7546ac3ec047d334e8.tar.bz2 opensim-SC-6d9de17d77d20e078b0e7c7546ac3ec047d334e8.tar.xz |
**CONFIRMED**AGAIN** , Add new function, osSetOwnerSpeed(float speed), threat level moderate
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim/Region')
3 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6a0c274..82afab2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3655,7 +3655,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3655 | if (avatar != null) | 3655 | if (avatar != null) |
3656 | avatar.SpeedModifier = (float)SpeedModifier; | 3656 | avatar.SpeedModifier = (float)SpeedModifier; |
3657 | } | 3657 | } |
3658 | |||
3659 | public void osSetOwnerSpeed(LSL_Float SpeedModifier) | ||
3660 | { | ||
3661 | CheckThreatLevel(ThreatLevel.Moderate, "osSetOwnerSpeed"); | ||
3662 | if(SpeedModifier > 4)SpeedModifier = 4; | ||
3663 | ScenePresence avatar = World.GetScenePresence(m_host.OwnerID); | ||
3658 | 3664 | ||
3665 | if (avatar != null) | ||
3666 | avatar.SpeedModifier = (float)SpeedModifier; | ||
3667 | } | ||
3668 | |||
3659 | public void osKickAvatar(string FirstName, string SurName, string alert) | 3669 | public void osKickAvatar(string FirstName, string SurName, string alert) |
3660 | { | 3670 | { |
3661 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 3671 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 9f35d7a..23cccd0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -383,6 +383,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
383 | int osGetSimulatorMemoryKB(); | 383 | int osGetSimulatorMemoryKB(); |
384 | void osKickAvatar(string FirstName,string SurName,string alert); | 384 | void osKickAvatar(string FirstName,string SurName,string alert); |
385 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); | 385 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); |
386 | void osSetOwnerSpeed(LSL_Float SpeedModifier); | ||
386 | LSL_Float osGetHealth(string avatar); | 387 | LSL_Float osGetHealth(string avatar); |
387 | void osCauseHealing(string avatar, double healing); | 388 | void osCauseHealing(string avatar, double healing); |
388 | void osSetHealth(string avatar, double health); | 389 | void osSetHealth(string avatar, double health); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 5c6d233..609675c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -985,7 +985,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
985 | { | 985 | { |
986 | m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); | 986 | m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); |
987 | } | 987 | } |
988 | 988 | ||
989 | public void osSetOwnerSpeed(LSL_Float SpeedModifier) | ||
990 | { | ||
991 | m_OSSL_Functions.osSetOwnerSpeed(SpeedModifier); | ||
992 | } | ||
993 | |||
989 | public LSL_Float osGetHealth(string avatar) | 994 | public LSL_Float osGetHealth(string avatar) |
990 | { | 995 | { |
991 | return m_OSSL_Functions.osGetHealth(avatar); | 996 | return m_OSSL_Functions.osGetHealth(avatar); |