diff options
author | Jonathan Yap <none@none> | 2012-05-11 11:33:03 -0400 |
---|---|---|
committer | Jonathan Yap <none@none> | 2012-05-11 11:33:03 -0400 |
commit | 8593020037ab299f945ee2ad425ccb79ceba42cf (patch) | |
tree | 944fe73770420cf1e600c08b240fa49bc90fa25f /indra/newview/llviewerobject.cpp | |
parent | d6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff) |
STORM-1852 Altitude display stutters or is clamped when flying higher than 4096m
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index e590f29a9a..7c6ca90890 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2382,10 +2382,11 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) { // This will put the object underground, but we can't tell if it will stop // at ground level or not min_height = LLWorld::getInstance()->getMinAllowedZ(this, new_pos_global); + // Cap maximum height + new_pos.mV[VZ] = llmin(LLWorld::getInstance()->getRegionMaxHeight(), new_pos.mV[VZ]); } new_pos.mV[VZ] = llmax(min_height, new_pos.mV[VZ]); - new_pos.mV[VZ] = llmin(LLWorld::getInstance()->getRegionMaxHeight(), new_pos.mV[VZ]); // Check to see if it's going off the region LLVector3 temp(new_pos); |