aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2015-09-26 02:33:57 +0100
committerUbitUmarov2015-09-26 02:33:57 +0100
commitd0a7e5bd787f1ffcd6c905d03f26e7b75d92cb0e (patch)
tree18f46b1b4bf3ad30c68cb2733a322619f286a01a /OpenSim
parent fix object crossings to other scene on same instance (diff)
downloadopensim-SC_OLD-d0a7e5bd787f1ffcd6c905d03f26e7b75d92cb0e.zip
opensim-SC_OLD-d0a7e5bd787f1ffcd6c905d03f26e7b75d92cb0e.tar.gz
opensim-SC_OLD-d0a7e5bd787f1ffcd6c905d03f26e7b75d92cb0e.tar.bz2
opensim-SC_OLD-d0a7e5bd787f1ffcd6c905d03f26e7b75d92cb0e.tar.xz
fix object rez on terrain, i broke adding physics assistance
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3b5f924..932c9a1 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2303,7 +2303,7 @@ namespace OpenSim.Region.Framework.Scenes
2303 else 2303 else
2304 { 2304 {
2305 Vector3 rayEnd = RayEnd; 2305 Vector3 rayEnd = RayEnd;
2306 2306
2307 Vector3 dir = rayEnd - RayStart; 2307 Vector3 dir = rayEnd - RayStart;
2308 float dist = dir.Length(); 2308 float dist = dir.Length();
2309 if (dist != 0) 2309 if (dist != 0)
@@ -2333,6 +2333,8 @@ namespace OpenSim.Region.Framework.Scenes
2333 pos = physresults[0].Normal * scale; 2333 pos = physresults[0].Normal * scale;
2334 pos *= 0.5f; 2334 pos *= 0.5f;
2335 pos = physresults[0].Pos + pos; 2335 pos = physresults[0].Pos + pos;
2336
2337 if (wpos.Z > pos.Z) pos = wpos;
2336 return pos; 2338 return pos;
2337 } 2339 }
2338 foreach (ContactResult r in physresults) 2340 foreach (ContactResult r in physresults)
@@ -2345,6 +2347,8 @@ namespace OpenSim.Region.Framework.Scenes
2345 pos = physresults[0].Normal * scale; 2347 pos = physresults[0].Normal * scale;
2346 pos *= 0.5f; 2348 pos *= 0.5f;
2347 pos = physresults[0].Pos + pos; 2349 pos = physresults[0].Pos + pos;
2350
2351 if (wpos.Z > pos.Z) pos = wpos;
2348 return pos; 2352 return pos;
2349 } 2353 }
2350 } 2354 }
@@ -2385,8 +2389,10 @@ namespace OpenSim.Region.Framework.Scenes
2385 //Seems to make no sense to do this as this call is used for rezzing from inventory as well, and with inventory items their size is not always 0.5f 2389 //Seems to make no sense to do this as this call is used for rezzing from inventory as well, and with inventory items their size is not always 0.5f
2386 //And in cases when we weren't rezzing from inventory we were re-adding the 0.25 straight after calling this method 2390 //And in cases when we weren't rezzing from inventory we were re-adding the 0.25 straight after calling this method
2387 // Un-offset the prim (it gets offset later by the consumer method) 2391 // Un-offset the prim (it gets offset later by the consumer method)
2388 //pos.Z -= 0.25F; 2392 //pos.Z -= 0.25F;
2389 2393
2394 if (wpos.Z > pos.Z) pos = wpos;
2395 return pos;
2390 } 2396 }
2391 } 2397 }
2392 else 2398 else
@@ -2406,20 +2412,22 @@ namespace OpenSim.Region.Framework.Scenes
2406 // fall back to our stupid functionality 2412 // fall back to our stupid functionality
2407 pos = RayEnd; 2413 pos = RayEnd;
2408 } 2414 }
2415
2416 if (wpos.Z > pos.Z) pos = wpos;
2417 return pos;
2409 } 2418 }
2410 } 2419 }
2411 } 2420 }
2412 else
2413 {
2414 // fall back to our stupid functionality
2415 pos = RayEnd;
2416 2421
2417 //increase height so its above the ground.
2418 //should be getting the normal of the ground at the rez point and using that?
2419 pos.Z += scale.Z / 2f;
2420 // return pos;
2421 }
2422 } 2422 }
2423
2424 // fall back to our stupid functionality
2425 pos = RayEnd;
2426
2427 //increase height so its above the ground.
2428 //should be getting the normal of the ground at the rez point and using that?
2429 pos.Z += scale.Z / 2f;
2430 // return pos;
2423 // check against posible water intercept 2431 // check against posible water intercept
2424 if (wpos.Z > pos.Z) pos = wpos; 2432 if (wpos.Z > pos.Z) pos = wpos;
2425 return pos; 2433 return pos;