Implement the NoMove behavior. Cause Reservation flag to be reset on
first connectslimupdates
parent
0d5f182c02
commit
344d27b19d
|
@ -99,6 +99,9 @@ namespace OpenSim.Services.GridService
|
||||||
if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
|
if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
|
||||||
((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
|
((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
|
||||||
{
|
{
|
||||||
|
if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.NoMove) != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Region reregistering in other coordinates. Delete the old entry
|
// Region reregistering in other coordinates. Delete the old entry
|
||||||
m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.",
|
m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.",
|
||||||
regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
|
regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
|
||||||
|
@ -119,10 +122,13 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.LockedOut) != 0)
|
int oldFlags = Convert.ToInt32(region.Data["flags"]);
|
||||||
|
if ((oldFlags & (int)OpenSim.Data.RegionFlags.LockedOut) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
rdata.Data["flags"] = region.Data["flags"]; // Preserve fields
|
oldFlags &= ~(int)OpenSim.Data.RegionFlags.Reservation;
|
||||||
|
|
||||||
|
rdata.Data["flags"] = oldFlags.ToString(); // Preserve flags
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue