Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004477opensim[REGION] OpenSim Corepublic2009-12-31 05:352014-07-29 13:42
ReporterSnoopy 
Assigned ToMata Hari 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0004477: llSetLinkPrimitiveParams cannot update sit target
DescriptionllSetLinkPrimitiveParams cannot be used to update sit target as described in
- http://wiki.secondlife.com/wiki/LlSitTarget#UpdateSitTarget [^]
- http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParams [^]

The position of the sitting avatar relative to the link set is not changed.
Additional InformationUpdateSitTarget modified for Mono and different llGetLinkKey behavior in OpenSim:

//Sets / Updates the sit target moving the avatar on it if necessary.
UpdateSitTarget(vector pos, rotation rot)
{//Using this while the object is moving may give unpredictable results.
    llSitTarget(pos, rot);//Set the sit target
    key user = llAvatarOnSitTarget();
    if(user!=NULL_KEY)//true if there is a user seated on the sittarget, if so update their position
    {
        vector size = llGetAgentSize(user);
        if(size!=ZERO_VECTOR)//This tests to make sure the user really exists.
        {
            //We need to make the position and rotation local to the current prim
            rotation localrot = ZERO_ROTATION;
            vector localpos = ZERO_VECTOR;
            if(llGetLinkNumber() > 1)//only need the local rot if it's not the root.
            {
                localrot = llGetLocalRot();
                localpos = llGetLocalPos();
            }
            pos.z += 0.4;
            integer linkNum = llGetNumberOfPrims();
            do{
                if(NULL_KEY == llGetLinkKey( linkNum ))//just checking to make sure the index is valid. NULL_KEY in OpenSim; user in SL
                {
                    llSetLinkPrimitiveParams(linkNum,
                                            [PRIM_POSITION, ((pos - (llRot2Up(rot) * size.z * 0.02638)) * localrot) + localpos,
                                             PRIM_ROTATION, rot * localrot / llGetRootRotation()]);
                    jump end;//cheaper but a tad slower then return
                }
            }while( --linkNum );
        }
        else
        {//It is rare that the sit target will bork but it does happen, this can help to fix it.
            llUnSit(user);
        }
    }
    @end;
}//Written by Strife Onizuka, size adjustment provided by Escort DeFarge
TagsNo tags attached.
Git Revision or version numberf45a69821b04fd743b7e79ab594484d055e06226
Run Mode Grid (1 Region per Sim)
Physics EngineODE
EnvironmentMono / Linux32
Mono Versiontrunk
Viewer
Attached Files

- Relationships
related to 0001802closedBlueWall llGetNumberOfPrims does not report linked avatars 
related to 0006657closedjustincc llSetLinkPrimitiveParams STILL cannot move or rotate seated avatars 

-  Notes
(0018724)
Bo Iwu (reporter)
2011-06-28 09:31

Confirming the bug...
(0025326)
Mata Hari (reporter)
2014-02-26 17:14

fixed r/24384

- Issue History
Date Modified Username Field Change
2009-12-31 05:35 Snoopy New Issue
2009-12-31 05:35 Snoopy Git Revision => f45a69821b04fd743b7e79ab594484d055e06226
2009-12-31 05:35 Snoopy SVN Revision => 11753
2009-12-31 05:35 Snoopy Run Mode => Grid (1 Region per Sim)
2009-12-31 05:35 Snoopy Physics Engine => ODE
2009-12-31 05:35 Snoopy Environment => Mono / Linux32
2009-12-31 05:35 Snoopy Mono Version => trunk
2011-06-28 09:31 Bo Iwu Note Added: 0018724
2011-06-28 10:15 BlueWall Relationship added related to 0001802
2013-12-06 12:39 SeanSB Relationship added related to 0006657
2014-02-26 17:14 Mata Hari Note Added: 0025326
2014-02-26 17:14 Mata Hari Status new => resolved
2014-02-26 17:14 Mata Hari Fixed in Version => master (dev code)
2014-02-26 17:14 Mata Hari Resolution open => fixed
2014-02-26 17:14 Mata Hari Assigned To => Mata Hari
2014-07-29 13:42 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker