Fixes focusing from minimap

This commit is contained in:
Siana Gearz
2011-01-08 02:17:04 +01:00
parent cbb22d7d12
commit 29aef502ea
4 changed files with 30 additions and 2 deletions

View File

@@ -13672,13 +13672,13 @@
<key>ContactListCollapsed</key>
<map>
<key>Comment</key>
<string>Send a digest of texture info to the sim</string>
<string>Hide extended friend information in contact list</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>FloaterHexRect</key>
<map>

View File

@@ -1141,6 +1141,22 @@ void LLFloaterAvatarList::focusOnNext(BOOL marked_only)
}
}
/*static*/
void LLFloaterAvatarList::lookAtAvatar(LLUUID &uuid)
{ // twisted laws
LLViewerObject* voavatar = gObjectList.findObject(uuid);
if(voavatar && voavatar->isAvatar())
{
gAgent.setFocusOnAvatar(FALSE, FALSE);
gAgent.changeCameraToThirdPerson();
gAgent.setFocusGlobal(voavatar->getPositionGlobal(),uuid);
gAgent.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal()
+ LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(),
voavatar->getPositionGlobal(),
uuid );
}
}
//static
void LLFloaterAvatarList::onClickPrevInList(void *userdata)
{

View File

@@ -182,6 +182,8 @@ public:
std::string getSelectedName();
LLUUID getSelectedID();
static void lookAtAvatar(LLUUID &uuid);
static void sound_trigger_hook(LLMessageSystem* msg,void **);
static void sendKeys();

View File

@@ -115,6 +115,7 @@ LLNetMap::LLNetMap(const std::string& name) :
(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
(new LLEnableProfile())->registerListener(this, "MiniMap.EnableProfile");
(new LLCamFollow())->registerListener(this, "MiniMap.CamFollow"); //moymod - add cam follow crap thingie
(new mmsetred())->registerListener(this, "MiniMap.setred");
(new mmsetgreen())->registerListener(this, "MiniMap.setgreen");
(new mmsetblue())->registerListener(this, "MiniMap.setblue");
@@ -1120,6 +1121,15 @@ bool LLNetMap::LLEnableTracking::handleEvent(LLPointer<LLEvent> event, const LLS
return true;
}
bool LLNetMap::LLCamFollow::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLNetMap *self = mPtr;
LLFloaterAvatarList::lookAtAvatar(self->mClosestAgentAtLastRightClick);
return true;
}
bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLNetMap *self = mPtr;