diff options
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r-- | LuaSL/src/LSL.lua | 11 |
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 | |||
537 | local paused = false | 537 | local 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. |
540 | function pause() paused = true end | 540 | function stop() paused = true end |
541 | function quit() running = false end | 541 | function quit() running = false end |
542 | 542 | ||
543 | function LSL.stateChange(x) | 543 | function 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 |