Merge remote-tracking branch 'Liru/master'

This commit is contained in:
Damian Zhaoying
2013-09-30 21:42:46 -03:00
32 changed files with 2389 additions and 1995 deletions

View File

@@ -1262,7 +1262,8 @@ std::string CurlEasyRequest::getLowercaseHostname(void) const
//-----------------------------------------------------------------------------
// BufferedCurlEasyRequest
static int const HTTP_REDIRECTS_DEFAULT = 10;
static int const HTTP_REDIRECTS_DEFAULT = 16; // Singu note: I've seen up to 10 redirects, so setting the limit to 10 is cutting it.
// This limit is only here to avoid a redirect loop (infinite redirections).
LLChannelDescriptors const BufferedCurlEasyRequest::sChannels;
LLMutex BufferedCurlEasyRequest::sResponderCallbackMutex;
@@ -1411,8 +1412,8 @@ void BufferedCurlEasyRequest::prepRequest(AICurlEasyRequest_wat& curl_easy_reque
curl_easy_request_w->setHeaderCallback(&curlHeaderCallback, lockobj);
bool allow_cookies = headers.hasHeader("Cookie");
// Allow up to ten redirects.
if (responder->followRedir())
// Allow up to sixteen redirects.
if (!responder->pass_redirect_status())
{
curl_easy_request_w->setopt(CURLOPT_FOLLOWLOCATION, 1);
curl_easy_request_w->setopt(CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT);

View File

@@ -2062,7 +2062,7 @@ void BufferedCurlEasyRequest::setStatusAndReason(U32 status, std::string const&
// Sanity check. If the server replies with a redirect status then we better have that option turned on!
if ((status >= 300 && status < 400) && mResponder && !mResponder->redirect_status_ok())
{
llerrs << "Received " << status << " (" << reason << ") for responder \"" << mResponder->getName() << "\" which has no followRedir()!" << llendl;
llerrs << "Received " << status << " (" << reason << ") for responder \"" << mResponder->getName() << "\" which does not allow redirection!" << llendl;
}
}

View File

@@ -221,12 +221,12 @@ public:
// The default is to keep connections open for possible reuse.
virtual bool forbidReuse(void) const { return false; }
// A derived class should return true if curl should follow redirections.
// The default is not to follow redirections.
virtual bool followRedir(void) const { return false; }
// A derived class should return true if curl should not follow redirections, but instead pass redirection status codes to the responder.
// The default is to follow redirections and not pass them to the responder.
virtual bool pass_redirect_status(void) const { return false; }
// If this function returns false then we generate an error when a redirect status (300..399) is received.
virtual bool redirect_status_ok(void) const { return followRedir(); }
virtual bool redirect_status_ok(void) const { return true; }
// Returns the capability type used by this responder.
virtual AICapabilityType capability_type(void) const { return cap_other; }
@@ -259,7 +259,6 @@ public:
class ResponderHeadersOnly : public ResponderBase {
private:
/*virtual*/ bool needsHeaders(void) const { return true; }
/*virtual*/ bool followRedir(void) const { return true; }
protected:
// ResponderBase event

View File

@@ -860,6 +860,32 @@ void LLLineEditor::removeChar()
}
}
// Remove a word (set of characters up to next space/punctuation) from the text
void LLLineEditor::removeWord(bool prev)
{
const U32 pos(getCursor());
if (prev ? pos > 0 : static_cast<S32>(pos) < getLength())
{
U32 new_pos(prev ? prevWordPos(pos) : nextWordPos(pos));
if (new_pos == pos) // Other character we don't jump over
new_pos = prev ? prevWordPos(new_pos-1) : nextWordPos(new_pos+1);
const U32 diff(labs(pos - new_pos));
if (prev)
{
mText.erase(new_pos, diff);
setCursor(new_pos);
}
else
{
mText.erase(pos, diff);
}
}
else
{
reportBadKeystroke();
}
}
void LLLineEditor::addChar(const llwchar uni_char)
{
@@ -1318,7 +1344,10 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
else
if( 0 < getCursor() )
{
removeChar();
if (mask == MASK_CONTROL)
removeWord(true);
else
removeChar();
}
else
{
@@ -1328,6 +1357,14 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
handled = TRUE;
break;
case KEY_DELETE:
if (!mReadOnly && mask == MASK_CONTROL)
{
removeWord(false);
handled = true;
}
break;
case KEY_PAGE_UP:
case KEY_HOME:
if (!mIgnoreArrowKeys)

View File

@@ -266,6 +266,7 @@ private:
void pasteHelper(bool is_primary);
void removeChar();
void removeWord(bool prev);
void addChar(const llwchar c);
void setCursorAtLocalPos(S32 local_mouse_x);
S32 calculateCursorFromMouse(S32 local_mouse_x);

View File

@@ -1814,6 +1814,33 @@ void LLTextEditor::removeChar()
}
}
// Remove a word (set of characters up to next space/punctuation) from the text
void LLTextEditor::removeWord(bool prev)
{
const U32 pos(mCursorPos);
if (prev ? pos > 0 : static_cast<S32>(pos) < getLength())
{
U32 new_pos(prev ? prevWordPos(pos) : nextWordPos(pos));
if (new_pos == pos) // Other character we don't jump over
new_pos = prev ? prevWordPos(new_pos-1) : nextWordPos(new_pos+1);
const U32 diff(labs(pos - new_pos));
if (prev)
{
remove(new_pos, diff, false);
setCursorPos(new_pos);
}
else
{
remove(pos, diff, false);
}
}
else
{
reportBadKeystroke();
}
}
// Add a single character to the text
S32 LLTextEditor::addChar(S32 pos, llwchar wc)
{
@@ -2447,7 +2474,10 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask, BOOL* return
else
if( 0 < mCursorPos )
{
removeCharOrTab();
if (mask == MASK_CONTROL)
removeWord(true);
else
removeCharOrTab();
}
else
{
@@ -2455,6 +2485,12 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask, BOOL* return
}
break;
case KEY_DELETE:
if (getEnabled() && mask == MASK_CONTROL)
{
removeWord(false);
}
break;
case KEY_RETURN:
if (mask == MASK_NONE)

View File

@@ -408,6 +408,7 @@ protected:
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);
void removeWord(bool prev);
S32 insert(const S32 pos, const LLWString &wstr, const BOOL group_with_next_op);
S32 remove(const S32 pos, const S32 length, const BOOL group_with_next_op);
S32 append(const LLWString &wstr, const BOOL group_with_next_op);

File diff suppressed because it is too large Load Diff

View File

@@ -1113,16 +1113,16 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MoyFastMiniMap</key>
<key>ShowMiniMapObjects</key>
<map>
<key>Comment</key>
<string>Don't show buildings on mini-map</string>
<string>Show buildings and megaprims on the mini-map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<integer>1</integer>
</map>
<key>BeauchampFloaterGroupTitlesRect</key>
<map>
@@ -10068,6 +10068,98 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>MiniMapChatRings</key>
<map>
<key>Comment</key>
<string>Display chat distance rings on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MiniMapWhisperRing</key>
<map>
<key>Comment</key>
<string>Display whisper distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MiniMapWhisperRingColor</key>
<map>
<key>Comment</key>
<string>Color for whisper distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.0</real>
<real>1.0</real>
<real>0.0</real>
<real>0.5</real>
</array>
</map>
<key>MiniMapChatRing</key>
<map>
<key>Comment</key>
<string>Display chat distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MiniMapChatRingColor</key>
<map>
<key>Comment</key>
<string>Color for chat distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>0.0</real>
<real>0.5</real>
</array>
</map>
<key>MiniMapShoutRing</key>
<map>
<key>Comment</key>
<string>Display shout distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MiniMapShoutRingColor</key>
<map>
<key>Comment</key>
<string>Color for shout distance ring on mini map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.0</real>
<real>0.0</real>
<real>0.5</real>
</array>
</map>
<key>MiniMapScale</key>
<map>
<key>Comment</key>

View File

@@ -66,7 +66,6 @@ LLPrefsAscentVan::LLPrefsAscentVan()
getChild<LLUICtrl>("show_self_tag_color_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("customize_own_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("show_friend_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("display_client_new_line_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("use_status_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("custom_tag_label_box")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitTextModified, this, _1, _2));

View File

@@ -103,7 +103,7 @@ class LLIamHereVoice : public LLHTTPClient::ResponderWithResult
};
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return iamHereVoice_timeout; }
/*virtual*/ bool redirect_status_ok(void) const { return true; }
/*virtual*/ bool pass_redirect_status(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLIamHereVoice"; }
};

View File

@@ -56,7 +56,8 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/)
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal());
// Singu Note: Not Global, get correct SLURL for Variable Regions
return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionAgent());
}
slurl = return_slurl;
}

View File

@@ -131,7 +131,7 @@ class LLIamHere : public LLHTTPClient::ResponderWithResult
};
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return iamHere_timeout; }
/*virtual*/ bool redirect_status_ok(void) const { return true; }
/*virtual*/ bool pass_redirect_status(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLIamHere"; }
};

View File

@@ -201,7 +201,6 @@ namespace LLMarketplaceImport
class LLImportGetResponder : public LLHTTPClient::ResponderWithCompleted
{
public:
/*virtual*/ bool followRedir(void) const { return true; }
/*virtual*/ bool needsHeaders(void) const { return true; }
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)

View File

@@ -2412,7 +2412,11 @@ void LLMeshRepository::notifyLoadedMeshes()
{
region_name = gAgent.getRegion()->getName();
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh2");
if (mGetMeshCapability.empty())
{
mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
}
}
}

View File

@@ -89,6 +89,9 @@ const F32 DOT_SCALE = 0.75f;
const F32 MIN_PICK_SCALE = 2.f;
const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
const F32 WIDTH_PIXELS = 2.f;
const S32 CIRCLE_STEPS = 100;
LLNetMap::LLNetMap(const std::string& name) :
LLPanel(name),
mScale(128.f),
@@ -112,6 +115,12 @@ LLNetMap::LLNetMap(const std::string& name) :
(new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter");
(new LLRotateMap())->registerListener(this, "MiniMap.Rotate");
(new LLCheckRotateMap())->registerListener(this, "MiniMap.CheckRotate");
(new LLShowObjects())->registerListener(this, "MiniMap.ShowObjects");
(new LLCheckShowObjects())->registerListener(this, "MiniMap.CheckShowObjects");
(new LLChatRings())->registerListener(this, "MiniMap.ChatRings");
(new LLWhisperRing())->registerListener(this, "MiniMap.WhisperRing");
(new LLChatRing())->registerListener(this, "MiniMap.ChatRing");
(new LLShoutRing())->registerListener(this, "MiniMap.ShoutRing");
(new LLStopTracking())->registerListener(this, "MiniMap.StopTracking");
(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
@@ -194,6 +203,10 @@ void LLNetMap::draw()
{
static LLFrameTimer map_timer;
static const LLCachedControl<LLColor4> map_whisper_ring_color("MiniMapWhisperRingColor", LLColor4(0.f,1.f,0.f,0.5f));
static const LLCachedControl<LLColor4> map_chat_ring_color("MiniMapChatRingColor", LLColor4(0.f,0.f,1.f,0.5f));
static const LLCachedControl<LLColor4> map_shout_ring_color("MiniMapShoutRingColor", LLColor4(1.f,0.f,0.f,0.5f));
if (mObjectImagep.isNull())
{
createObjectImage();
@@ -341,11 +354,13 @@ void LLNetMap::draw()
U8 *default_texture = mObjectRawImagep->getData();
memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() );
// Draw buildings
gObjectList.renderObjectsForMap(*this);
if (gSavedSettings.getBOOL("ShowMiniMapObjects"))
{
gObjectList.renderObjectsForMap(*this); // Draw buildings.
}
mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight());
map_timer.reset();
}
@@ -488,6 +503,17 @@ void LLNetMap::draw()
dot_width,
dot_width);
// Draw chat range ring(s)
static LLUICachedControl<bool> whisper_ring("MiniMapWhisperRing");
static LLUICachedControl<bool> chat_ring("MiniMapChatRing");
static LLUICachedControl<bool> shout_ring("MiniMapShoutRing");
if(whisper_ring)
drawRing(LLWorld::getInstance()->getWhisperDistance(), pos_map, map_whisper_ring_color);
if(chat_ring)
drawRing(LLWorld::getInstance()->getSayDistance(), pos_map, map_chat_ring_color);
if(shout_ring)
drawRing(LLWorld::getInstance()->getShoutDistance(), pos_map, map_shout_ring_color);
// Draw frustum
// <FS:CR> Aurora Sim
//F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters();
@@ -584,6 +610,22 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos, BOOL rotated)
return pos_local;
}
void LLNetMap::drawRing(const F32 radius, const LLVector3 pos_map, const LLColor4& color)
{
// <FS:CR> Aurora Sim
F32 meters_to_pixels = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
//F32 meters_to_pixels = mScale / REGION_WIDTH_METERS;
// </FS:CR> Aurora Sim
F32 radius_pixels = radius * meters_to_pixels;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.translatef((F32)pos_map.mV[VX], (F32)pos_map.mV[VY], 0.f);
gl_ring(radius_pixels, WIDTH_PIXELS, color, color, CIRCLE_STEPS, FALSE);
gGL.popMatrix();
}
void LLNetMap::drawTracking(const LLVector3d& pos_global, BOOL rotated,
const LLColor4& color, BOOL draw_arrow )
{
@@ -1137,6 +1179,82 @@ bool LLNetMap::LLCheckRotateMap::handleEvent(LLPointer<LLEvent> event, const LLS
return true;
}
bool LLNetMap::LLShowObjects::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL showobjects = gSavedSettings.getBOOL("ShowMiniMapObjects");
gSavedSettings.setBOOL("ShowMiniMapObjects", !showobjects);
return true;
}
bool LLNetMap::LLCheckShowObjects::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLNetMap *self = mPtr;
BOOL enabled = gSavedSettings.getBOOL("ShowMiniMapObjects");
self->findControl(userdata["control"].asString())->setValue(enabled);
return true;
}
bool LLNetMap::LLChatRings::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL all_enabled = gSavedSettings.getBOOL("MiniMapChatRings");
gSavedSettings.setBOOL("MiniMapChatRings", !all_enabled);
gSavedSettings.setBOOL("MiniMapWhisperRing", !all_enabled);
gSavedSettings.setBOOL("MiniMapChatRing", !all_enabled);
gSavedSettings.setBOOL("MiniMapShoutRing", !all_enabled);
return true;
}
bool LLNetMap::LLWhisperRing::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL all_enabled = gSavedSettings.getBOOL("MiniMapChatRings");
BOOL whisper_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing");
BOOL chat_enabled = gSavedSettings.getBOOL("MiniMapChatRing");
BOOL shout_enabled = gSavedSettings.getBOOL("MiniMapShoutRing");
gSavedSettings.setBOOL("MiniMapWhisperRing", !whisper_enabled);
if(all_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", !all_enabled);
else if(!whisper_enabled && chat_enabled && shout_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", TRUE);
return true;
}
bool LLNetMap::LLChatRing::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL all_enabled = gSavedSettings.getBOOL("MiniMapChatRings");
BOOL whisper_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing");
BOOL chat_enabled = gSavedSettings.getBOOL("MiniMapChatRing");
BOOL shout_enabled = gSavedSettings.getBOOL("MiniMapShoutRing");
gSavedSettings.setBOOL("MiniMapChatRing", !chat_enabled);
if(all_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", !all_enabled);
else if(whisper_enabled && !chat_enabled && shout_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", TRUE);
return true;
}
bool LLNetMap::LLShoutRing::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL all_enabled = gSavedSettings.getBOOL("MiniMapChatRings");
BOOL whisper_enabled = gSavedSettings.getBOOL("MiniMapWhisperRing");
BOOL chat_enabled = gSavedSettings.getBOOL("MiniMapChatRing");
BOOL shout_enabled = gSavedSettings.getBOOL("MiniMapShoutRing");
gSavedSettings.setBOOL("MiniMapShoutRing", !shout_enabled);
if(all_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", !all_enabled);
else if(whisper_enabled && chat_enabled && !shout_enabled)
gSavedSettings.setBOOL("MiniMapChatRings", TRUE);
return true;
}
bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLTracker::stopTracking(false);

View File

@@ -82,6 +82,8 @@ private:
LLVector3 globalPosToView(const LLVector3d& global_pos, BOOL rotated);
LLVector3d viewPosToGlobal(S32 x,S32 y, BOOL rotated);
void drawRing(const F32 radius, LLVector3 pos_map, const LLColor4& color);
void drawTracking( const LLVector3d& pos_global,
BOOL rotated,
const LLColor4& color,
@@ -157,6 +159,42 @@ private:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLCheckShowObjects : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLChatRings : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLShowObjects : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLWhisperRing : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLChatRing : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLShoutRing : public LLMemberListener<LLNetMap>
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
class LLStopTracking : public LLMemberListener<LLNetMap>
{
public:

View File

@@ -215,6 +215,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLComboBox *server_choice_combo = getChild<LLComboBox>("grids_combo");
server_choice_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectGrid, _1));
server_choice_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onSelectGrid, server_choice_combo));
// Load all of the grids, sorted, and then add a bar and the current grid at the top
updateGridCombo();
@@ -1031,7 +1032,33 @@ void LLPanelLogin::refreshLoginPage()
//void LLPanelLogin::onSelectServer()
void LLPanelLogin::onSelectGrid(LLUICtrl *ctrl)
{
gHippoGridManager->setCurrentGrid(ctrl->getValue());
std::string grid(ctrl->getValue().asString());
LLStringUtil::trim(grid); // Guard against copy paste
if (!gHippoGridManager->getGrid(grid)) // We can't get an input grid by name or nick, perhaps a Login URI was entered
{
HippoGridInfo* info(new HippoGridInfo("")); // Start off with empty grid name, otherwise we don't know what to name
info->setLoginUri(grid);
if (info->retrieveGridInfo()) // There's info from this URI
{
grid = info->getGridName();
if (HippoGridInfo* nick_info = gHippoGridManager->getGrid(info->getGridNick())) // Grid of same nick exists
{
delete info;
grid = nick_info->getGridName();
}
else // Guess not, try adding this grid
{
gHippoGridManager->addGrid(info); // deletes info if not needed (existing or no name)
}
}
else
{
delete info;
grid = gHippoGridManager->getCurrentGridName();
}
}
gHippoGridManager->setCurrentGrid(grid);
ctrl->setValue(grid);
}
void LLPanelLogin::onLocationSLURL()

View File

@@ -165,7 +165,6 @@ public:
/*virtual*/ void result(const LLSD &pContent);
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
/*virtual*/ bool followRedir(void) const { return true; }
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return agentStateResponder_timeout; }
/*virtual*/ char const* getName(void) const { return "AgentStateResponder"; }

View File

@@ -35,6 +35,7 @@
#include "llfiltersd2xmlrpc.h"
#include "curl/curl.h"
#include "hippogridmanager.h"
#include "llworldmap.h" // Variable size regions
const char* LLSLURL::SLURL_HTTP_SCHEME = "http";
const char* LLSLURL::SLURL_HTTPS_SCHEME = "https";
@@ -377,10 +378,14 @@ LLSLURL::LLSLURL(const std::string& grid,
const LLVector3d& global_position)
{
HippoGridInfo* gridp = gHippoGridManager->getGrid(grid);
LLVector3 pos(global_position);
if (LLSimInfo* sim = LLWorldMap::getInstance()->simInfoFromPosGlobal(global_position)) // Variable size regions, we need to fmod against their proper dimensions, not 256
{
pos[VX] = fmod(pos[VX], sim->getSizeX());
pos[VY] = fmod(pos[VY], sim->getSizeY());
}
*this = LLSLURL(gridp ? gridp->getGridNick() : gHippoGridManager->getDefaultGridNick(),
region, LLVector3(global_position.mdV[VX],
global_position.mdV[VY],
global_position.mdV[VZ]));
region, pos);
}
// create a slurl from a global position

View File

@@ -304,6 +304,12 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
if (!ppatches[i][j]->getNeighborPatch(SOUTH))
{
poffsets[i][j][1] = 0;
}
else
{
// <FS:CR> Aurora Sim
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(SOUTH);
poffsets[i][j][1] += patch_width;
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
// </FS>CR> Aurora Sim
}

View File

@@ -328,13 +328,12 @@ class HTTPGetResponder : public LLHTTPClient::ResponderWithCompleted
{
LOG_CLASS(HTTPGetResponder);
public:
HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset, bool redir)
HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset)
: mFetcher(fetcher)
, mID(id)
, mMetricsStartTime(startTime)
, mRequestedSize(requestedSize)
, mRequestedOffset(offset)
, mFollowRedir(redir)
, mReplyOffset(0)
, mReplyLength(0)
, mReplyFullLength(0)
@@ -449,7 +448,6 @@ public:
}
}
/*virtual*/ bool followRedir() const { return mFollowRedir; }
/*virtual*/ AICapabilityType capability_type(void) const { return cap_texture; }
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return HTTPGetResponder_timeout; }
/*virtual*/ char const* getName(void) const { return "HTTPGetResponder"; }
@@ -464,8 +462,6 @@ private:
U32 mReplyOffset;
U32 mReplyLength;
U32 mReplyFullLength;
bool mFollowRedir;
};
//////////////////////////////////////////////////////////////////////////////
@@ -1423,7 +1419,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
headers.addHeader("Range", llformat("bytes=%d-%d", mRequestedOffset, mRequestedOffset + mRequestedSize - 1));
}
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset),
headers, approved/*,*/ DEBUG_CURLIO_PARAM(debug_off), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
}
else

View File

@@ -304,7 +304,6 @@ public:
LLViewerMediaWebProfileResponder(std::string host) : mHost(host) { }
~LLViewerMediaWebProfileResponder() { }
/*virtual*/ bool followRedir(void) const { return true; }
/*virtual*/ bool needsHeaders(void) const { return true; }
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)

View File

@@ -1675,6 +1675,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("GamingData"); //Used by certain grids.
capabilityNames.append("GetDisplayNames");
capabilityNames.append("GetMesh");
capabilityNames.append("GetMesh2"); // Used on SecondLife(tm) sim versions 280647 and higher (13.09.17).
capabilityNames.append("GetObjectCost");
capabilityNames.append("GetObjectPhysicsData");
capabilityNames.append("GetTexture");
@@ -2072,7 +2073,7 @@ bool LLViewerRegion::meshRezEnabled() const
{
if (getCapability("SimulatorFeatures").empty())
{
return !getCapability("GetMesh").empty();
return !getCapability("GetMesh").empty() || !getCapability("GetMesh2").empty();
}
else
{

View File

@@ -120,7 +120,6 @@ public:
protected:
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return webProfileResponders_timeout; }
/*virtual*/ bool followRedir(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLWebProfileResponders::ConfigResponder"; }
private:
@@ -157,7 +156,6 @@ public:
}
protected:
/*virtual*/ bool followRedir(void) const { return true; }
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return webProfileResponders_timeout; }
/*virtual*/ char const* getName(void) const { return "LLWebProfileResponders::PostImageRedirectResponder"; }
@@ -181,7 +179,7 @@ public:
// the just uploaded data, which fails
// (CURLE_SEND_FAIL_REWIND: Send failed since rewinding of the data stream failed).
// Handle it manually.
if (status == 303)
if (status == HTTP_SEE_OTHER)
{
AIHTTPHeaders headers;
headers.addHeader("Accept", "*/*");
@@ -208,7 +206,7 @@ public:
}
protected:
/*virtual*/ bool redirect_status_ok(void) const { return true; }
/*virtual*/ bool pass_redirect_status(void) const { return true; }
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return webProfileResponders_timeout; }
/*virtual*/ char const* getName(void) const { return "LLWebProfileResponders::PostImageResponder"; }
};

View File

@@ -94,6 +94,12 @@ const F32 LLWorld::mScale = 1.f;
F32 LLWorld::mWidthInMeters = mWidth * mScale;
// </FS:CR> Aurora Sim
//TODO: This will use chat ranges
// according to opensim settings
const F32 LLWorld::mWhisperDistance = 10;
const F32 LLWorld::mSayDistance = 20;
const F32 LLWorld::mShoutDistance = 100;
//
// Functions
//

View File

@@ -125,6 +125,10 @@ public:
F32 getRegionMinHeight() const { return -mWidthInMeters; }
F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; }
F32 getWhisperDistance() const { return mWhisperDistance; }
F32 getSayDistance() const { return mSayDistance; }
F32 getShoutDistance() const { return mShoutDistance; }
void updateRegions(F32 max_update_time);
void updateVisibilities();
void updateParticles();
@@ -198,6 +202,10 @@ private:
static F32 mWidthInMeters;
// </FS:CR> Aurora Sim
static const F32 mWhisperDistance;
static const F32 mSayDistance;
static const F32 mShoutDistance;
F32 mLandFarClip; // Far clip distance for land.
LLPatchVertexArray mLandPatch;
S32 mLastPacketsIn;

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,31 @@
<on_click function="MiniMap.Rotate" userdata="" />
<on_check function="MiniMap.CheckRotate" userdata="" />
</menu_item_check>
<menu_item_check bottom_delta="-18" enabled="false" height="18" label="Show Objects"
left="0" mouse_opaque="true" name="Show Objects" width="128">
<on_click function="MiniMap.ShowObjects" userdata="" />
<on_check function="MiniMap.CheckShowObjects" userdata="" />
</menu_item_check>
<menu bottom_delta="0" color="MenuDefaultBgColor" drop_shadow="true" height="175" left="0"
mouse_opaque="false" name="Chat Distance Rings" opaque="true" tear_off="false" width="125">
<menu_item_check label="Show All" name="Show All">
<on_check control="MiniMapChatRings" />
<on_click function="MiniMap.ChatRings" userdata="MiniMapChatRings" />
</menu_item_check>
<menu_item_separator />
<menu_item_check label="Show Whisper Ring" name="Show Whisper Ring">
<on_check control="MiniMapWhisperRing" />
<on_click function="MiniMap.WhisperRing" userdata="MiniMapWhisperRing" />
</menu_item_check>
<menu_item_check label="Show Chat Ring" name="Show Chat Ring">
<on_check control="MiniMapChatRing" />
<on_click function="MiniMap.ChatRing" userdata="MiniMapChatRing" />
</menu_item_check>
<menu_item_check label="Show Shout Ring" name="Show Shout Ring">
<on_check control="MiniMapShoutRing" />
<on_click function="MiniMap.ShoutRing" userdata="MiniMapShoutRing" />
</menu_item_check>
</menu>
<menu_item_separator />
<menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Stop Tracking"
left="0" mouse_opaque="true" name="Stop Tracking" width="128">
@@ -41,9 +66,7 @@
<on_enable function="MiniMap.EnableProfile" />
</menu_item_call>
<menu bottom_delta="0" color="MenuDefaultBgColor" drop_shadow="true" height="175" left="0"
mouse_opaque="false" name="Mark" opaque="true" tear_off="false"
width="125">
<on_enable function="MiniMap.EnableProfile" />
mouse_opaque="false" name="Mark" opaque="true" tear_off="false" width="125">
<menu_item_call bottom_delta="-18" enabled = "true" height="18" label="Red"
left="0" mouse_opaque="true" name="Red" width="128">
<on_click function="MiniMap.setred" />

View File

@@ -53,7 +53,7 @@
left="0" mouse_opaque="true" name="grids_combo_text" v_pad="0" width="120">
Grid:
</text>
<combo_box allow_text_entry="false" bottom_delta="-24" follows="left|bottom" height="20"
<combo_box allow_text_entry="true" max_chars="128" bottom_delta="-24" follows="left|bottom" height="20"
left="0" mouse_opaque="true" name="grids_combo" width="120" />
<button name="grids_btn" label="Grid Manager"
bottom_delta="-20" left_delta="10" height="16" width="100"

View File

@@ -17,7 +17,7 @@
<text name="grids_combo_text">
Grelha:
</text>
<!--<button name="grids_btn" label="Administrar Grid"/>-->
<button name="grids_btn" label="Administrar Grid"/>
</layout_panel>
<layout_panel name="location_panel">
<text name="start_location_text">

File diff suppressed because it is too large Load Diff