diff options
author | David Walter Seikel | 2014-05-14 16:18:38 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-14 16:18:38 +1000 |
commit | 6b0fae4bad2de78c63d8caa3cea853bbf2df73c4 (patch) | |
tree | 966634d287e9736ad77c073acd6caff4259c91f6 | |
parent | Remove some currently problematic LSL things, will fix them up later. (diff) | |
download | SledjHamr-6b0fae4bad2de78c63d8caa3cea853bbf2df73c4.zip SledjHamr-6b0fae4bad2de78c63d8caa3cea853bbf2df73c4.tar.gz SledjHamr-6b0fae4bad2de78c63d8caa3cea853bbf2df73c4.tar.bz2 SledjHamr-6b0fae4bad2de78c63d8caa3cea853bbf2df73c4.tar.xz |
Implement faked llGetLinkNumber() and llMessageLinked().
-rw-r--r-- | src/love/love.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/love/love.c b/src/love/love.c index e965c35..cb0cd47 100644 --- a/src/love/love.c +++ b/src/love/love.c | |||
@@ -308,6 +308,8 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e | |||
308 | sendForth(ourGlobals->serverLuaSL, SID, "return 1.0"); | 308 | sendForth(ourGlobals->serverLuaSL, SID, "return 1.0"); |
309 | else if (0 == strcmp(command, "llGetInventoryNumber(7)")) | 309 | else if (0 == strcmp(command, "llGetInventoryNumber(7)")) |
310 | sendForth(ourGlobals->serverLuaSL, SID, "return 3"); | 310 | sendForth(ourGlobals->serverLuaSL, SID, "return 3"); |
311 | else if (0 == strcmp(command, "llGetLinkNumber()")) | ||
312 | sendForth(ourGlobals->serverLuaSL, SID, "return 1"); | ||
311 | else if (0 == strcmp(command, "llGetInventoryName(7, 2)")) | 313 | else if (0 == strcmp(command, "llGetInventoryName(7, 2)")) |
312 | sendForth(ourGlobals->serverLuaSL, SID, "return \".readme\""); | 314 | sendForth(ourGlobals->serverLuaSL, SID, "return \".readme\""); |
313 | else if (0 == strcmp(command, "llGetInventoryName(7, 1)")) | 315 | else if (0 == strcmp(command, "llGetInventoryName(7, 1)")) |
@@ -345,6 +347,18 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e | |||
345 | if (ourGlobals->client) sendBack(ourGlobals->client, SID, command); | 347 | if (ourGlobals->client) sendBack(ourGlobals->client, SID, command); |
346 | else PW("No where to send %s", command); | 348 | else PW("No where to send %s", command); |
347 | } | 349 | } |
350 | else if (0 == strncmp(command, "llMessageLinked(", 16)) | ||
351 | { | ||
352 | Eina_Iterator *scripts; | ||
353 | script *me; | ||
354 | |||
355 | // TODO - For now, just send it to everyone. | ||
356 | scripts = eina_hash_iterator_data_new(ourGlobals->scripts); | ||
357 | while(eina_iterator_next(scripts, (void **) &me)) | ||
358 | { | ||
359 | sendForth(ourGlobals->serverLuaSL, me->SID, "events.link_message%s", &command[15]); | ||
360 | } | ||
361 | } | ||
348 | else | 362 | else |
349 | PI("Script %s sent command %s", SID, command); | 363 | PI("Script %s sent command %s", SID, command); |
350 | } | 364 | } |