Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004692opensim[REGION] Scripting Enginepublic2010-04-25 20:292011-05-06 18:51
Reporterfred huffhines 
Assigned ToMarck 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004692: objects do not receive changed events if sit target has not been assigned
Descriptionthis is mostly just a change in behavior that i wanted to note, since it caused me quite a bit of consternation when all my teleporters broke in amusing ways (in retrospect). these devices depend on getting a "changed" event of the CHANGED_LINK type. suddenly after upgrading to 0.6.9, i could sit on the teleporter and it would go nowhere, as if it were instead a chair.
i wrote a small script to test this problem, and it showed me that the object *never* got a changed event for links. this is below.
luckily, there's a workaround for this odd behavior. after adding a simple call to llSitTarget into the script, the changed events with CHANGED_LINK started getting fired again.
i initially believed that this is a minor bug, since there's a workaround, but maybe it's of higher importance given all the existing objects that will break (if they have not set a sit position, but instead relied on whatever the default would be).

here's the script that i used to figure out what was going on...

///

integer link_changes = 0;

default
{
    state_entry()
    {
// llSitTarget(<0, 0, 0.1>, ZERO_ROTATION);
//adding the above line makes the changed events start firing again.

        llSay(0, "sit to run the test...");
    }
    
    on_rez(integer count) { llResetScript(); }
    
    changed(integer chang) {
        llSay(0, "got into changed event...");
        if (! (chang & CHANGED_LINK) ) {
            llSay(0, "change was not a link, leaving.");
            return; // not for us.
        }
        llSay(0, "into changed event, CHANGED_LINK...");
        link_changes++;
        key av_sitting = llAvatarOnSitTarget();
        if (av_sitting == NULL_KEY) {
            llSay(0, "avatar stood up since key is null");
        } else {
            llSay(0, "avatar sat down: " + llDetectedName(0));
        }
    }
    
    touch_start(integer count) {
        llSay(0, "there have been " + (string)link_changes
            + " 'changed' events for links since the last reset.");
    }
}
TagsNo tags attached.
Git Revision or version number0.6.9 post fixes (osgrid version as of 2010 04 23 or so)
Run Mode Grid (1 Region per Sim)
Physics EngineODE
EnvironmentMono / Linux64
Mono VersionOther
Viewer
Attached Files

- Relationships

-  Notes
(0017544)
Mata Hari (reporter)
2010-12-12 08:06

Just wanted to bump this again...this issue still persists in 0.7x. If the sit target of a prim is not explicitly set to something other than llSitTarget(<0,0,0>,ZERO_ROTATION) it will not trigger a CHANGED_LINK event when an avatar sits on it.

While a relatively minor bug, it's something that isn't mentioned in the SL scripting wiki documentation and is a non-intuitive bug for a novice script-writer to figure out (i.e. it took me a while to figure out why a very simple on-it event I scripted wasn't working).
(0017562)
Marck (reporter)
2010-12-12 11:14

CIA-68: opensim: marck00 * r7f0350b98858 /OpenSim/Region/Framework/Scenes/ (SceneObjectPart.cs ScenePresence.cs): Trigger event with flag CHANGED_LINK when agent sits on objects that have not a sit target defined. This fixes Mantis 0004692.

- Issue History
Date Modified Username Field Change
2010-04-25 20:29 fred huffhines New Issue
2010-04-25 20:29 fred huffhines Git Revision => 0.6.9 post fixes (osgrid version as of 2010 04 23 or so)
2010-04-25 20:29 fred huffhines SVN Revision => 0
2010-04-25 20:29 fred huffhines Run Mode => Grid (1 Region per Sim)
2010-04-25 20:29 fred huffhines Physics Engine => ODE
2010-04-25 20:29 fred huffhines Environment => Mono / Linux64
2010-04-25 20:29 fred huffhines Mono Version => 2.4.2
2010-12-12 08:06 Mata Hari Note Added: 0017544
2010-12-12 11:14 Marck Mono Version 2.4.2 => Other
2010-12-12 11:14 Marck Status new => resolved
2010-12-12 11:14 Marck Resolution open => fixed
2010-12-12 11:14 Marck Assigned To => Marck
2010-12-12 11:14 Marck Note Added: 0017562
2011-05-06 18:51 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker