summaryrefslogtreecommitdiff
path: root/indra/newview/llvowater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvowater.cpp')
-rw-r--r--indra/newview/llvowater.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 71f08ec36d..9f3ec9cadc 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -261,15 +261,21 @@ void LLVOWater::setIsEdgePatch(const BOOL edge_patch)
mIsEdgePatch = edge_patch;
}
-void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax)
+void LLVOWater::updateSpatialExtents(LLVector4a &newMin, LLVector4a& newMax)
{
- LLVector3 pos = getPositionAgent();
- LLVector3 scale = getScale();
-
- newMin = pos - scale * 0.5f;
- newMax = pos + scale * 0.5f;
+ LLVector4a pos;
+ pos.load3(getPositionAgent().mV);
+ LLVector4a scale;
+ scale.load3(getScale().mV);
+ scale.mul(0.5f);
+
+ newMin.setSub(pos, scale);
+ newMax.setAdd(pos, scale);
+
+ pos.setAdd(newMin,newMax);
+ pos.mul(0.5f);
- mDrawable->setPositionGroup((newMin + newMax) * 0.5f);
+ mDrawable->setPositionGroup(pos);
}
U32 LLVOWater::getPartitionType() const