OpenCollar / opencollar

The Open Source Role Play Device for the Metaverse.
Other
39 stars 87 forks source link

OpenCollar - label.lsl possinble bug? #266

Closed ghost closed 10 years ago

ghost commented 10 years ago

I think that the 'g_iCharLimit' is calculated incorrectly

247: if (iCharPosition > g_iCharLimit) g_iCharLimit = iCharPosition;

where, if the 'iCharPosition' starts with 0, and with 12 label prims ends with 11, then the 'g_iCharLimit' is 11, not 12!

I put "llOwnerSay ((string) g_iCharLimit);" after "SetLabel ();" at 424 line and he said "11" when my collar has 12 label prims...

WendyStarfall commented 10 years ago

We need the -1 at the integer for the trick to be able removing label scripts if not label prims are present at line 426

Maybe we could start label prims at 01 instead of 00?

ghost commented 10 years ago

many collar designers make label prims starting with 00 , and iCharPosition gets from prim description, and must begin with 0 for llGetSubString(sText, iCharPosition, iCharPosition)

WendyStarfall commented 10 years ago

Is there any other issue with this apart from the text being off-center in labels with 12 prims?

ghost commented 10 years ago

no more problems :)

WendyStarfall commented 10 years ago

Are you not going to send a pull for your label with the scrolling text? :disappointed:

ghost commented 10 years ago

Only if necessary

WendyStarfall commented 10 years ago

We just need to make sure that the label script cleans itself up if it is installed in collars without label elements.

ghost commented 10 years ago

I'll check it

I'm still not sure that scrolling works well and smoothly

WendyStarfall commented 10 years ago

I think smoothness will depend a lot on sim performance as well. Please go ahead and send us the pull, we can also push the scrolling label to SPARE PARTS if you feel insecure yet that it is good enough to go?

WendyStarfall commented 10 years ago

Hi, I pushed the source for label to SPARE PARTS, referring to #271

You can edit the script there and send the pull request one more time, please? https://github.com/OpenCollar/OpenCollarUpdater/blob/main/SPARE_PARTS/OpenCollar%20-%20label.lsl

ghost commented 10 years ago

I've done

WendyStarfall commented 10 years ago

272 pulled! Yay! :smirk_cat: