aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-15 00:10:01 +0000
committerMelanie Thielker2009-07-15 00:10:01 +0000
commitfb4067c84493582bd3897eb7aee846c19bf334af (patch)
treeb73a0f99432335c2d30a6acf7a5b3c75b195eba6 /OpenSim/Region/Framework/Scenes
parentThank you, Twitch, for a patch to restore mayhem and murder to OpenSim (diff)
downloadopensim-SC_OLD-fb4067c84493582bd3897eb7aee846c19bf334af.zip
opensim-SC_OLD-fb4067c84493582bd3897eb7aee846c19bf334af.tar.gz
opensim-SC_OLD-fb4067c84493582bd3897eb7aee846c19bf334af.tar.bz2
opensim-SC_OLD-fb4067c84493582bd3897eb7aee846c19bf334af.tar.xz
A stab at implementing llSetDamage. Not persistent.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs7
3 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 31b94d9..d65dbaf 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -326,6 +326,12 @@ namespace OpenSim.Region.Framework.Scenes
326 set { m_rootPart.OwnerID = value; } 326 set { m_rootPart.OwnerID = value; }
327 } 327 }
328 328
329 public float Damage
330 {
331 get { return m_rootPart.Damage; }
332 set { m_rootPart.Damage = value; }
333 }
334
329 public Color Color 335 public Color Color
330 { 336 {
331 get { return m_rootPart.Color; } 337 get { return m_rootPart.Color; }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index dd00ff4..a4d455c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -195,6 +195,8 @@ namespace OpenSim.Region.Framework.Scenes
195 195
196 [XmlIgnore] 196 [XmlIgnore]
197 private PrimFlags LocalFlags = 0; 197 private PrimFlags LocalFlags = 0;
198 [XmlIgnore]
199 private float m_damage = -1.0f;
198 private byte[] m_TextureAnimation; 200 private byte[] m_TextureAnimation;
199 private byte m_clickAction = 0; 201 private byte m_clickAction = 0;
200 private Color m_color = Color.Black; 202 private Color m_color = Color.Black;
@@ -484,6 +486,13 @@ namespace OpenSim.Region.Framework.Scenes
484 set { m_rezzed = value; } 486 set { m_rezzed = value; }
485 } 487 }
486 488
489 [XmlIgnore]
490 public float Damage
491 {
492 get { return m_damage; }
493 set { m_damage = value; }
494 }
495
487 /// <summary> 496 /// <summary>
488 /// The position of the entire group that this prim belongs to. 497 /// The position of the entire group that this prim belongs to.
489 /// </summary> 498 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b85a138..56369f5 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3230,7 +3230,12 @@ namespace OpenSim.Region.Framework.Scenes
3230 //if (localid == 0) 3230 //if (localid == 0)
3231 //continue; 3231 //continue;
3232 3232
3233 Health -= coldata[localid] * 5; 3233 SceneObjectPart part = m_scene.GetSceneObjectPart(localid);
3234
3235 if (part != null && part.ParentGroup.Damage != -1.0f)
3236 Health -= part.ParentGroup.Damage;
3237 else
3238 Health -= coldata[localid] * 5;
3234 3239
3235 if (Health <= 0) 3240 if (Health <= 0)
3236 { 3241 {