diff options
author | Melanie Thielker | 2008-11-06 23:10:49 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-06 23:10:49 +0000 |
commit | 9e4fc8e03a0b44032ee399f1b07e45d17d2ddd77 (patch) | |
tree | 5055f1e6ae0ec9a0e43c3949efb1841db73d6f94 /OpenSim/Region/ScriptEngine | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC_OLD-9e4fc8e03a0b44032ee399f1b07e45d17d2ddd77.zip opensim-SC_OLD-9e4fc8e03a0b44032ee399f1b07e45d17d2ddd77.tar.gz opensim-SC_OLD-9e4fc8e03a0b44032ee399f1b07e45d17d2ddd77.tar.bz2 opensim-SC_OLD-9e4fc8e03a0b44032ee399f1b07e45d17d2ddd77.tar.xz |
Mantis #2571
Thank you, idb, for a patch that fixes the jump function in LSL.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index 6e56231..25c823d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -194,5 +194,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
194 | { | 194 | { |
195 | SetVars(m_InitialValues); | 195 | SetVars(m_InitialValues); |
196 | } | 196 | } |
197 | |||
198 | public void NoOp() | ||
199 | { | ||
200 | // Does what is says on the packet. Nowt, nada, nothing. | ||
201 | // Required for insertion after a jump label to do what it says on the packet! | ||
202 | // With a bit of luck the compiler may even optimize it out. | ||
203 | } | ||
197 | } | 204 | } |
198 | } | 205 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 795d38f..37d29f7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -474,7 +474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
474 | /// <returns>String containing C# code for JumpLabel jl.</returns> | 474 | /// <returns>String containing C# code for JumpLabel jl.</returns> |
475 | private string GenerateJumpLabel(JumpLabel jl) | 475 | private string GenerateJumpLabel(JumpLabel jl) |
476 | { | 476 | { |
477 | return Generate(String.Format("{0}:\n", jl.LabelName), jl); | 477 | return Generate(String.Format("{0}:", CheckName(jl.LabelName)), jl) + " NoOp();\n"; |
478 | } | 478 | } |
479 | 479 | ||
480 | /// <summary> | 480 | /// <summary> |
@@ -484,7 +484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
484 | /// <returns>String containing C# code for JumpStatement js.</returns> | 484 | /// <returns>String containing C# code for JumpStatement js.</returns> |
485 | private string GenerateJumpStatement(JumpStatement js) | 485 | private string GenerateJumpStatement(JumpStatement js) |
486 | { | 486 | { |
487 | return Generate(String.Format("goto {0}", js.TargetName), js); | 487 | return Generate(String.Format("goto {0}", CheckName(js.TargetName)), js); |
488 | } | 488 | } |
489 | 489 | ||
490 | /// <summary> | 490 | /// <summary> |