diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index aa199d5..7c605c2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -47,7 +47,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
47 | public double llPow(double fbase, double fexponent) { return (double)Math.Pow(fbase, fexponent); } | 47 | public double llPow(double fbase, double fexponent) { return (double)Math.Pow(fbase, fexponent); } |
48 | public int llAbs(int i) { return (int)Math.Abs(i); } | 48 | public int llAbs(int i) { return (int)Math.Abs(i); } |
49 | public double llFabs(double f) { return (double)Math.Abs(f); } | 49 | public double llFabs(double f) { return (double)Math.Abs(f); } |
50 | public double llFrand(double mag) { return 0; } | 50 | |
51 | public double llFrand(double mag) | ||
52 | { | ||
53 | lock(OpenSim.Framework.Utilities.Util.RandomClass) | ||
54 | { | ||
55 | return OpenSim.Framework.Utilities.Util.RandomClass.Next((int)mag); | ||
56 | } | ||
57 | } | ||
51 | public int llFloor(double f) { return (int)Math.Floor(f); } | 58 | public int llFloor(double f) { return (int)Math.Floor(f); } |
52 | public int llCeil(double f) { return (int)Math.Ceiling(f); } | 59 | public int llCeil(double f) { return (int)Math.Ceiling(f); } |
53 | public int llRound(double f) { return (int)Math.Round(f, 1); } | 60 | public int llRound(double f) { return (int)Math.Round(f, 1); } |
@@ -168,11 +175,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
168 | public void llTriggerSound(string sound, double volume) { } | 175 | public void llTriggerSound(string sound, double volume) { } |
169 | public void llStopSound() { } | 176 | public void llStopSound() { } |
170 | public void llPreloadSound(string sound) { } | 177 | public void llPreloadSound(string sound) { } |
171 | public void llGetSubString(string src, int start, int end) { } | 178 | public string llGetSubString(string src, int start, int end) { return src.Substring(start, end); } |
172 | public string llDeleteSubString(string src, int start, int end) { return ""; } | 179 | public string llDeleteSubString(string src, int start, int end) { return ""; } |
173 | public void llInsertString(string dst, int position, string src) { } | 180 | public string llInsertString(string dst, int position, string src) { return ""; } |
174 | public string llToUpper(string source) { return ""; } | 181 | public string llToUpper(string src) { return src.ToUpper(); } |
175 | public string llToLower(string source) { return ""; } | 182 | public string llToLower(string src) { return src.ToLower(); } |
176 | public int llGiveMoney(string destination, int amount) { return 0; } | 183 | public int llGiveMoney(string destination, int amount) { return 0; } |
177 | public void llMakeExplosion() { } | 184 | public void llMakeExplosion() { } |
178 | public void llMakeFountain() { } | 185 | public void llMakeFountain() { } |