Change Radar chat to use dialog and negative channel and have a 6 second required spacing
parent
bc4f6fc695
commit
02eed5b019
|
|
@ -138,13 +138,13 @@
|
|||
<key>RadarAlertChannel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Positive Numbered Channel for whispering radar alerts</string>
|
||||
<string>Channel for whispering radar alerts</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>777777777</integer>
|
||||
<integer>-777777777</integer>
|
||||
</map>
|
||||
|
||||
<key>RadarLegacyChannelAlertRefreshUUID</key>
|
||||
|
|
|
|||
|
|
@ -1145,8 +1145,7 @@ void LLPanelPeople::updateNearbyList()
|
|||
if (mRadarEnterAlerts.size() > 0)
|
||||
{
|
||||
mRadarFrameCount++;
|
||||
S32 chan = (S32)gSavedSettings.getU32("RadarAlertChannel");
|
||||
if (chan < 0) { chan = chan * -1; } // make sure chan is always positive
|
||||
S32 chan = gSavedSettings.getS32("RadarAlertChannel");
|
||||
std::string msg = llformat("/%d %d,%d",chan,mRadarFrameCount,(int)mRadarEnterAlerts.size());
|
||||
while(mRadarEnterAlerts.size() > 0)
|
||||
{
|
||||
|
|
@ -1156,7 +1155,17 @@ void LLPanelPeople::updateNearbyList()
|
|||
msg = llformat("%s,%s",msg.c_str(),mRadarEnterAlerts.back().asString().c_str());
|
||||
mRadarEnterAlerts.pop_back();
|
||||
}
|
||||
LLNearbyChatBar::sendChatFromViewer(msg,CHAT_TYPE_WHISPER,FALSE);
|
||||
LLMessageSystem* msgs = gMessageSystem;
|
||||
msgs->newMessage("ScriptDialogReply");
|
||||
msgs->nextBlock("AgentData");
|
||||
msgs->addUUID("AgentID", gAgent.getID());
|
||||
msgs->addUUID("SessionID", gAgent.getSessionID());
|
||||
msgs->nextBlock("Data");
|
||||
msgs->addUUID("ObjectID", gAgent.getID());
|
||||
msgs->addS32("ChatChannel", chan);
|
||||
msgs->addS32("ButtonIndex", 1);
|
||||
msgs->addString("ButtonLabel", msg.c_str());
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
}
|
||||
if (mRadarLeaveAlerts.size() > 0)
|
||||
|
|
@ -1697,6 +1706,15 @@ void LLPanelPeople::onChatButtonClicked()
|
|||
if (group_id.notNull())
|
||||
LLGroupActions::startIM(group_id);
|
||||
}
|
||||
void LLPanelPeople::requestRadarChannelAlertSync()
|
||||
{
|
||||
F32 timeNow = gFrameTimeSeconds;
|
||||
if( (timeNow - RADAR_CHAT_MIN_SPACING)>mRadarLastRequestTime)
|
||||
{
|
||||
mRadarLastRequestTime=timeNow;
|
||||
mRadarAlertRequest = true;
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelPeople::teleportToAvatar(LLUUID targetAv)
|
||||
// Teleports user to last scanned location of nearby avatar
|
||||
|
|
|
|||
|
|
@ -45,9 +45,11 @@ class LLTabContainer;
|
|||
class LLMenuButton;
|
||||
class LLMenuGL;
|
||||
|
||||
const U32 MAX_AVATARS_PER_ALERT = 27; // maximum number of UUIDs we can cram into a single channel radar alert message
|
||||
const U32 MAX_AVATARS_PER_ALERT = 7; // maximum number of UUIDs we can cram into a single channel radar alert message
|
||||
const U32 COARSE_OFFSET_INTERVAL = 31; // seconds after which we query the bridge for a coarse location adjustment
|
||||
const U32 NAMEFORMAT_DISPLAYNAME = 0;
|
||||
const U32 RADAR_CHAT_MIN_SPACING = 6; //minimum delay between radar chat messages
|
||||
|
||||
const U32 NAMEFORMAT_USERNAME = 1;
|
||||
const U32 NAMEFORMAT_DISPLAYNAME_USERNAME = 2;
|
||||
const U32 NAMEFORMAT_USERNAME_DISPLAYNAME = 3;
|
||||
|
|
@ -65,7 +67,7 @@ public:
|
|||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ bool notifyChildren(const LLSD& info);
|
||||
void teleportToAvatar(LLUUID targetAv);
|
||||
void requestRadarChannelAlertSync() {mRadarAlertRequest = true;}
|
||||
void requestRadarChannelAlertSync();
|
||||
// Implements LLVoiceClientStatusObserver::onChange() to enable call buttons
|
||||
// when voice is available
|
||||
/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
|
||||
|
|
@ -218,6 +220,7 @@ private:
|
|||
|
||||
S32 mRadarFrameCount;
|
||||
bool mRadarAlertRequest;
|
||||
F32 mRadarLastRequestTime;
|
||||
};
|
||||
|
||||
#endif //LL_LLPANELPEOPLE_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue