combat module: those parcel changes are now handled elsewhere

0.9.1.0-post-fixes
UbitUmarov 2019-02-27 13:18:38 +00:00
parent bcf05afd64
commit 9e182c27fb
2 changed files with 2 additions and 35 deletions

View File

@ -953,13 +953,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return; return;
} }
// Saving attachments for NPCs messes them up for the real owner! if(sp.IsNPC)
INPCModule module = m_scene.RequestModuleInterface<INPCModule>(); return;
if (module != null)
{
if (module.IsNPC(sp.UUID, m_scene))
return;
}
if (grp.HasGroupChanged) if (grp.HasGroupChanged)
{ {

View File

@ -77,7 +77,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
} }
scene.EventManager.OnAvatarKilled += KillAvatar; scene.EventManager.OnAvatarKilled += KillAvatar;
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -86,7 +85,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
m_scenel.Remove(scene.RegionInfo.RegionHandle); m_scenel.Remove(scene.RegionInfo.RegionHandle);
scene.EventManager.OnAvatarKilled -= KillAvatar; scene.EventManager.OnAvatarKilled -= KillAvatar;
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
} }
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
@ -177,31 +175,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
deadAvatar.setHealthWithUpdate(100.0f); deadAvatar.setHealthWithUpdate(100.0f);
deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient);
} }
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
{
try
{
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (obj == null)
return;
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0
|| avatar.Scene.RegionInfo.RegionSettings.AllowDamage)
{
avatar.Invulnerable = false;
}
else
{
avatar.Invulnerable = true;
if (avatar.Health < 100.0f)
{
avatar.setHealthWithUpdate(100.0f);
}
}
}
catch (Exception)
{
}
}
} }
} }