diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-15 14:14:00 -0800 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-15 14:14:00 -0800 |
commit | ed9af1151fea725574ddedafd75a9ecfb5927082 (patch) | |
tree | 6fb865d740e84865b439d224043a5de7151765c8 /indra/newview/llworld.cpp | |
parent | 0dbf75ab657446b51e6e9795ddccc16bb9f6fd02 (diff) | |
parent | a9eb639511a09dc072e67e10d8885a0b4f7587da (diff) |
Merge with lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r-- | indra/newview/llworld.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8731c9e1a7..399442e5c4 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -126,7 +126,10 @@ void LLWorld::destroyClass() LLViewerRegion* region_to_delete = *region_it++; removeRegion(region_to_delete->getHost()); } - LLVOCache::getInstance()->destroyClass() ; + if(LLVOCache::hasInstance()) + { + LLVOCache::getInstance()->destroyClass() ; + } LLViewerPartSim::getInstance()->destroyClass(); } @@ -428,14 +431,15 @@ BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global) // Allow objects to go up to their radius underground. -F32 LLWorld::getMinAllowedZ(LLViewerObject* object) +F32 LLWorld::getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos) { - F32 land_height = resolveLandHeightGlobal(object->getPositionGlobal()); + F32 land_height = resolveLandHeightGlobal(global_pos); F32 radius = 0.5f * object->getScale().length(); return land_height - radius; } + LLViewerRegion* LLWorld::resolveRegionGlobal(LLVector3 &pos_region, const LLVector3d &pos_global) { LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); |