From ca174fc7c2b22e902b93ef4183eb1f5235bcb5fa Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 5 Feb 2012 18:52:59 +1000 Subject: Fix things so the wire protocol can be functions in the LSL.lua file, and _LSL can go back to being local to the script. --- LuaSL/src/LuaSL_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LuaSL/src/LuaSL_compile.c') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index f840b69..72d94b9 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -2275,7 +2275,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants) fprintf(out, "--// Generated code goes here.\n\n"); fprintf(out, "local _bit = require(\"bit\")\n"); - fprintf(out, "_LSL = require(\"LSL\")\n\n"); // Local might be quicker, but looks like we need global for pcall(), it has it's own local stack I think. + fprintf(out, "local _LSL = require(\"LSL\")\n\n"); // TODO - Use the scripts UUID instead of the file name here. fprintf(out, "local _SID = [=[%s.lua.out]=]\n\n", compiler.fileName); outputLeaf(out, OM_LUA, compiler.ast); -- cgit v1.1