[opensource-dev] Review Request: BUG-840: Viewer 3.4.2 (Beta) breaks almost every sliding door script in SL

Henri Beauchamp sldev at free.fr
Sat Feb 16 15:58:34 PST 2013


On Sat, 16 Feb 2013 19:44:51 -0000, MartinRJ Fayray wrote:

> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/616/
>
> Review request for Viewer.

Yes, it seems to work more or less OK. It however still fails to animate
visible small resizing primitives (I saw this first on scripted nipples:
the nipples failed to "stiffen" on screen while the prim actually
resized and only a change in LOD (zoom-out followed with zoom-in) would
update the prim size on screen).

To reproduce that bug, create two prims, link them, and in the root prim
put this script:

integer Expanded = FALSE;

default {
    touch_start(integer n) {
        vector scale = llList2Vector(llGetLinkPrimitiveParams(2, [ PRIM_SIZE ]), 0);
        Expanded = !Expanded;
        if (Expanded) {
            scale.x = 2.0 * scale.y;
        } else {
            scale.x = scale.y;
        }
        llSetLinkPrimitiveParamsFast(2, [ PRIM_SIZE, scale ]);
    }
}

Then wear the resulting object and resize it down to a very small size.
Zoom on it and see how the child prim fails to resize when touching the
object.

To cure that bug you need to replace:

LLVector3 vec = mCurrentScale-target_scale;
if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED)

(which makes no sense whatsoever: only damping interpolations need to
be checked against MIN_INTERPOLATE_DISTANCE_SQUARED), with:
if (old_scale != target_scale)


Also, it makes no sense to use
dist_vec_squared(old_pos, target_pos) > 0.f ||
(1.f - dot(old_rot, target_rot)) * 10.f > 0.f
in the test you added to fix the out of FOV moving/rotating child
prims bug. You simply need to test for changed position and rotation
since you don't change the dist_squared variable in that case (this
will also avoid having very slow, or very slightly rotating out of
FOV prims to fail to update).

Attached to this email is the diff I propose to add to your patch.

Regards,

Henri.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.txt
Type: application/octet-stream
Size: 1165 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/opensource-dev/attachments/20130217/47a98df1/attachment.obj 


More information about the opensource-dev mailing list