diff options
author | UbitUmarov | 2019-02-27 13:18:38 +0000 |
---|---|---|
committer | UbitUmarov | 2019-02-27 13:18:38 +0000 |
commit | 9e182c27fbf598aaa418562a031f6ef8678b2710 (patch) | |
tree | 2a8a8bb4a18d6e222a1c1649c1fad636836603f1 /OpenSim | |
parent | direct encode terseupdates (diff) | |
download | opensim-SC-9e182c27fbf598aaa418562a031f6ef8678b2710.zip opensim-SC-9e182c27fbf598aaa418562a031f6ef8678b2710.tar.gz opensim-SC-9e182c27fbf598aaa418562a031f6ef8678b2710.tar.bz2 opensim-SC-9e182c27fbf598aaa418562a031f6ef8678b2710.tar.xz |
combat module: those parcel changes are now handled elsewhere
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 28 |
2 files changed, 2 insertions, 35 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index d36d770..5205576 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -953,13 +953,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
953 | return; | 953 | return; |
954 | } | 954 | } |
955 | 955 | ||
956 | // Saving attachments for NPCs messes them up for the real owner! | 956 | if(sp.IsNPC) |
957 | INPCModule module = m_scene.RequestModuleInterface<INPCModule>(); | 957 | return; |
958 | if (module != null) | ||
959 | { | ||
960 | if (module.IsNPC(sp.UUID, m_scene)) | ||
961 | return; | ||
962 | } | ||
963 | 958 | ||
964 | if (grp.HasGroupChanged) | 959 | if (grp.HasGroupChanged) |
965 | { | 960 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 4e1958a..10bc6aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -77,7 +77,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
77 | } | 77 | } |
78 | 78 | ||
79 | scene.EventManager.OnAvatarKilled += KillAvatar; | 79 | scene.EventManager.OnAvatarKilled += KillAvatar; |
80 | scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; | ||
81 | } | 80 | } |
82 | 81 | ||
83 | public void RemoveRegion(Scene scene) | 82 | public void RemoveRegion(Scene scene) |
@@ -86,7 +85,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
86 | m_scenel.Remove(scene.RegionInfo.RegionHandle); | 85 | m_scenel.Remove(scene.RegionInfo.RegionHandle); |
87 | 86 | ||
88 | scene.EventManager.OnAvatarKilled -= KillAvatar; | 87 | scene.EventManager.OnAvatarKilled -= KillAvatar; |
89 | scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; | ||
90 | } | 88 | } |
91 | 89 | ||
92 | public void RegionLoaded(Scene scene) | 90 | public void RegionLoaded(Scene scene) |
@@ -177,31 +175,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
177 | deadAvatar.setHealthWithUpdate(100.0f); | 175 | deadAvatar.setHealthWithUpdate(100.0f); |
178 | deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); | 176 | deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); |
179 | } | 177 | } |
180 | |||
181 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | ||
182 | { | ||
183 | try | ||
184 | { | ||
185 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | ||
186 | if (obj == null) | ||
187 | return; | ||
188 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | ||
189 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) | ||
190 | { | ||
191 | avatar.Invulnerable = false; | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | avatar.Invulnerable = true; | ||
196 | if (avatar.Health < 100.0f) | ||
197 | { | ||
198 | avatar.setHealthWithUpdate(100.0f); | ||
199 | } | ||
200 | } | ||
201 | } | ||
202 | catch (Exception) | ||
203 | { | ||
204 | } | ||
205 | } | ||
206 | } | 178 | } |
207 | } | 179 | } |