terrain: make sure modify does get unblocked

0.9.1.1
UbitUmarov 2019-11-17 15:01:21 +00:00
parent 61f918cbda
commit 103ebac082
1 changed files with 130 additions and 123 deletions

View File

@ -1336,6 +1336,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
if(now < NextModifyTerrainTime)
return;
try
{
NextModifyTerrainTime = double.MaxValue; // block it
//m_log.DebugFormat("brushs {0} seconds {1} height {2}, parcel {3}", brushSize, seconds, height, parcelLocalID);
@ -1449,6 +1451,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
ILandObject parcel = m_scene.LandChannel.GetLandObject(parcelLocalID);
if(parcel == null)
return;
bool[,] parcelmap = parcel.GetLandBitmap();
//ugly
for (x = startX; x <= endX; x++)
@ -1485,8 +1488,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain
m_log.Debug("Unknown terrain flood type " + action);
}
}
}
finally
{
NextModifyTerrainTime = Util.GetTimeStamp() + 0.02; // 20ms cooldown
}
}
private void client_OnBakeTerrain(IClientAPI remoteClient)
{