diff options
author | Melanie | 2013-05-16 21:59:14 +0100 |
---|---|---|
committer | Melanie | 2013-05-16 21:59:14 +0100 |
commit | 42c82b564ea0fe58376bffae2731bcedf4b842c7 (patch) | |
tree | 7ed5d564f320c1dcf6b709a1436b584a59e74a5e /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into careminster (diff) | |
parent | minor: remove long commented out scene cache clearing code in EntityTransferM... (diff) | |
download | opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.zip opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.gz opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.bz2 opensim-SC-42c82b564ea0fe58376bffae2731bcedf4b842c7.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index b524a18..3e69ab9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -546,21 +546,33 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
546 | 546 | ||
547 | set {m_data = value; } | 547 | set {m_data = value; } |
548 | } | 548 | } |
549 | // Function to obtain LSL type from an index. This is needed | 549 | |
550 | // because LSL lists allow for multiple types, and safely | 550 | /// <summary> |
551 | // iterating in them requires a type check. | 551 | /// Obtain LSL type from an index. |
552 | /// </summary> | ||
553 | /// <remarks> | ||
554 | /// This is needed because LSL lists allow for multiple types, and safely | ||
555 | /// iterating in them requires a type check. | ||
556 | /// </remarks> | ||
557 | /// <returns></returns> | ||
558 | /// <param name='itemIndex'></param> | ||
552 | public Type GetLSLListItemType(int itemIndex) | 559 | public Type GetLSLListItemType(int itemIndex) |
553 | { | 560 | { |
554 | return m_data[itemIndex].GetType(); | 561 | return m_data[itemIndex].GetType(); |
555 | } | 562 | } |
556 | 563 | ||
557 | // Member functions to obtain item as specific types. | 564 | /// <summary> |
558 | // For cases where implicit conversions would apply if items | 565 | /// Obtain float from an index. |
559 | // were not in a list (e.g. integer to float, but not float | 566 | /// </summary> |
560 | // to integer) functions check for alternate types so as to | 567 | /// <remarks> |
561 | // down-cast from Object to the correct type. | 568 | /// For cases where implicit conversions would apply if items |
562 | // Note: no checks for item index being valid are performed | 569 | /// were not in a list (e.g. integer to float, but not float |
563 | 570 | /// to integer) functions check for alternate types so as to | |
571 | /// down-cast from Object to the correct type. | ||
572 | /// Note: no checks for item index being valid are performed | ||
573 | /// </remarks> | ||
574 | /// <returns></returns> | ||
575 | /// <param name='itemIndex'></param> | ||
564 | public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) | 576 | public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) |
565 | { | 577 | { |
566 | if (m_data[itemIndex] is LSL_Types.LSLInteger) | 578 | if (m_data[itemIndex] is LSL_Types.LSLInteger) |
@@ -591,26 +603,14 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
591 | 603 | ||
592 | public LSL_Types.LSLString GetLSLStringItem(int itemIndex) | 604 | public LSL_Types.LSLString GetLSLStringItem(int itemIndex) |
593 | { | 605 | { |
594 | if (m_data[itemIndex] is LSL_Types.key) | 606 | if (m_data[itemIndex] is LSL_Types.key) |
595 | { | 607 | { |
596 | return (LSL_Types.key)m_data[itemIndex]; | 608 | return (LSL_Types.key)m_data[itemIndex]; |
597 | } | 609 | } |
598 | else if (m_data[itemIndex] is String) | 610 | else |
599 | { | 611 | { |
600 | return new LSL_Types.LSLString((string)m_data[itemIndex]); | 612 | return new LSL_Types.LSLString(m_data[itemIndex].ToString()); |
601 | } | 613 | } |
602 | else if (m_data[itemIndex] is LSL_Types.LSLFloat) | ||
603 | { | ||
604 | return new LSL_Types.LSLString((LSLFloat)m_data[itemIndex]); | ||
605 | } | ||
606 | else if (m_data[itemIndex] is LSL_Types.LSLInteger) | ||
607 | { | ||
608 | return new LSL_Types.LSLString((LSLInteger)m_data[itemIndex]); | ||
609 | } | ||
610 | else | ||
611 | { | ||
612 | return (LSL_Types.LSLString)m_data[itemIndex]; | ||
613 | } | ||
614 | } | 614 | } |
615 | 615 | ||
616 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) | 616 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) |