aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworld.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:59 -0500
committerJacek Antonelli2008-08-15 23:44:59 -0500
commita408bac29378072fbf36864164149458c978cfcc (patch)
tree67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/newview/llworld.cpp
parentSecond Life viewer sources 1.17.0.12 (diff)
downloadmeta-impy-a408bac29378072fbf36864164149458c978cfcc.zip
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz
Second Life viewer sources 1.17.1.0
Diffstat (limited to 'linden/indra/newview/llworld.cpp')
-rw-r--r--linden/indra/newview/llworld.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 9c71ee4..7696431 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -501,6 +501,8 @@ F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d
501 501
502 land_intersection.mdV[VZ] = regionp->getLand().resolveHeightGlobal(point_a); 502 land_intersection.mdV[VZ] = regionp->getLand().resolveHeightGlobal(point_a);
503 normalized_land_distance = (F32)(point_a.mdV[VZ] - land_intersection.mdV[VZ]) / segment_length; 503 normalized_land_distance = (F32)(point_a.mdV[VZ] - land_intersection.mdV[VZ]) / segment_length;
504 intersection = land_intersection;
505 intersection_normal = resolveLandNormalGlobal(land_intersection);
504 506
505 if (avatarp && !avatarp->mFootPlane.isExactlyClear()) 507 if (avatarp && !avatarp->mFootPlane.isExactlyClear())
506 { 508 {
@@ -511,17 +513,13 @@ F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d
511 norm_dist_from_plane = llclamp(norm_dist_from_plane / segment_length, 0.f, 1.f); 513 norm_dist_from_plane = llclamp(norm_dist_from_plane / segment_length, 0.f, 1.f);
512 if (norm_dist_from_plane < normalized_land_distance) 514 if (norm_dist_from_plane < normalized_land_distance)
513 { 515 {
516 // collided with object before land
514 normalized_land_distance = norm_dist_from_plane; 517 normalized_land_distance = norm_dist_from_plane;
515 intersection = point_a; 518 intersection = point_a;
516 intersection.mdV[VZ] -= norm_dist_from_plane * segment_length; 519 intersection.mdV[VZ] -= norm_dist_from_plane * segment_length;
517 intersection_normal = foot_plane_normal; 520 intersection_normal = foot_plane_normal;
518 } 521 }
519 } 522 }
520 else
521 {
522 intersection = land_intersection;
523 intersection_normal = resolveLandNormalGlobal(land_intersection);
524 }
525 523
526 return normalized_land_distance; 524 return normalized_land_distance;
527} 525}