aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltoolplacer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lltoolplacer.cpp')
-rw-r--r--linden/indra/newview/lltoolplacer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp
index bf8a400..a319236 100644
--- a/linden/indra/newview/lltoolplacer.cpp
+++ b/linden/indra/newview/lltoolplacer.cpp
@@ -117,7 +117,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
117 } 117 }
118 118
119 // Find the sim where the surface lives. 119 // Find the sim where the surface lives.
120 LLViewerRegion *regionp = gWorldp->getRegionFromPosGlobal(surface_pos_global); 120 LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global);
121 if (!regionp) 121 if (!regionp)
122 { 122 {
123 llwarns << "Trying to add object outside of all known regions!" << llendl; 123 llwarns << "Trying to add object outside of all known regions!" << llendl;
@@ -130,8 +130,8 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
130 130
131 *region = regionp; 131 *region = regionp;
132 *ray_start_region = regionp->getPosRegionFromGlobal( ray_start_global ); 132 *ray_start_region = regionp->getPosRegionFromGlobal( ray_start_global );
133 F32 near_clip = gCamera->getNear() + 0.01f; // Include an epsilon to avoid rounding issues. 133 F32 near_clip = LLViewerCamera::getInstance()->getNear() + 0.01f; // Include an epsilon to avoid rounding issues.
134 *ray_start_region += gCamera->getAtAxis() * near_clip; 134 *ray_start_region += LLViewerCamera::getInstance()->getAtAxis() * near_clip;
135 135
136 if( bypass_sim_raycast ) 136 if( bypass_sim_raycast )
137 { 137 {
@@ -415,18 +415,18 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
415 // Spawns a message, so must be after above send 415 // Spawns a message, so must be after above send
416 if (create_selected) 416 if (create_selected)
417 { 417 {
418 gSelectMgr->deselectAll(); 418 LLSelectMgr::getInstance()->deselectAll();
419 gViewerWindow->getWindow()->incBusyCount(); 419 gViewerWindow->getWindow()->incBusyCount();
420 } 420 }
421 421
422 // VEFFECT: AddObject 422 // VEFFECT: AddObject
423 LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)gHUDManager->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); 423 LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
424 effectp->setSourceObject((LLViewerObject*)gAgent.getAvatarObject()); 424 effectp->setSourceObject((LLViewerObject*)gAgent.getAvatarObject());
425 effectp->setPositionGlobal(regionp->getPosGlobalFromRegion(ray_end_region)); 425 effectp->setPositionGlobal(regionp->getPosGlobalFromRegion(ray_end_region));
426 effectp->setDuration(LL_HUD_DUR_SHORT); 426 effectp->setDuration(LL_HUD_DUR_SHORT);
427 effectp->setColor(LLColor4U(gAgent.getEffectColor())); 427 effectp->setColor(LLColor4U(gAgent.getEffectColor()));
428 428
429 gViewerStats->incStat(LLViewerStats::ST_CREATE_COUNT); 429 LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CREATE_COUNT);
430 430
431 return TRUE; 431 return TRUE;
432} 432}
@@ -468,7 +468,7 @@ BOOL LLToolPlacer::addDuplicate(S32 x, S32 y)
468 ray_target_id.setNull(); 468 ray_target_id.setNull();
469 } 469 }
470 470
471 gSelectMgr->selectDuplicateOnRay(ray_start_region, 471 LLSelectMgr::getInstance()->selectDuplicateOnRay(ray_start_region,
472 ray_end_region, 472 ray_end_region,
473 b_hit_land, // suppress raycast 473 b_hit_land, // suppress raycast
474 FALSE, // intersection 474 FALSE, // intersection
@@ -503,7 +503,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
503 // ...and go back to the default tool 503 // ...and go back to the default tool
504 if (added && !gSavedSettings.getBOOL("CreateToolKeepSelected")) 504 if (added && !gSavedSettings.getBOOL("CreateToolKeepSelected"))
505 { 505 {
506 gToolMgr->getCurrentToolset()->selectTool( gToolTranslate ); 506 LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() );
507 } 507 }
508 508
509 return added; 509 return added;