From 6be90572d97136253618ef0817d144d28004b655 Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Sat, 29 Oct 2011 13:47:23 -0400 Subject: [PATCH] Code cleanup and performace enacment. --- indra/newview/llviewerobject.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index d8465cc6ee..4048ee4c58 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2429,10 +2429,11 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) } new_pos.mV[VZ] = llmax(min_height, new_pos.mV[VZ]); - if(!gSavedSettings.getBOOL("FSRemoveFlyHeightLimit")) -{ - new_pos.mV[VZ] = llmin(LLWorld::getInstance()->getRegionMaxHeight(), new_pos.mV[VZ]); -} + static LLCachedControl no_fly_height_limit(gSavedSettings, "FSRemoveFlyHeightLimit"); + if(!no_fly_height_limit) + { + 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);