fix object rez on terrain, i broke adding physics assistance

avinationmerge
UbitUmarov 2015-09-26 02:33:57 +01:00
parent 0fb033e567
commit d0a7e5bd78
1 changed files with 19 additions and 11 deletions

View File

@ -2333,6 +2333,8 @@ namespace OpenSim.Region.Framework.Scenes
pos = physresults[0].Normal * scale; pos = physresults[0].Normal * scale;
pos *= 0.5f; pos *= 0.5f;
pos = physresults[0].Pos + pos; pos = physresults[0].Pos + pos;
if (wpos.Z > pos.Z) pos = wpos;
return pos; return pos;
} }
foreach (ContactResult r in physresults) foreach (ContactResult r in physresults)
@ -2345,6 +2347,8 @@ namespace OpenSim.Region.Framework.Scenes
pos = physresults[0].Normal * scale; pos = physresults[0].Normal * scale;
pos *= 0.5f; pos *= 0.5f;
pos = physresults[0].Pos + pos; pos = physresults[0].Pos + pos;
if (wpos.Z > pos.Z) pos = wpos;
return pos; return pos;
} }
} }
@ -2387,6 +2391,8 @@ namespace OpenSim.Region.Framework.Scenes
// Un-offset the prim (it gets offset later by the consumer method) // Un-offset the prim (it gets offset later by the consumer method)
//pos.Z -= 0.25F; //pos.Z -= 0.25F;
if (wpos.Z > pos.Z) pos = wpos;
return pos;
} }
} }
else else
@ -2406,11 +2412,15 @@ namespace OpenSim.Region.Framework.Scenes
// fall back to our stupid functionality // fall back to our stupid functionality
pos = RayEnd; pos = RayEnd;
} }
if (wpos.Z > pos.Z) pos = wpos;
return pos;
} }
} }
} }
else
{ }
// fall back to our stupid functionality // fall back to our stupid functionality
pos = RayEnd; pos = RayEnd;
@ -2418,8 +2428,6 @@ namespace OpenSim.Region.Framework.Scenes
//should be getting the normal of the ground at the rez point and using that? //should be getting the normal of the ground at the rez point and using that?
pos.Z += scale.Z / 2f; pos.Z += scale.Z / 2f;
// return pos; // return pos;
}
}
// check against posible water intercept // check against posible water intercept
if (wpos.Z > pos.Z) pos = wpos; if (wpos.Z > pos.Z) pos = wpos;
return pos; return pos;