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

[BUG-4929] llModifyLand() modifies wrong location in region, when called in a child prim #13259

Open
sl-service-account opened this issue Jan 17, 2014 · 2 comments

Comments

@sl-service-account
Copy link

Steps to Reproduce

Go to a parcel of land that you own.
Rez two boxes.
Link together.
Drop the following script into the child.

default
{
    touch_end(integer i)
    {
        if ((llDetectedKey(0) == llGetOwner()) && (llGetLandOwnerAt(llGetPos()) == llGetOwner()))
        {
            llOwnerSay("Attempting to raise the ground with script in the " + llList2String(["root","child"],llGetLinkNumber() > 1) + " prim...");
            llModifyLand(LAND_RAISE,2);
        }
    }
}

Make sure region/estate allows terraforming and that the land under the prims is not at its maximum terraforming height.
Click the child.
Notice land does not raise.
Unlink the prims and click the prim again.
Land should raise.

llModifyLand() does not work in child prims. Wiki makes no mention of it.

Please update wiki if this is expected behaviour. Thanks.

http://wiki.secondlife.com/wiki/LlModifyLand

Expected Behavior

llModifyLand() should work from child prims.

Original Jira Fields
Field Value
Issue BUG-4929
Summary llModifyLand() modifies wrong location in region, when called in a child prim
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter Lucia Nightfire (lucia.nightfire)
Created at 2014-01-17T13:31:13Z
Updated at 2014-03-15T06:08:07Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2014-01-21T14:02:05.938-0600',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'llModifyLand() does not work in child prims. Wiki makes no mention of it.\r\n\r\nPlease update wiki if this is expected behaviour. Thanks.\r\n\r\nhttp://wiki.secondlife.com/wiki/LlModifyLand',
  'What were you doing when it happened?': '?',
  'What were you expecting to happen instead?': '?',
}
@sl-service-account
Copy link
Author

Maestro Linden commented at 2014-01-21T20:02:06Z

Hi Lucia, thanks for the report. This is actually worse than you think - llModifyLand() modifies the wrong position when called in a child prim, instead of always failing.

For example:

  1. Own the parcel in the southwest corner of the sim
  2. Rez 2 boxes and link them together. Move the child prim to be offset by <6,4,0> from the root prim.
  3. Save this script in the child prim:
default
{
    touch_start(integer total_number)
    {
        llSay(0, "local pos: " + (string)llGetLocalPos() + " region pos: " + (string)llGetPos());
        llModifyLand(LAND_RAISE, 0);
    }
}
  1. Move the linkset to some arbitrary point in the region, far away from your parcel
  2. Touch the child prim a few times, and observe where in the sim gets terraformed, if anywhere

Expected results:

  • If you own the land below the child prim's region position, this land should be raised (if you own that area, nothing should happen).
    • We could alternatively look at the root prim's position, but I figure 'The position of the prim is used to determine the input for various flags.' should mean the child prim's region position.

Actual results:
The terrain at 6, 4 is raised (this corresponds to 'local pos' in the script chat).

@sl-service-account
Copy link
Author

Strife Onizuka commented at 2014-01-31T00:56:41Z, updated at 2014-01-31T00:58:00Z

Any chance we could get correct BRUSH constants while we are working on llModifyLand? Maybe even SVC-3272.

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