diff options
author | Tedd Hansen | 2007-12-31 19:18:17 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-12-31 19:18:17 +0000 |
commit | ff4f2f568163e61a71f324c1e90b4d2e863839f7 (patch) | |
tree | 98c35b9d3170af91dab6c64c2280f4195bb9e885 /OpenSim/Region/ScriptEngine/DotNetEngine | |
parent | Correctly output library inventory folder type and version information (diff) | |
download | opensim-SC_OLD-ff4f2f568163e61a71f324c1e90b4d2e863839f7.zip opensim-SC_OLD-ff4f2f568163e61a71f324c1e90b4d2e863839f7.tar.gz opensim-SC_OLD-ff4f2f568163e61a71f324c1e90b4d2e863839f7.tar.bz2 opensim-SC_OLD-ff4f2f568163e61a71f324c1e90b4d2e863839f7.tar.xz |
Changed type comparison from String to object type
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index e6a9fe2..77f31b5 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -1654,7 +1654,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1654 | { | 1654 | { |
1655 | return new LSL_Types.Vector3(0, 0, 0); | 1655 | return new LSL_Types.Vector3(0, 0, 0); |
1656 | } | 1656 | } |
1657 | if (src.Data[index].GetType().ToString() == "OpenSim.Region.ScriptEngine.Common.LSL_Types+Vector3") | 1657 | if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3)) |
1658 | { | 1658 | { |
1659 | return (LSL_Types.Vector3)src.Data[index]; | 1659 | return (LSL_Types.Vector3)src.Data[index]; |
1660 | } | 1660 | } |
@@ -1674,7 +1674,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1674 | { | 1674 | { |
1675 | return new LSL_Types.Quaternion(0, 0, 0, 1); | 1675 | return new LSL_Types.Quaternion(0, 0, 0, 1); |
1676 | } | 1676 | } |
1677 | if (src.Data[index].GetType().ToString() == "OpenSim.Region.ScriptEngine.Common.LSL_Types+Quaternion") | 1677 | if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion)) |
1678 | { | 1678 | { |
1679 | return (LSL_Types.Quaternion)src.Data[index]; | 1679 | return (LSL_Types.Quaternion)src.Data[index]; |
1680 | } | 1680 | } |
@@ -1709,13 +1709,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1709 | { | 1709 | { |
1710 | return 0; | 1710 | return 0; |
1711 | } | 1711 | } |
1712 | switch (src.Data[index].GetType().ToString()) | 1712 | switch (src.Data[index].GetType()) |
1713 | { | 1713 | { |
1714 | case "System.Int32": | 1714 | case typeof(System.Int32): |
1715 | return 1; | 1715 | return 1; |
1716 | case "System.Double": | 1716 | case typeof(System.Double): |
1717 | return 2; | 1717 | return 2; |
1718 | case "System.String": | 1718 | case typeof(System.String): |
1719 | LLUUID tuuid; | 1719 | LLUUID tuuid; |
1720 | if (LLUUID.TryParse(src.Data[index].ToString(),out tuuid)) | 1720 | if (LLUUID.TryParse(src.Data[index].ToString(),out tuuid)) |
1721 | { | 1721 | { |
@@ -1725,11 +1725,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1725 | { | 1725 | { |
1726 | return 4; | 1726 | return 4; |
1727 | } | 1727 | } |
1728 | case "OpenSim.Region.ScriptEngine.Common.LSL_Types+Vector3": | 1728 | case typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3): |
1729 | return 5; | 1729 | return 5; |
1730 | case "OpenSim.Region.ScriptEngine.Common.LSL_Types+Quaternion": | 1730 | case typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion): |
1731 | return 6; | 1731 | return 6; |
1732 | case "OpenSim.Region.ScriptEngine.Common.LSL_Types+list": | 1732 | case typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.list): |
1733 | return 7; | 1733 | return 7; |
1734 | default: | 1734 | default: |
1735 | return 0; | 1735 | return 0; |