fix(g1 mesh LI): enforce actual cost for direct legacy UploadObject mesh rez

This commit is contained in:
OpenGenesis (MPL 2.0) committed 2026-11-08 17:28:30 +01:00
1 parent 41705a9bb2
commit 829b784fcb
1 file changed
+6 -1
@@ -276,7 +276,12 @@ namespace OpenSim.Region.ClientStack.Linden
// Required for linking
grp.RootPart.ClearUpdateSchedule();
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
// Legacy UploadObject CAPS creates mesh instances one at
// a time. At minimum, never undercharge a costly instance
// as a flat single prim while the LI policy is enabled.
int landImpact = m_scene.RequestModuleInterface<IPrimCountModule>()
?.GetObjectLandImpact(grp) ?? 1;
if (m_scene.Permissions.CanRezObject(landImpact, avatar.UUID, pos))
{
m_scene.AddSceneObject(grp);
grp.AbsolutePosition = obj.Position;