aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-11-17 18:21:35 +0000
committerMelanie2010-11-17 18:21:35 +0000
commit3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816 (patch)
tree2c25eecf06d4dae3045b6ce5c66719ef15a27517 /OpenSim/Region
parentFix gesture and viewer preview sounds not playing (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.zip
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.gz
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.bz2
opensim-SC_OLD-3bc9c1adb4b4ed9d372e40d5cbd9d257b73c8816.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs13
3 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7ce3716..26ef0dd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2311,5 +2311,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2311 }); 2311 });
2312 return result; 2312 return result;
2313 } 2313 }
2314
2315 /// <summary>
2316 /// Convert a unix time to a llGetTimestamp() like string
2317 /// </summary>
2318 /// <param name="unixTime"></param>
2319 /// <returns></returns>
2320 public LSL_String osUnixTimeToTimestamp(long time)
2321 {
2322 CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp");
2323 long baseTicks = 621355968000000000;
2324 long tickResolution = 10000000;
2325 long epochTicks = (time * tickResolution) + baseTicks;
2326 DateTime date = new DateTime(epochTicks);
2327
2328 return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
2329 }
2314 } 2330 }
2315} 2331} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 028bb42..961987d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -184,5 +184,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
184 184
185 LSL_List osGetAvatarList(); 185 LSL_List osGetAvatarList();
186 186
187 LSL_String osUnixTimeToTimestamp(long time);
187 } 188 }
188} 189}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 370bf1d..f3142e6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -678,26 +678,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
678 { 678 {
679 return m_OSSL_Functions.osGetSimulatorMemory(); 679 return m_OSSL_Functions.osGetSimulatorMemory();
680 } 680 }
681
681 public void osKickAvatar(string FirstName,string SurName,string alert) 682 public void osKickAvatar(string FirstName,string SurName,string alert)
682 { 683 {
683 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); 684 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
684 } 685 }
686
685 public void osSetSpeed(string UUID, float SpeedModifier) 687 public void osSetSpeed(string UUID, float SpeedModifier)
686 { 688 {
687 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); 689 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
688 } 690 }
691
689 public void osCauseDamage(string avatar, double damage) 692 public void osCauseDamage(string avatar, double damage)
690 { 693 {
691 m_OSSL_Functions.osCauseDamage(avatar, damage); 694 m_OSSL_Functions.osCauseDamage(avatar, damage);
692 } 695 }
696
693 public void osCauseHealing(string avatar, double healing) 697 public void osCauseHealing(string avatar, double healing)
694 { 698 {
695 m_OSSL_Functions.osCauseHealing(avatar, healing); 699 m_OSSL_Functions.osCauseHealing(avatar, healing);
696 } 700 }
701
697 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) 702 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
698 { 703 {
699 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules); 704 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
700 } 705 }
706
701 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) 707 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
702 { 708 {
703 m_OSSL_Functions.osSetPrimitiveParams(prim, rules); 709 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
@@ -717,5 +723,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
717 { 723 {
718 return m_OSSL_Functions.osGetAvatarList(); 724 return m_OSSL_Functions.osGetAvatarList();
719 } 725 }
726
727 public LSL_String osUnixTimeToTimestamp(long time)
728 {
729 return m_OSSL_Functions.osUnixTimeToTimestamp(time);
730 }
720 } 731 }
721} 732} \ No newline at end of file