mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
Mantis#1451. Thank you kindly, Mikem for a patch that addresses:
LSL scripts in which a float type is cast to a string or a string type is cast to a float do not compile. When the script is translated from LSL to C#, the LSL float type is translated into double. There is no string <-> double cast in C#, so compilation fails. There is a LSLFloat type, however it seems unfinished and is not used. I am attaching a patch that implements the LSLFloat type. I have also added two methods to the LSLString type to facilitate float <-> string casts.
This commit is contained in:
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
// Only the types we need to convert
|
||||
dataTypes.Add("void", "void");
|
||||
dataTypes.Add("integer", "LSL_Types.LSLInteger");
|
||||
dataTypes.Add("float", "double");
|
||||
dataTypes.Add("float", "LSL_Types.LSLFloat");
|
||||
dataTypes.Add("string", "LSL_Types.LSLString");
|
||||
dataTypes.Add("key", "LSL_Types.LSLString");
|
||||
dataTypes.Add("vector", "LSL_Types.Vector3");
|
||||
|
||||
Reference in New Issue
Block a user