aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LSL.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-12 00:22:36 +1000
committerDavid Walter Seikel2012-02-12 00:22:36 +1000
commita0263e9618f37101d4beb182853b653fe4727667 (patch)
treefe97898fe4aad8d4c3fe35001c434e6f9b36cc3c /LuaSL/src/LSL.lua
parentMissed this in the SID change commit. (diff)
downloadSledjHamr-a0263e9618f37101d4beb182853b653fe4727667.zip
SledjHamr-a0263e9618f37101d4beb182853b653fe4727667.tar.gz
SledjHamr-a0263e9618f37101d4beb182853b653fe4727667.tar.bz2
SledjHamr-a0263e9618f37101d4beb182853b653fe4727667.tar.xz
Little clean ups.
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r--LuaSL/src/LSL.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua
index 7a47a69..56cd3ae 100644
--- a/LuaSL/src/LSL.lua
+++ b/LuaSL/src/LSL.lua
@@ -537,7 +537,7 @@ local running = true
537local paused = false 537local paused = false
538 538
539-- Stuff called from the wire protocol has to be global, but I think this means just global to this file. 539-- Stuff called from the wire protocol has to be global, but I think this means just global to this file.
540function pause() paused = true end 540function stop() paused = true end
541function quit() running = false end 541function quit() running = false end
542 542
543function LSL.stateChange(x) 543function LSL.stateChange(x)
@@ -580,15 +580,16 @@ function LSL.mainLoop(sid, x)
580 580
581 LSL.stateChange(x); 581 LSL.stateChange(x);
582 582
583 -- TODO - Need a FIFO queue of incoming events. Which will be in the C main thread, coz that's listening on the socket for us. 583 -- Need a FIFO queue of incoming events. Which will be in the C main thread, coz that's listening on the socket for us.
584 -- Actually, I think the luaproc message system manages such a queue for us anyway. 584 -- The ecore_con stuff ends up being a sorta FIFO queue of the commands coming from OpenSim.
585 -- C should strip off the "SID." part and replace it with "_LSL.", so might be better to restrict the wire protocol to single function calls. 585 -- Plus, I think the luaproc message system manages a FIFO queue for us as well.
586 -- Might still need one. lol
586 587
587 while running do 588 while running do
588 local message = luaproc.receive(sid) 589 local message = luaproc.receive(sid)
589 if message then 590 if message then
590 if paused then 591 if paused then
591 if "resume()" == message then paused = false end 592 if "start()" == message then paused = false end
592 else 593 else
593 result, errorMsg = loadstring(message) -- "The environment of the returned function is the global environment." Though normally, a function inherits it's environment from the function creating it. Which is what we want. lol 594 result, errorMsg = loadstring(message) -- "The environment of the returned function is the global environment." Though normally, a function inherits it's environment from the function creating it. Which is what we want. lol
594 if nil == result then 595 if nil == result then