diff --git a/doc/contributions.txt b/doc/contributions.txt
index f070303cfc386fca2be73c9fb279f291cc0a5f50..7d773c71ca8b2383118cbb1a238595a08dec9453 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -634,6 +634,7 @@ Jonathan Yap
 	STORM-1793
 	STORM-1810
 	STORM-1860
+	STORM-1852
 	STORM-1858
 	STORM-1862
 Kadah Coba
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index cd300accb7f74070ea0f940d7d7d459912393d25..da72f2fdaceccf3236cd5d352d00219de31463ae 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2389,10 +2389,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);