Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-5494] llSetLinkCamera chooses the wrong seat when someone's sitting #13469

Open
sl-service-account opened this issue Mar 23, 2014 · 1 comment

Comments

@sl-service-account
Copy link

Steps to Reproduce

  1. Create a prim. Name it "Table".
  2. Create another prim. Name it "Chair1". Place it 1.5m WEST of Table.
  3. Create another prim. Name it "Chair2". Place it 1.5m EAST of Table.
  4. Select prims in this order: Chair2, Chair1, Table.
  5. Link.
  6. Drop the following script in Table:
default
{
    state_entry()
    {
        llLinkSitTarget(2, <0,0,1>, <0,0,0,1>);
        llSetLinkCamera(2, <-1,0,2>, <1,0,0>);

        llLinkSitTarget(3, <0,0,1>, <0,0,1,0>);
        llSetLinkCamera(3, <1,0,2>, <-1,0,0>);
    }
}
  1. Sit an avatar on Table. The avatar sits on Chair1 and the camera used is the one set for Chair1. This is correct.
  2. Sit another avatar on Table.

Actual Behavior

The avatar sits on Chair2. This is correct. The camera used is the one from Chair1. This is NOT correct.

Expected Behavior

The camera from Chair2 should be used when the avatar sits on the sit target set for Chair2.

Other information

When the avatar right-clicks on Chair2 directly and selects Sit, this problem does not happen.

Original Jira Fields
Field Value
Issue BUG-5494
Summary llSetLinkCamera chooses the wrong seat when someone's sitting
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter Sei Lisa (sei.lisa)
Created at 2014-03-23T17:03:48Z
Updated at 2014-03-24T21:10:14Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2014-03-23T12:57:50.373-0500',
  "Is there anything you'd like to add?": 'When the avatar right-clicks on Chair2 directly and selects Sit, this problem does not happen.',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'The avatar sits on Chair2. This is correct. The camera used is the one from Chair1. This is NOT correct.',
  'What were you doing when it happened?': '1. Create a prim. Name it "Table".\r\n2. Create another prim. Name it "Chair1". Place it 1.5m WEST of Table.\r\n3. Create another prim. Name it "Chair2". Place it 1.5m EAST of Table.\r\n4. Select prims in this order: Chair2, Chair1, Table.\r\n5. Link.\r\n6. Drop the following script in Table:\r\n{code}\r\ndefault\r\n{\r\n    state_entry()\r\n    {\r\n        llLinkSitTarget(2, <0,0,1>, <0,0,0,1>);\r\n        llSetLinkCamera(2, <-1,0,2>, <1,0,0>);\r\n\r\n        llLinkSitTarget(3, <0,0,1>, <0,0,1,0>);\r\n        llSetLinkCamera(3, <1,0,2>, <-1,0,0>);\r\n    }\r\n}\r\n{code}\r\n7. Sit an avatar on Table. The avatar sits on Chair1 and the camera used is the one set for Chair1. This is correct.\r\n8. Sit another avatar on Table.',
  'What were you expecting to happen instead?': 'The camera from Chair2 should be used when the avatar sits on the sit target set for Chair2.',
}
@sl-service-account
Copy link
Author

MartinRJ Fayray commented at 2014-03-23T17:57:50Z, updated at 2014-03-23T18:08:35Z

Confirmed.
Here is my repro-script:

//Find linknumber by linkname. Return -1 if not found.
integer iLnkN(string s)
{
    integer i;
    for (i = 1; i <= llGetNumberOfPrims(); i++)
    {
        if (s == llGetLinkName(i))
        {
            return i;
        }
    }
    return -1;  
}
string sChair1Linkname = "Chair1";
string sChair2Linkname = "Chair2";
default
{
    state_entry()
    {
        //Check if we're using the correct linknumbers:
        llSay(PUBLIC_CHANNEL, sChair1Linkname + "=" + (string)iLnkN(sChair1Linkname));
        llSay(PUBLIC_CHANNEL, sChair2Linkname + "=" + (string)iLnkN(sChair2Linkname));
        llLinkSitTarget(iLnkN(sChair1Linkname), <0,0,1>, <0,0,0,1>);
        llSetLinkCamera(iLnkN(sChair1Linkname), <-1,0,2>, <1,0,0>);
 
        llLinkSitTarget(iLnkN(sChair2Linkname), <0,0,1>, <0,0,1,0>);
        llSetLinkCamera(iLnkN(sChair2Linkname), <1,0,2>, <-1,0,0>);
    }
}

My environment:

Second Life 3.7.3 (287491) Mar 4 2014 05:01:31 (Second Life Release)
Release Notes

You are at 218.9, 184.9, 26.5 in Belarus located at sim9173.agni.lindenlab.com (216.82.42.109:13017)
SLURL: http://maps.secondlife.com/secondlife/Belarus/219/185/27
(global coordinates 276,699.0, 251,065.0, 26.5)
Second Life Server 14.02.28.287383
Retrieving...

CPU: AMD Phenom(tm) II X4 955 Processor (3214.43 MHz)
Memory: 16383 MB
OS Version: Microsoft Windows 8.1 64-bit (Build 9600)
Graphics Card Vendor: ATI Technologies Inc.
Graphics Card: AMD Radeon HD 7800 Series

Windows Graphics Driver Version: 8.17.0010.1267
OpenGL Version: 4.2.12780 Compatibility Profile Context 13.350.1005.0

libcurl Version: libcurl/7.24.0 OpenSSL/0.9.8q zlib/1.2.5
J2C Decoder Version: KDU v7.0
Audio Driver Version: FMOD Ex 4.44.12
Qt Webkit Version: 4.7.1 (version number hard-coded)
Voice Server Version: Not Connected
Built with MSVC version 1600
Packets Lost: 0/797 (0.0%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant