Automated merge with http://bitbucket.org/lindenlab/viewer-development
commit
d92608f1dc
|
|
@ -245,9 +245,6 @@ const U8 SIM_ACCESS_ADULT = 42; // Seriously Adult Only
|
|||
const U8 SIM_ACCESS_DOWN = 254;
|
||||
const U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT;
|
||||
|
||||
// group constants
|
||||
const S32 MAX_AGENT_GROUPS = 25;
|
||||
|
||||
// attachment constants
|
||||
const S32 MAX_AGENT_ATTACHMENTS = 38;
|
||||
const U8 ATTACHMENT_ADD = 0x80;
|
||||
|
|
@ -300,6 +297,14 @@ const U32 START_LOCATION_ID_COUNT = 6;
|
|||
// group constants
|
||||
const U32 GROUP_MIN_SIZE = 2;
|
||||
|
||||
// gMaxAgentGroups is now sent by login.cgi, which
|
||||
// looks it up from globals.xml.
|
||||
//
|
||||
// For now we need an old default value however,
|
||||
// so the viewer can be deployed ahead of login.cgi.
|
||||
//
|
||||
const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
|
||||
|
||||
// radius within which a chat message is fully audible
|
||||
const F32 CHAT_WHISPER_RADIUS = 10.f;
|
||||
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
#include "llsidetray.h"
|
||||
#include "llsky.h"
|
||||
#include "llsmoothstep.h"
|
||||
#include "llstartup.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "llteleportflags.h"
|
||||
#include "lltool.h"
|
||||
|
|
@ -2452,7 +2453,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
|
|||
|
||||
BOOL LLAgent::canJoinGroups() const
|
||||
{
|
||||
return mGroups.count() < MAX_AGENT_GROUPS;
|
||||
return mGroups.count() < gMaxAgentGroups;
|
||||
}
|
||||
|
||||
LLQuaternion LLAgent::getHeadRotation()
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#include "llbutton.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llstartup.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lltrans.h"
|
||||
|
|
@ -171,7 +172,7 @@ void LLPanelGroups::reset()
|
|||
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||
}
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
|
||||
enableButtons();
|
||||
|
|
@ -182,7 +183,7 @@ BOOL LLPanelGroups::postBuild()
|
|||
childSetCommitCallback("group list", onGroupList, this);
|
||||
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
|
||||
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
|
||||
if (list)
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
requested_options.append("newuser-config");
|
||||
requested_options.append("ui-config");
|
||||
#endif
|
||||
requested_options.append("max-agent-groups");
|
||||
requested_options.append("map-server-url");
|
||||
requested_options.append("voice-config");
|
||||
requested_options.append("tutorial_setting");
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@
|
|||
// exported globals
|
||||
//
|
||||
bool gAgentMovementCompleted = false;
|
||||
S32 gMaxAgentGroups;
|
||||
|
||||
std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
|
||||
std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
|
||||
|
|
@ -3151,6 +3152,18 @@ bool process_login_success_response()
|
|||
LLViewerMedia::openIDSetup(openid_url, openid_token);
|
||||
}
|
||||
|
||||
if(response.has("max-agent-groups")) {
|
||||
std::string max_agent_groups(response["max-agent-groups"]);
|
||||
gMaxAgentGroups = atoi(max_agent_groups.c_str());
|
||||
LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: "
|
||||
<< gMaxAgentGroups << LL_ENDL;
|
||||
}
|
||||
else {
|
||||
gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
|
||||
LL_INFOS("LLStartup") << "using gMaxAgentGroups default: "
|
||||
<< gMaxAgentGroups << LL_ENDL;
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
// JC: gesture loading done below, when we have an asset system
|
||||
// in place. Don't delete/clear gUserCredentials until then.
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ typedef enum {
|
|||
|
||||
// exported symbols
|
||||
extern bool gAgentMovementCompleted;
|
||||
extern S32 gMaxAgentGroups;
|
||||
extern LLPointer<LLViewerTexture> gStartTexture;
|
||||
|
||||
class LLStartUp
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
|
|||
if(option == 0 && !group_id.isNull())
|
||||
{
|
||||
// check for promotion or demotion.
|
||||
S32 max_groups = MAX_AGENT_GROUPS;
|
||||
S32 max_groups = gMaxAgentGroups;
|
||||
if(gAgent.isInGroup(group_id)) ++max_groups;
|
||||
|
||||
if(gAgent.mGroups.count() < max_groups)
|
||||
|
|
|
|||
Loading…
Reference in New Issue