secondlife / jira-archive

2 stars 0 forks source link

[BUG-231806] Applying llSetAgentEnvironment() before a user is fully logged in to a region, ignores the region EEP settings. #9196

Open sl-service-account opened 2 years ago

sl-service-account commented 2 years ago

What just happened?

Called llSetAgentEnvironment() to make changes to a regions windlight.

What were you doing when it happened?

If llSetAgentEnvironment() is applied to an avatar before they have completely logged in to a region, the sky settings are left at the default viewer sky settings except for the sky settings that have changed. This happens on all viewers.

To reproduce: In the estate menu under Environment. Create day cycle track that is (SS) Atmostphereic Daycycle Cloudy (It's in the library). Create an object with the following attached script and associate it with an experience that you're a part of. The sky will change to clear. Log out. Log in. Upon login, the sky will be clear, but the rest of the EEP variables will be the default viewer sky.

// Make sure this script is compiled toward an experience

list avatars; list new_avatars;

default { state_entry()

{ /* Make timer GO FAST */ llSetTimerEvent(0.25); }

timer() { /* For getting and cleaning a list of avatars in the region, making sure they're in the experience, and queueing up experience requests in a no_sensor() */ integer len = llGetListLength(avatars); while (~(--len)) { if (llGetAgentSize(llList2Key(avatars, len)) == ZERO_VECTOR)

{ avatars = llDeleteSubList(avatars, len, len); }

}

list tmp = llGetAgentList(AGENT_LIST_REGION, []); len = llGetListLength(tmp); while (~(--len)) { key av = llList2Key(tmp, len); if ((![(~llListFindList(avatars, [av]))) && (]((~llListFindList(avatars, [av]))) && ()(~llListFindList(new_avatars, [av])))) { if (llAgentInExperience(av))

{ new_avatars += av; llSensorRepeat("a", "A", AGENT, 0.1, 0.1, 0.1); }

} } llSetTimerEvent(0.25); }

no_sensor() { /* Process the list of avatars queued up */ if (llGetListLength(new_avatars))

{ llRequestExperiencePermissions(llList2Key(new_avatars, 0), ""); new_avatars = llDeleteSubList(new_avatars, 0, 0); }

else llSensorRemove(); }

experience_permissions(key agent_id)

{ /* Get existing clouds, and just change them to clear skies */ avatars += agent_id; list cloud_params = llGetEnvironment(llGetPos(), [SKY_CLOUDS]); cloud_params = [ SKY_CLOUDS, llList2Vector(cloud_params, 0), // Color 0., // Coverage llList2Float(cloud_params, 2), // Scale llList2Float(cloud_params, 3), // Variance llList2Vector(cloud_params, 4), // Scroll ZERO_VECTOR, // Density llList2Vector(cloud_params, 6) // Detail ]; llSetAgentEnvironment(agent_id, 1.0, cloud_params); }

experience_permissions_denied(key agent_id, integer reason)

{ /* Errors! */ llRegionSayTo(agent_id, 0, "Denied experience permissions from " + llKey2Name(agent_id) + ", for reason: " + llGetExperienceErrorMessage(reason)); }

}

What were you expecting to happen instead?

I expected the full EEP environment with the scripted changes to apply to the viewer.

Crossing a region, teleporting, and opening up the Estate > Environment tab remedies the issue.

Other information

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-231806 | | Summary | Applying llSetAgentEnvironment() before a user is fully logged in to a region, ignores the region EEP settings. | | Type | Bug | | Priority | Unset | | Status | Needs More Info | | Resolution | Unresolved | | Labels | whirly-eep | | Reporter | NeoBokrug Elytis (neobokrug.elytis) | | Created at | 2022-02-15T22:47:02Z | | Updated at | 2022-07-27T16:38:40Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2022-07-27T11:38:40.736-0500', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Viewer', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'Called llSetAgentEnvironment() to make changes to a regions windlight.', 'What were you doing when it happened?': 'If llSetAgentEnvironment() is applied to an avatar before they have completely logged in to a region, the sky settings are left at the default viewer sky settings except for the sky settings that have changed. This happens on all viewers.\r\n\r\nTo reproduce:\r\n\tIn the estate menu under Environment. Create day cycle track that is (SS) Atmostphereic Daycycle Cloudy (It\'s in the library).\r\n\tCreate an object with the following attached script and associate it with an experience that you\'re a part of.\tThe sky will change to clear.\r\n\tLog out.\r\n\tLog in.\r\n\tUpon login, the sky will be clear, but the rest of the EEP variables will be the default viewer sky.\r\n\r\n//\tMake sure this script is compiled toward an experience\r\n\r\nlist avatars;\r\nlist new_avatars;\r\n\r\ndefault {\r\n\tstate_entry() {\r\n\t\t/*\tMake timer GO FAST */\r\n\t\tllSetTimerEvent(0.25);\r\n\t}\r\n\r\n\ttimer() {\r\n\t\t/*\tFor getting and cleaning a list of avatars in the region,\r\n\t\t\t\tmaking sure they\'re in the experience, and queueing\r\n\t\t\t\tup experience requests in a no_sensor() */\r\n\t\tinteger len \t= llGetListLength(avatars);\r\n\t\twhile (~(--len)) {\t\t\t\r\n\t\t\tif (llGetAgentSize(llList2Key(avatars, len)) == ZERO_VECTOR) {\r\n\t\t\t\tavatars \t= llDeleteSubList(avatars, len, len);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlist tmp \t= llGetAgentList(AGENT_LIST_REGION, []);\r\n\t\tlen\t\t\t= llGetListLength(tmp);\r\n\t\twhile (~(--len)) {\r\n\t\t\tkey av \t= llList2Key(tmp, len);\r\n\t\t\tif ((!(~llListFindList(avatars, [av]))) && (!(~llListFindList(new_avatars, [av])))) {\r\n\t\t\t\tif (llAgentInExperience(av)) {\r\n\t\t\t\t\tnew_avatars\t+= av;\r\n\t\t\t\t\tllSensorRepeat("a", "A", AGENT, 0.1, 0.1, 0.1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tllSetTimerEvent(0.5);\r\n\t}\r\n\r\n\tno_sensor() {\r\n\t\t/*\tProcess the list of avatars queued up */\r\n\t\tif (llGetListLength(new_avatars)) {\r\n\t\t\tllRequestExperiencePermissions(llList2Key(new_avatars, 0), "");\r\n\t\t\tnew_avatars\t= llDeleteSubList(new_avatars, 0, 0);\r\n\t\t} else llSensorRemove();\r\n\t}\r\n\t\r\n\texperience_permissions(key agent_id) {\r\n\t\t/*\tGet existing clouds, and just change them to clear skies\t*/\r\n\t\tavatars\t\t\t\t+= agent_id;\r\n\t\tlist cloud_params\t= llGetEnvironment(llGetPos(), [SKY_CLOUDS]);\r\n\t\tcloud_params\t= [\r\n\t\t\tSKY_CLOUDS,\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tllList2Vector(cloud_params, 0),\t\t//\tColor\r\n\t\t\t0.,\t\t\t\t\t\t\t\t\t//\tCoverage\r\n\t\t\tllList2Float(cloud_params, 2), \t\t//\tScale\t\t\t\t\t\t\r\n\t\t\tllList2Float(cloud_params, 3),\t\t//\tVariance\r\n\t\t\tllList2Vector(cloud_params, 4),\t\t//\tScroll\r\n\t\t\tZERO_VECTOR,\t\t\t\t\t\t//\tDensity\r\n\t\t\tllList2Vector(cloud_params, 6)\t\t//\tDetail\r\n\t\t];\r\n\t\tllSetAgentEnvironment(agent_id, 1.0, cloud_params);\r\n\t}\r\n\r\n\texperience_permissions_denied(key agent_id, integer reason) {\r\n\t\t/*\tErrors! */\r\n llRegionSayTo(agent_id, 0, "Denied experience permissions from " + llKey2Name(agent_id) + ", for reason: " + llGetExperienceErrorMessage(reason));\r\n }\r\n}', 'What were you expecting to happen instead?': 'I expected the full EEP environment with the scripted changes to apply to the viewer.\r\n\r\nCrossing a region, teleporting, and opening up the Estate > Environment tab remedies the issue.', } ```
sl-service-account commented 2 years ago

Kyle Linden commented at 2022-07-27T16:38:41Z

Hi Neo,

Thank you for reporting this issue. We've had a lot of difficulty reproducing it. Does this still happen? If so, the next time you observe this, exit the viewer, then before relaunching the viewer, zip up your viewer logs folder and attach it to this issue using More -> Attach files. This page tells you where to find the logs folder: http://community.secondlife.com/t5/English-Knowledge-Base/How-to-report-a-bug/ta-p/733545#Section_.3

Please press the Info Provided button when you update this issue.

Thanks!