diff options
author | Melanie | 2012-05-05 10:32:04 +0100 |
---|---|---|
committer | Melanie | 2012-05-05 10:32:04 +0100 |
commit | 31ab8b2fe0683cbc9fa4503c616722d678b66e33 (patch) | |
tree | 34fefd4bf9db7eea797db49e75aaaac5080ea94b /OpenSim/Region/CoreModules/Avatar | |
parent | Merge branch 'avination' (diff) | |
parent | Fire the scripting changed event with CHANGED_OWNER when an object that has c... (diff) | |
download | opensim-SC-31ab8b2fe0683cbc9fa4503c616722d678b66e33.zip opensim-SC-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.gz opensim-SC-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.bz2 opensim-SC-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/WebUtil.cs
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 17 |
2 files changed, 23 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 69aa0ed..2bfe190 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -578,9 +578,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
578 | private void AttachToAgent( | 578 | private void AttachToAgent( |
579 | IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) | 579 | IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) |
580 | { | 580 | { |
581 | // m_log.DebugFormat( | 581 | // m_log.DebugFormat( |
582 | // "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", | 582 | // "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", |
583 | // so.Name, avatar.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); | 583 | // so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); |
584 | 584 | ||
585 | so.DetachFromBackup(); | 585 | so.DetachFromBackup(); |
586 | 586 | ||
@@ -845,9 +845,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
845 | /// <param name="att"></param> | 845 | /// <param name="att"></param> |
846 | private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att) | 846 | private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att) |
847 | { | 847 | { |
848 | // m_log.DebugFormat( | 848 | // m_log.DebugFormat( |
849 | // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", | 849 | // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", |
850 | // att.Name, sp.Name, AttachmentPt, itemID); | 850 | // att.Name, sp.Name, AttachmentPt, itemID); |
851 | 851 | ||
852 | if (UUID.Zero == itemID) | 852 | if (UUID.Zero == itemID) |
853 | { | 853 | { |
@@ -910,9 +910,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
910 | 910 | ||
911 | private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) | 911 | private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) |
912 | { | 912 | { |
913 | // m_log.DebugFormat( | 913 | // m_log.DebugFormat( |
914 | // "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})", | 914 | // "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})", |
915 | // objectLocalID, remoteClient.Name, AttachmentPt, silent); | 915 | // objectLocalID, remoteClient.Name, AttachmentPt, silent); |
916 | 916 | ||
917 | if (!Enabled) | 917 | if (!Enabled) |
918 | return; | 918 | return; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 0babeb5..3a91465 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -96,6 +96,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
96 | ScenePresence killingAvatar = null; | 96 | ScenePresence killingAvatar = null; |
97 | // string killingAvatarMessage; | 97 | // string killingAvatarMessage; |
98 | 98 | ||
99 | // check to see if it is an NPC and just remove it | ||
100 | INPCModule NPCmodule = deadAvatar.Scene.RequestModuleInterface<INPCModule>(); | ||
101 | if (NPCmodule != null && NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene)) | ||
102 | { | ||
103 | return; | ||
104 | } | ||
105 | |||
99 | if (killerObjectLocalID == 0) | 106 | if (killerObjectLocalID == 0) |
100 | deadAvatarMessage = "You committed suicide!"; | 107 | deadAvatarMessage = "You committed suicide!"; |
101 | else | 108 | else |
@@ -145,7 +152,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
145 | catch (InvalidOperationException) | 152 | catch (InvalidOperationException) |
146 | { } | 153 | { } |
147 | 154 | ||
148 | deadAvatar.Health = 100; | 155 | deadAvatar.setHealthWithUpdate(100.0f); |
149 | deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); | 156 | deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); |
150 | } | 157 | } |
151 | 158 | ||
@@ -154,14 +161,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
154 | try | 161 | try |
155 | { | 162 | { |
156 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 163 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
157 | 164 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | |
158 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) | 165 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) |
159 | { | 166 | { |
160 | avatar.Invulnerable = false; | 167 | avatar.Invulnerable = false; |
161 | } | 168 | } |
162 | else | 169 | else |
163 | { | 170 | { |
164 | avatar.Invulnerable = true; | 171 | avatar.Invulnerable = true; |
172 | if (avatar.Health < 100.0f) | ||
173 | { | ||
174 | avatar.setHealthWithUpdate(100.0f); | ||
175 | } | ||
165 | } | 176 | } |
166 | } | 177 | } |
167 | catch (Exception) | 178 | catch (Exception) |