Prevent llTeleportAgentHome from affecting gods

avinationmerge
Thomas Grimshaw 2010-03-17 17:42:33 +01:00
parent 37815f3402
commit e442c2a3f9
1 changed files with 3 additions and 0 deletions

View File

@ -4193,6 +4193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence presence = World.GetScenePresence(agentId); ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null) if (presence != null)
{ {
// agent must not be a god
if (presence.GodLevel >= 200) return;
// agent must be over the owners land // agent must be over the owners land
if (m_host.OwnerID == World.LandChannel.GetLandObject( if (m_host.OwnerID == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)