diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-09 15:21:20 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-09 15:21:20 +0200 |
| commit | 29105b117db2da4607200629ae6767b129a51d8c (patch) | |
| tree | 95a259dd91afa834d80bb30a14e696c3cbba07b5 /indra/newview/llagent.cpp | |
| parent | b9bf48774899377ceee90d7e0538dc7dcbe86461 (diff) | |
| parent | 90d985946ce167a313e2765728caf2652931dfdd (diff) | |
Merge from default branch.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 75a72e5b17..24bdf66c2a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -75,6 +75,8 @@ #include "llstatusbar.h" #include "llteleportflags.h" #include "llteleporthistory.h" +#include "lltexturestats.h" +#include "lltexturestats.h" #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" @@ -6085,17 +6087,16 @@ void LLAgent::teleportCancel() void LLAgent::teleportViaLocation(const LLVector3d& pos_global) { LLViewerRegion* regionp = getRegion(); - LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); + U64 handle = to_region_handle(pos_global); + LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); if(regionp && info) { - U32 x_pos; - U32 y_pos; - from_region_handle(info->mHandle, &x_pos, &y_pos); + LLVector3d region_origin = info->getGlobalOrigin(); LLVector3 pos_local( - (F32)(pos_global.mdV[VX] - x_pos), - (F32)(pos_global.mdV[VY] - y_pos), + (F32)(pos_global.mdV[VX] - region_origin.mdV[VX]), + (F32)(pos_global.mdV[VY] - region_origin.mdV[VY]), (F32)(pos_global.mdV[VZ])); - teleportRequest(info->mHandle, pos_local); + teleportRequest(handle, pos_local); } else if(regionp && teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY]))) @@ -6512,3 +6513,4 @@ LLAgentQueryManager::~LLAgentQueryManager() } // EOF + |
