some fixes on env protocol, forced env, etc

This commit is contained in:
UbitUmarov
2020-06-21 01:41:14 +01:00
parent 17e7e9b354
commit 5b56a09cb2
6 changed files with 70 additions and 54 deletions

View File

@@ -6565,8 +6565,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LLSDxmlEncode.AddEndMapAndArray(sb);
bool allowenvovr = (regionFlags & (uint)RegionFlags.AllowEnvironmentOverride) != 0;
int envVersion;
if(allowenvovr)
{
ScenePresence sp = SceneAgent as ScenePresence;
if(sp != null && sp .EnvironmentVersion > 0)
envVersion = sp.EnvironmentVersion;
else
envVersion = landData.EnvironmentVersion;
}
else
envVersion = -1;
LLSDxmlEncode.AddArrayAndMap("ParcelEnvironmentBlock", sb);
LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", allowenvovr ? landData.EnvironmentVersion : -1, sb);
LLSDxmlEncode.AddElem("ParcelEnvironmentVersion", envVersion, sb);
LLSDxmlEncode.AddElem("RegionAllowEnvironmentOverride", allowenvovr, sb);
LLSDxmlEncode.AddEndMapAndArray(sb);