Change the strategy for the U+FFFD separator handling.
Use a global variable instead. In SL, the optimizer does the replacement automatically, therefore no memory penalty is incurred. In OpenSim, the variable is assigned at run time with llUnescapeURL. The OpenSim separator is also changed from U+001F to U+007F, because most control characters under U+0020 cause problems with exporting when present in script memory. Fixes #41.
This commit is contained in:
parent
8bd8b19e2f
commit
d23699fbe6
5 changed files with 22 additions and 18 deletions
|
@ -48,6 +48,7 @@ string RLVDesignations;
|
|||
string onSit;
|
||||
integer speed_index;
|
||||
integer verbose = 0;
|
||||
string SEP = "<22>"; // OSS::string SEP;
|
||||
|
||||
Out(integer level, string out)
|
||||
{
|
||||
|
@ -99,14 +100,14 @@ integer animation_menu(integer animation_menu_function)
|
|||
}
|
||||
if (SITTER_INFO != "")
|
||||
{
|
||||
menu += "[" + llList2String(llParseStringKeepNulls(SITTER_INFO, ["<22>"], []), 0) + "]";
|
||||
menu += "[" + llList2String(llParseStringKeepNulls(SITTER_INFO, [SEP], []), 0) + "]";
|
||||
}
|
||||
else if (number_of_sitters > 1)
|
||||
{
|
||||
menu += "[Sitter " + (string)SCRIPT_CHANNEL + "]";
|
||||
}
|
||||
integer anim_has_speeds;
|
||||
string animation_file = llList2String(llParseStringKeepNulls(llList2String(DATA_LIST, ANIM_INDEX), ["<22>"], []), 0);
|
||||
string animation_file = llList2String(llParseStringKeepNulls(llList2String(DATA_LIST, ANIM_INDEX), [SEP], []), 0);
|
||||
if (llGetInventoryType(animation_file + "+") == INVENTORY_ANIMATION)
|
||||
{
|
||||
anim_has_speeds = TRUE;
|
||||
|
@ -239,6 +240,7 @@ default
|
|||
state_entry()
|
||||
{
|
||||
memory();
|
||||
// OSS::SEP = llUnescapeURL("%7F");
|
||||
SCRIPT_CHANNEL = (integer)llGetSubString(llGetScriptName(), llSubStringIndex(llGetScriptName(), " "), -1);
|
||||
if (SCRIPT_CHANNEL)
|
||||
main_script += " " + (string)SCRIPT_CHANNEL;
|
||||
|
@ -280,7 +282,7 @@ default
|
|||
index = llListFindList(MENU_LIST, ["B:" + msg]);
|
||||
if (index != -1)
|
||||
{
|
||||
list button_data = llParseStringKeepNulls(llList2String(DATA_LIST, index), ["<22>"], []);
|
||||
list button_data = llParseStringKeepNulls(llList2String(DATA_LIST, index), [SEP], []);
|
||||
if (llList2String(button_data, 1) != "")
|
||||
{
|
||||
msg = llList2String(button_data, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue