mantis 8558: send sane values for Agents and objects capability (max hard limit)
parent
03abb970f4
commit
d372309e3c
|
@ -33,7 +33,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public float billableFactor;
|
public float billableFactor;
|
||||||
public uint estateID;
|
public uint estateID;
|
||||||
public byte maxAgents;
|
public int maxAgents;
|
||||||
public float objectBonusFactor;
|
public float objectBonusFactor;
|
||||||
public uint parentEstateID;
|
public uint parentEstateID;
|
||||||
public int pricePerMeter;
|
public int pricePerMeter;
|
||||||
|
@ -48,5 +48,7 @@ namespace OpenSim.Framework
|
||||||
public float waterHeight;
|
public float waterHeight;
|
||||||
public string simName;
|
public string simName;
|
||||||
public string regionType;
|
public string regionType;
|
||||||
|
public int AgentCapacity;
|
||||||
|
public int ObjectsCapacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6347,7 +6347,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
rinfopack.AgentData.SessionID = SessionId;
|
rinfopack.AgentData.SessionID = SessionId;
|
||||||
rinfoblk.BillableFactor = args.billableFactor;
|
rinfoblk.BillableFactor = args.billableFactor;
|
||||||
rinfoblk.EstateID = args.estateID;
|
rinfoblk.EstateID = args.estateID;
|
||||||
rinfoblk.MaxAgents = args.maxAgents;
|
rinfoblk.MaxAgents = (byte)args.maxAgents;
|
||||||
rinfoblk.ObjectBonusFactor = args.objectBonusFactor;
|
rinfoblk.ObjectBonusFactor = args.objectBonusFactor;
|
||||||
rinfoblk.ParentEstateID = args.parentEstateID;
|
rinfoblk.ParentEstateID = args.parentEstateID;
|
||||||
rinfoblk.PricePerMeter = args.pricePerMeter;
|
rinfoblk.PricePerMeter = args.pricePerMeter;
|
||||||
|
@ -6363,9 +6363,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
rinfoblk.SimName = Utils.StringToBytes(args.simName);
|
rinfoblk.SimName = Utils.StringToBytes(args.simName);
|
||||||
|
|
||||||
rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
|
rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
|
||||||
rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue;
|
rinfopack.RegionInfo2.HardMaxAgents = (uint)args.AgentCapacity;
|
||||||
rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue;
|
rinfopack.RegionInfo2.HardMaxObjects = (uint)args.ObjectsCapacity;
|
||||||
rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue;
|
rinfopack.RegionInfo2.MaxAgents32 = (uint)args.maxAgents;
|
||||||
rinfopack.RegionInfo2.ProductName = Util.StringToBytes256(args.regionType);
|
rinfopack.RegionInfo2.ProductName = Util.StringToBytes256(args.regionType);
|
||||||
rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes;
|
rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes;
|
||||||
|
|
||||||
|
@ -8013,7 +8013,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
AddLocalPacketHandler(PacketType.AssetUploadRequest, HandleAssetUploadRequest);
|
AddLocalPacketHandler(PacketType.AssetUploadRequest, HandleAssetUploadRequest);
|
||||||
AddLocalPacketHandler(PacketType.RequestXfer, HandleRequestXfer);
|
AddLocalPacketHandler(PacketType.RequestXfer, HandleRequestXfer);
|
||||||
AddLocalPacketHandler(PacketType.SendXferPacket, HandleSendXferPacket);
|
AddLocalPacketHandler(PacketType.SendXferPacket, HandleSendXferPacket);
|
||||||
AddLocalPacketHandler(PacketType.ConfirmXferPacket, HandleConfirmXferPacket);
|
AddLocalPacketHandler(PacketType.ConfirmXferPacket, HandleConfirmXferPacket, false);
|
||||||
AddLocalPacketHandler(PacketType.AbortXfer, HandleAbortXfer);
|
AddLocalPacketHandler(PacketType.AbortXfer, HandleAbortXfer);
|
||||||
AddLocalPacketHandler(PacketType.CreateInventoryFolder, HandleCreateInventoryFolder);
|
AddLocalPacketHandler(PacketType.CreateInventoryFolder, HandleCreateInventoryFolder);
|
||||||
AddLocalPacketHandler(PacketType.UpdateInventoryFolder, HandleUpdateInventoryFolder);
|
AddLocalPacketHandler(PacketType.UpdateInventoryFolder, HandleUpdateInventoryFolder);
|
||||||
|
@ -10636,12 +10636,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
RequestXferPacket xferReq = (RequestXferPacket)Pack;
|
RequestXferPacket xferReq = (RequestXferPacket)Pack;
|
||||||
|
|
||||||
RequestXfer handlerRequestXfer = OnRequestXfer;
|
OnRequestXfer?.Invoke(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename));
|
||||||
|
|
||||||
if (handlerRequestXfer != null)
|
|
||||||
{
|
|
||||||
handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename));
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10649,11 +10644,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack;
|
SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack;
|
||||||
|
|
||||||
XferReceive handlerXferReceive = OnXferReceive;
|
OnXferReceive?.Invoke(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data);
|
||||||
if (handlerXferReceive != null)
|
|
||||||
{
|
|
||||||
handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10661,23 +10652,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
|
ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
|
||||||
|
|
||||||
ConfirmXfer handlerConfirmXfer = OnConfirmXfer;
|
OnConfirmXfer?.Invoke(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet);
|
||||||
if (handlerConfirmXfer != null)
|
|
||||||
{
|
|
||||||
handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandleAbortXfer(IClientAPI sender, Packet Pack)
|
private bool HandleAbortXfer(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
AbortXferPacket abortXfer = (AbortXferPacket)Pack;
|
AbortXferPacket abortXfer = (AbortXferPacket)Pack;
|
||||||
AbortXfer handlerAbortXfer = OnAbortXfer;
|
|
||||||
if (handlerAbortXfer != null)
|
|
||||||
{
|
|
||||||
handlerAbortXfer(this, abortXfer.XferID.ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
OnAbortXfer?.Invoke(this, abortXfer.XferID.ID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1404,7 +1404,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
|
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
|
||||||
args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
|
args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
|
||||||
args.estateID = Scene.RegionInfo.EstateSettings.EstateID;
|
args.estateID = Scene.RegionInfo.EstateSettings.EstateID;
|
||||||
args.maxAgents = (byte)Scene.RegionInfo.RegionSettings.AgentLimit;
|
args.maxAgents = Scene.RegionInfo.RegionSettings.AgentLimit;
|
||||||
args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus;
|
args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus;
|
||||||
args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID;
|
args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID;
|
||||||
args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter;
|
args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter;
|
||||||
|
@ -1419,6 +1419,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
|
args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
|
||||||
args.simName = Scene.RegionInfo.RegionName;
|
args.simName = Scene.RegionInfo.RegionName;
|
||||||
args.regionType = Scene.RegionInfo.RegionType;
|
args.regionType = Scene.RegionInfo.RegionType;
|
||||||
|
args.AgentCapacity = Scene.RegionInfo.AgentCapacity;
|
||||||
|
args.ObjectsCapacity = Scene.RegionInfo.ObjectCapacity;
|
||||||
|
|
||||||
remote_client.SendRegionInfoToEstateMenu(args);
|
remote_client.SendRegionInfoToEstateMenu(args);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue