feat(g1 mesh LI): enforce mesh quota in inventory and script rez operations

This commit is contained in:
OpenGenesis (MPL 2.0) committed 2026-11-08 17:21:52 +01:00
1 parent beec5339f8
commit e35563093a
1 file changed
+4 -3
@@ -761,11 +761,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
return;
}
int totalPrims = 0;
int totalImpact = 0;
IPrimCountModule landImpactModule = m_scene.RequestModuleInterface<IPrimCountModule>();
foreach (SceneObjectGroup group in objlist)
totalPrims += group.PrimCount;
totalImpact += landImpactModule?.GetObjectLandImpact(group) ?? group.PrimCount;
if (! m_scene.Permissions.CanRezObject(totalPrims, item.OwnerID, pos))
if (! m_scene.Permissions.CanRezObject(totalImpact, item.OwnerID, pos))
{
GenerateRuntimeError("Not allowed to create the object");
return;