add LinksetData support. Untested and still does not store in dbs. Not as spec. See mantis 9081 (runprebuild)

This commit is contained in:
UbitUmarov
2024-02-06 23:45:11 +00:00
parent 00e9e3c77a
commit 2e26b8a8bb
12 changed files with 621 additions and 95 deletions

View File

@@ -237,6 +237,8 @@ namespace OpenSim.Region.Framework.Scenes
///
public int m_linksetPhysCapacity = 0;
public int m_LinkSetDataLimit = 32 * 1024;
/// <summary>
/// When placed outside the region's border, do we transfer the objects or
/// do we keep simulating them here?
@@ -984,7 +986,7 @@ namespace OpenSim.Region.Framework.Scenes
m_persistAfter = startupConfig.GetLong("MaximumTimeBeforePersistenceConsidered", DEFAULT_MAX_TIME_FOR_PERSISTENCE);
m_persistAfter *= 10000000;
m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine");
m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "YEngine");
m_log.InfoFormat("[SCENE]: Default script engine {0}", m_defaultScriptEngine);
m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
@@ -1064,6 +1066,8 @@ namespace OpenSim.Region.Framework.Scenes
m_update_terrain = startupConfig.GetInt("UpdateTerrainEveryNFrames", m_update_terrain);
m_update_temp_cleaning = startupConfig.GetInt("UpdateTempCleaningEveryNSeconds", m_update_temp_cleaning);
string[] possibleScriptConfigSections = new string[] { "YEngine", "Xengine", "Scripts" };
m_LinkSetDataLimit = Util.GetConfigVarFromSections<int>(config, "LinksetDataLimit", possibleScriptConfigSections, m_LinkSetDataLimit);
}
#endregion Region Config

View File

@@ -618,6 +618,7 @@ namespace OpenSim.Region.Framework.Scenes
public uint ParentID;
}
public LinksetData LinksetData;
public bool inTransit = false;
private delegate SceneObjectGroup SOGCrossDelegate(SceneObjectGroup sog,Vector3 pos, TeleportObjectData tpData);
@@ -3195,6 +3196,13 @@ namespace OpenSim.Region.Framework.Scenes
}
}
if(objectGroup.LinksetData is not null)
{
LinksetData ??= new LinksetData(m_scene.m_LinkSetDataLimit);
LinksetData.MergeOther(objectGroup.LinksetData);
objectGroup.LinksetData = null;
}
// 'linkPart' == the root of the group being linked into this group
SceneObjectPart linkPart = objectGroup.m_rootPart;

View File

@@ -213,10 +213,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
output.PackBitsFromByte((byte)header.QuantWBits);
output.PackFloat(header.DCOffset);
output.PackBits(header.Range, 16);
if (largeRegion)
output.PackBits(header.PatchIDs, 32);
else
output.PackBits(header.PatchIDs, 10);
output.PackBits(header.PatchIDs, largeRegion ? 32 : 10);
}
private unsafe static void EncodePatch(BitPack output, int* patch, int postquant, int wbits)
@@ -266,24 +263,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
i = j;
continue;
}
if (temp < 0)
else if (temp < 0)
{
temp *= -1;
if (temp > maxwbitssize)
temp = maxwbitssize;
output.PackBits(NEGATIVE_VALUE, 3);
output.PackBits(temp, wbits);
}
else
{
if (temp > maxwbitssize)
temp = maxwbitssize;
output.PackBits(POSITIVE_VALUE, 3);
output.PackBits(temp, wbits);
}
output.PackBits(temp > maxwbitssize ? maxwbitssize : temp, wbits);
++i;
}
}