本文整理汇总了C#中OpenSim.Region.CoreModules.World.Land.LandObject.ForceUpdateLandInfo方法的典型用法代码示例。如果您正苦于以下问题:C# LandObject.ForceUpdateLandInfo方法的具体用法?C# LandObject.ForceUpdateLandInfo怎么用?C# LandObject.ForceUpdateLandInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.CoreModules.World.Land.LandObject
的用法示例。
在下文中一共展示了LandObject.ForceUpdateLandInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PreprocessIncomingLandObjectFromStorage
public bool PreprocessIncomingLandObjectFromStorage(LandData data)
{
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.LandData = data;
if (!new_land.SetLandBitmapFromByteArray())
return false;
new_land.ForceUpdateLandInfo ();
new_land.SetInfoID ();
AddLandObject(new_land, true);
return true;
}
示例2: EventManagerOnIncomingLandDataFromStorage
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data, Vector2 parcelOffset)
{
bool result = true;
for (int i = 0; i < data.Count; i++)
{
if (!PreprocessIncomingLandObjectFromStorage(data[i], parcelOffset))
result = false;
}
List<ILandObject> newSimDefault = new List<ILandObject>();
if (!result || data.Count == 0)//Force a new base first, then force a merge later
if (AllParcels().Count > 0)
newSimDefault = AllParcels();
else
newSimDefault = new List<ILandObject>(new ILandObject[1]{ResetSimLandObjects()});
for (int i = 0; i < data.Count; i++)
{
ILandObject new_land = new LandObject(data[i].OwnerID, data[i].IsGroupOwned, m_scene);
new_land.LandData = data[i];
if (SetLandBitmapFromByteArray(new_land, !result, parcelOffset))//Merge it into the large parcel if possible
{
new_land.ForceUpdateLandInfo();
new_land.SetInfoID();
AddLandObject(new_land, true);
}
}
if (AllParcels().Count == 0)//Serious fallback
ResetSimLandObjects();
}
示例3: EventManagerOnIncomingLandDataFromStorage
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data, Vector2 parcelOffset)
{
bool result = true;
#if (!ISWIN)
foreach (LandData t in data)
{
if (!PreprocessIncomingLandObjectFromStorage(t, parcelOffset))
{
result = false;
}
}
#else
foreach (LandData t in data.Where(t => !PreprocessIncomingLandObjectFromStorage(t, parcelOffset)))
{
result = false;
}
#endif
List<ILandObject> newSimDefault = new List<ILandObject>();
if (!result || data.Count == 0) //Force a new base first, then force a merge later
newSimDefault = AllParcels().Count > 0 ? AllParcels() : new List<ILandObject>(new ILandObject[1] {ResetSimLandObjects()});
foreach (LandData t in data)
{
ILandObject new_land = new LandObject(t.OwnerID, t.IsGroupOwned, m_scene);
new_land.LandData = t;
if (SetLandBitmapFromByteArray(new_land, !result, parcelOffset))
//Merge it into the large parcel if possible
{
new_land.ForceUpdateLandInfo();
new_land.SetInfoID();
AddLandObject(new_land, true);
}
}
if (AllParcels().Count == 0) //Serious fallback
ResetSimLandObjects();
}