Fixes llSetDamage. Patch from Revolution

mysql-performance
Revolution 2010-01-21 18:12:40 -06:00 committed by Melanie
parent 6c1dd2dfa7
commit 14e62c096d
1 changed files with 5 additions and 7 deletions

View File

@ -3236,17 +3236,15 @@ namespace OpenSim.Region.Framework.Scenes
uint killerObj = 0; uint killerObj = 0;
foreach (uint localid in coldata.Keys) foreach (uint localid in coldata.Keys)
{ {
if (coldata[localid].PenetrationDepth <= 0.10f || m_invulnerable) SceneObjectPart part = Scene.GetSceneObjectPart(localid);
continue;
//if (localid == 0)
//continue;
SceneObjectPart part = m_scene.GetSceneObjectPart(localid);
if (part != null && part.ParentGroup.Damage != -1.0f) if (part != null && part.ParentGroup.Damage != -1.0f)
Health -= part.ParentGroup.Damage; Health -= part.ParentGroup.Damage;
else else
{
if (coldata[localid].PenetrationDepth >= 0.10f)
Health -= coldata[localid].PenetrationDepth * 5.0f; Health -= coldata[localid].PenetrationDepth * 5.0f;
}
if (Health <= 0.0f) if (Health <= 0.0f)
{ {