本文整理汇总了C#中ILandObject.DenyParcelAccess方法的典型用法代码示例。如果您正苦于以下问题:C# ILandObject.DenyParcelAccess方法的具体用法?C# ILandObject.DenyParcelAccess怎么用?C# ILandObject.DenyParcelAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILandObject
的用法示例。
在下文中一共展示了ILandObject.DenyParcelAccess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetAgentPositionInfo
// This function updates AbsolutePosition (m_pos) even during transit
// Call this version if you already have m_posInfo locked!
// You must either supply the parcel at agentPos, supply a non-null parent, or call the other variant without a parcel and WITHOUT m_posInfo locked.
public void SetAgentPositionInfo(ILandObject parcel, bool forced, Vector3 agentPos, SceneObjectPart parent, Vector3 parentPos, Vector3 velocity)
{
Vector3 pos;
Vector3 oldVelocity;
lock (m_posInfo)
{
if ((!forced) && (IsInTransit) && (parent != m_posInfo.Parent))
return;
if (parent == null)
{
// not seated
if (parcel != null)
{
ParcelPropertiesStatus reason;
if (agentPos.Z < Scene.LandChannel.GetBanHeight() && parcel.DenyParcelAccess(this.UUID, out reason))
{
if (!forced)
return; // illegal position
}
else
lastKnownAllowedPosition = agentPos;
}
}
m_posInfo.Set(agentPos, parent, parentPos);
oldVelocity = m_velocity;
m_velocity = velocity;
ForceAgentPositionInRegion();
pos = m_posInfo.Position;
}
var pa = PhysicsActor;
if (pa != null)
{
if (velocity != oldVelocity)
pa.Velocity = velocity;
pa.Position = pos;
}
}