diff options
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 80eda62..4821589 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -2276,8 +2276,10 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants) | |||
2276 | fprintf(out, "--// Generated code goes here.\n\n"); | 2276 | fprintf(out, "--// Generated code goes here.\n\n"); |
2277 | fprintf(out, "local _bit = require(\"bit\")\n"); | 2277 | fprintf(out, "local _bit = require(\"bit\")\n"); |
2278 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); | 2278 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); |
2279 | // TODO - Use the scripts UUID instead of the file name here. | ||
2280 | fprintf(out, "local _SID = [=[%s]=]\n\n", compiler.fileName); | ||
2279 | outputLeaf(out, OM_LUA, compiler.ast); | 2281 | outputLeaf(out, OM_LUA, compiler.ast); |
2280 | fprintf(out, "\n\n_LSL.mainLoop(_defaultState)\n"); // This actually starts the script running. | 2282 | fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running. |
2281 | fprintf(out, "\n--// End of generated code.\n\n"); | 2283 | fprintf(out, "\n--// End of generated code.\n\n"); |
2282 | fclose(out); | 2284 | fclose(out); |
2283 | 2285 | ||