Fixed line endings in chatbar_as_cmdline.cpp and removed an unnecessary return statement

Ansariel 2012-08-12 13:05:58 +02:00
parent c468cf2acf
commit 165a5fc4ab
1 changed files with 52 additions and 53 deletions

View File

@ -84,11 +84,11 @@
#include "lggcontactsetsfloater.h"
#include "lltrans.h" //<FS:HG> FIRE-6340, FIRE-6567 - Setting Bandwidth issues
// For radar support
#include "llavatarlist.h"
#include "llavatarlistitem.h"
#include "llfloatersidepanelcontainer.h"
#include "llpanelpeople.h"
// For radar support
#include "llavatarlist.h"
#include "llavatarlistitem.h"
#include "llfloatersidepanelcontainer.h"
#include "llpanelpeople.h"
void cmdline_printchat(std::string message);
void cmdline_rezplat(bool use_saved_value = true, F32 visual_radius = 30.0);
@ -1263,54 +1263,53 @@ bool cmd_line_chat(std::string revised_text, EChatType type, bool from_gesture)
return true;
}
//case insensitive search for avatar in draw distance
LLUUID cmdline_partial_name2key(std::string partial_name)
{
std::string av_name;
LLStringUtil::toLower(partial_name);
LLPanel* panel_people = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
if (panel_people)
{
std::vector<LLPanel*> items;
LLAvatarList* nearbyList = ((LLPanelPeople*)panel_people)->getNearbyList();
nearbyList->getItems(items);
for (std::vector<LLPanel*>::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem)
{
LLAvatarListItem* av = static_cast<LLAvatarListItem*>(*itItem);
av_name = av->getUserName();
LLStringUtil::toLower(av_name);
if (strstr(av_name.c_str(), partial_name.c_str()))
{
return av->getAvatarId();
}
}
}
return LLUUID::null;
}
void cmdline_tp2name(std::string target)
{
LLUUID avkey = cmdline_partial_name2key(target);
LLPanel* panel_people = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
if (avkey.notNull() && panel_people)
{
LLAvatarListItem* avatar_list_item = ((LLPanelPeople*)panel_people)->getNearbyList()->getAvatarListItem(avkey);
if (avatar_list_item)
{
LLVector3d pos = avatar_list_item->getPosition();
pos.mdV[VZ] += 2.0;
gAgent.teleportViaLocation(pos);
return;
}
}
cmdline_printchat("Avatar not found.");
return;
}
//case insensitive search for avatar in draw distance
LLUUID cmdline_partial_name2key(std::string partial_name)
{
std::string av_name;
LLStringUtil::toLower(partial_name);
LLPanel* panel_people = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
if (panel_people)
{
std::vector<LLPanel*> items;
LLAvatarList* nearbyList = ((LLPanelPeople*)panel_people)->getNearbyList();
nearbyList->getItems(items);
for (std::vector<LLPanel*>::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem)
{
LLAvatarListItem* av = static_cast<LLAvatarListItem*>(*itItem);
av_name = av->getUserName();
LLStringUtil::toLower(av_name);
if (strstr(av_name.c_str(), partial_name.c_str()))
{
return av->getAvatarId();
}
}
}
return LLUUID::null;
}
void cmdline_tp2name(std::string target)
{
LLUUID avkey = cmdline_partial_name2key(target);
LLPanel* panel_people = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
if (avkey.notNull() && panel_people)
{
LLAvatarListItem* avatar_list_item = ((LLPanelPeople*)panel_people)->getNearbyList()->getAvatarListItem(avkey);
if (avatar_list_item)
{
LLVector3d pos = avatar_list_item->getPosition();
pos.mdV[VZ] += 2.0;
gAgent.teleportViaLocation(pos);
return;
}
}
cmdline_printchat("Avatar not found.");
}
void cmdline_rezplat(bool use_saved_value, F32 visual_radius) //cmdline_rezplat() will still work... just will use the saved value
{