diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvowater.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/linden/indra/newview/llvowater.cpp b/linden/indra/newview/llvowater.cpp index 5b6a949..7e9470a 100644 --- a/linden/indra/newview/llvowater.cpp +++ b/linden/indra/newview/llvowater.cpp | |||
@@ -70,17 +70,16 @@ const F32 WAVE_STEP_INV = (1. / WAVE_STEP); | |||
70 | 70 | ||
71 | 71 | ||
72 | LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) | 72 | LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) |
73 | : LLStaticViewerObject(id, LL_VO_WATER, regionp) | 73 | : LLStaticViewerObject(id, pcode, regionp) |
74 | { | 74 | { |
75 | // Terrain must draw during selection passes so it can block objects behind it. | 75 | // Terrain must draw during selection passes so it can block objects behind it. |
76 | mbCanSelect = FALSE; | 76 | mbCanSelect = FALSE; |
77 | setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. | 77 | setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. |
78 | 78 | ||
79 | mUseTexture = TRUE; | 79 | mUseTexture = TRUE; |
80 | mIsEdgePatch = FALSE; | 80 | mRenderType = LLPipeline::RENDER_TYPE_WATER; |
81 | } | 81 | } |
82 | 82 | ||
83 | |||
84 | void LLVOWater::markDead() | 83 | void LLVOWater::markDead() |
85 | { | 84 | { |
86 | LLViewerObject::markDead(); | 85 | LLViewerObject::markDead(); |
@@ -123,7 +122,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) | |||
123 | { | 122 | { |
124 | pipeline->allocDrawable(this); | 123 | pipeline->allocDrawable(this); |
125 | mDrawable->setLit(FALSE); | 124 | mDrawable->setLit(FALSE); |
126 | mDrawable->setRenderType(LLPipeline::RENDER_TYPE_WATER); | 125 | mDrawable->setRenderType(mRenderType); |
127 | 126 | ||
128 | LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); | 127 | LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); |
129 | 128 | ||
@@ -254,11 +253,6 @@ void LLVOWater::setUseTexture(const BOOL use_texture) | |||
254 | mUseTexture = use_texture; | 253 | mUseTexture = use_texture; |
255 | } | 254 | } |
256 | 255 | ||
257 | void LLVOWater::setIsEdgePatch(const BOOL edge_patch) | ||
258 | { | ||
259 | mIsEdgePatch = edge_patch; | ||
260 | } | ||
261 | |||
262 | void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) | 256 | void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) |
263 | { | 257 | { |
264 | LLVector3 pos = getPositionAgent(); | 258 | LLVector3 pos = getPositionAgent(); |
@@ -271,8 +265,13 @@ void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) | |||
271 | } | 265 | } |
272 | 266 | ||
273 | U32 LLVOWater::getPartitionType() const | 267 | U32 LLVOWater::getPartitionType() const |
274 | { | 268 | { |
275 | return LLViewerRegion::PARTITION_WATER; | 269 | return LLViewerRegion::PARTITION_WATER; |
270 | } | ||
271 | |||
272 | U32 LLVOVoidWater::getPartitionType() const | ||
273 | { | ||
274 | return LLViewerRegion::PARTITION_VOIDWATER; | ||
276 | } | 275 | } |
277 | 276 | ||
278 | LLWaterPartition::LLWaterPartition() | 277 | LLWaterPartition::LLWaterPartition() |
@@ -283,3 +282,9 @@ LLWaterPartition::LLWaterPartition() | |||
283 | mDrawableType = LLPipeline::RENDER_TYPE_WATER; | 282 | mDrawableType = LLPipeline::RENDER_TYPE_WATER; |
284 | mPartitionType = LLViewerRegion::PARTITION_WATER; | 283 | mPartitionType = LLViewerRegion::PARTITION_WATER; |
285 | } | 284 | } |
285 | |||
286 | LLVoidWaterPartition::LLVoidWaterPartition() | ||
287 | { | ||
288 | mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER; | ||
289 | mPartitionType = LLViewerRegion::PARTITION_VOIDWATER; | ||
290 | } | ||