Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: siana/SingularityViewer
...
head fork: siana/SingularityViewer
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 13 files changed
  • 0 commit comments
  • 1 contributor
View
10 indra/llaudio/llaudioengine.h
@@ -239,12 +239,15 @@ class LLAudioEngine
// A list of all audio sources that are known to the viewer at this time.
// This is most likely a superset of the ones that we actually have audio
// data for, or are playing back.
+public://Jay: IDGAF
typedef std::map<LLUUID, LLAudioSource *> source_map;
+protected:
typedef std::map<LLUUID, LLAudioData *> data_map;
-
+
+public://Jay: IDGAF
source_map mAllSources;
+protected:
data_map mAllData;
-
LLAudioChannel *mChannels[MAX_CHANNELS];
// Buffers needs to change into a different data structure, as the number of buffers
@@ -351,6 +354,9 @@ class LLAudioSource
protected:
LLUUID mID; // The ID of the source is that of the object if it's attached to an object.
LLUUID mOwnerID; // owner of the object playing the sound
+public:
+ const LLUUID &getOwnerID() { return mOwnerID; }
+protected:
F32 mPriority;
F32 mGain;
bool mSourceMuted;
View
2  indra/llwindow/llwindowsdl.cpp
@@ -1723,7 +1723,7 @@ void LLWindowSDL::processMiscNativeEvents()
void LLWindowSDL::gatherInput()
{
- const Uint32 CLICK_THRESHOLD = 300; // milliseconds
+ const Uint32 CLICK_THRESHOLD = 500; // milliseconds
static int leftClick = 0;
static int rightClick = 0;
static Uint32 lastLeftDown = 0;
View
100 indra/newview/llfloateravatarlist.cpp
@@ -57,6 +57,10 @@
#include "llsdutil.h"
+#include "llaudioengine.h"
+
+#include "llstartup.h"
+
//<edit>
#include "llviewermenu.h"
//</edit>
@@ -125,7 +129,8 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool
LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) :
mID(id), mName(name), mPosition(position), mDrawPosition(), mMarked(FALSE), mFocused(FALSE),
mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX),
- mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX)
+ mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX),
+ mActivityType(ACTIVITY_NEW), mActivityTimer()
{
}
@@ -214,6 +219,26 @@ BOOL LLAvatarListEntry::isDead()
{
return getEntryAgeSeconds() > DEAD_KEEP_TIME;
}
+const F32 ACTIVITY_TIMEOUT = 1.0f;
+void LLAvatarListEntry::setActivity(ACTIVITY_TYPE activity)
+{
+ if ( activity >= mActivityType || mActivityTimer.getElapsedTimeF32() > ACTIVITY_TIMEOUT )
+ {
+ mActivityType = activity;
+ mActivityTimer.start();
+ }
+}
+
+LLAvatarListEntry::ACTIVITY_TYPE LLAvatarListEntry::getActivity()
+{
+ if ( mActivityTimer.getElapsedTimeF32() > ACTIVITY_TIMEOUT )
+ {
+ mActivityType = ACTIVITY_NONE;
+ }
+ if(isDead())return ACTIVITY_DEAD;
+
+ return mActivityType;
+}
LLFloaterAvatarList* LLFloaterAvatarList::sInstance = NULL;
@@ -359,10 +384,29 @@ BOOL LLFloaterAvatarList::postBuild()
return TRUE;
}
+void updateParticleActivity(LLDrawable *drawablep)
+{
+ if (LLFloaterAvatarList::getInstance())
+ {
+ LLViewerObject *vobj = drawablep->getVObj();
+ if (vobj && vobj->isParticleSource())
+ {
+ LLUUID id = vobj->mPartSourcep->getOwnerUUID();
+ LLAvatarListEntry *ent = LLFloaterAvatarList::getInstance()->getAvatarEntry(id);
+ if ( NULL != ent )
+ {
+ ent->setActivity(LLAvatarListEntry::ACTIVITY_PARTICLES);
+ }
+ }
+ }
+}
+
void LLFloaterAvatarList::updateAvatarList()
{
if (sInstance != this) return;
+ //if(LLStartUp::getStartupState() < STATE_STARTED)return;
+
//llinfos << "radar refresh: updating map" << llendl;
// Check whether updates are enabled
@@ -377,6 +421,25 @@ void LLFloaterAvatarList::updateAvatarList()
{
mUpdate = TRUE;
}
+ //moved to pipeline to prevent a crash
+ //gPipeline.forAllVisibleDrawables(updateParticleActivity);
+
+
+ //todo: make this less of a hacked up copypasta from dales 1.18.
+ if(gAudiop != NULL)
+ {
+ LLAudioEngine::source_map::iterator iter;
+ for (iter = gAudiop->mAllSources.begin(); iter != gAudiop->mAllSources.end(); ++iter)
+ {
+ LLAudioSource *sourcep = iter->second;
+ LLUUID uuid = sourcep->getOwnerID();
+ LLAvatarListEntry *ent = getAvatarEntry(uuid);
+ if ( ent )
+ {
+ ent->setActivity(LLAvatarListEntry::ACTIVITY_SOUND);
+ }
+ }
+ }
LLVector3d mypos = gAgent.getPositionGlobal();
@@ -469,6 +532,7 @@ void LLFloaterAvatarList::updateAvatarList()
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
mAvatars[avid].setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0);
+ if(avatarp->isTyping())mAvatars[avid].setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
}
else
{
@@ -813,6 +877,40 @@ void LLFloaterAvatarList::refreshAvatarList()
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
}
element["columns"][LIST_ALTITUDE]["value"] = temp;
+
+ element["columns"][LIST_ACTIVITY]["column"] = "activity";
+ element["columns"][LIST_ACTIVITY]["type"] = "icon";
+
+ std::string activity_icon = "";
+ switch(entry->getActivity())
+ {
+ case LLAvatarListEntry::ACTIVITY_MOVING:
+ activity_icon = "inv_item_animation.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_GESTURING:
+ activity_icon = "inv_item_gesture.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_SOUND:
+ activity_icon = "inv_item_sound.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_REZZING:
+ activity_icon = "ff_edit_theirs.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_PARTICLES:
+ activity_icon = "particles_scan.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_NEW:
+ activity_icon = "avatar_new.tga";
+ break;
+ case LLAvatarListEntry::ACTIVITY_TYPING:
+ activity_icon = "avatar_typing.tga";
+ break;
+ default:
+ break;
+ }
+
+ element["columns"][LIST_ACTIVITY]["value"] = activity_icon;//icon_image_id; //"icn_active-speakers-dot-lvl0.tga";
+ //element["columns"][LIST_AVATAR_ACTIVITY]["color"] = icon_color.getValue();
element["columns"][LIST_CLIENT]["column"] = "client";
element["columns"][LIST_CLIENT]["type"] = "text";
View
26 indra/newview/llfloateravatarlist.h
@@ -33,6 +33,18 @@ class LLAvatarListEntry {
public:
+enum ACTIVITY_TYPE
+{
+ ACTIVITY_NONE, /** Avatar not doing anything */
+ ACTIVITY_MOVING, /** Changing position */
+ ACTIVITY_GESTURING, /** Playing a gesture */
+ ACTIVITY_REZZING, /** Rezzing objects */
+ ACTIVITY_PARTICLES, /** Creating particles */
+ ACTIVITY_TYPING, /** Typing */
+ ACTIVITY_NEW, /** Avatar just appeared */
+ ACTIVITY_SOUND, /** Playing a sound */
+ ACTIVITY_DEAD /** Avatar isn't around anymore, and will be removed soon from the list */
+};
/**
* @brief Initializes a list entry
* @param id Avatar's key
@@ -72,6 +84,13 @@ class LLAvatarListEntry {
*/
LLUUID getID() { return mID; }
+ void setActivity(ACTIVITY_TYPE activity);
+
+ /**
+ * @brief Returns the activity type
+ */
+ ACTIVITY_TYPE getActivity();
+
/**
* @brief Sets the 'focus' status on this entry (camera focused on this avatar)
*/
@@ -106,8 +125,13 @@ class LLAvatarListEntry {
/**
* @brief Timer to keep track of whether avatars are still there
*/
+
LLTimer mUpdateTimer;
+ ACTIVITY_TYPE mActivityType;
+
+ LLTimer mActivityTimer;
+
/**
* @brief Last frame when this avatar was updated
*/
@@ -204,9 +228,11 @@ class LLFloaterAvatarList : public LLFloater
LIST_DISTANCE,
LIST_POSITION,
LIST_ALTITUDE,
+ LIST_ACTIVITY,
LIST_CLIENT,
};
+
typedef void (*avlist_command_t)(const LLUUID &avatar, const std::string &name);
/**
View
3  indra/newview/llinventorybridge.cpp
@@ -2895,7 +2895,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
if (is_movable)
{
- is_movable = (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
+ is_movable = (!RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) ||
+ (RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
}
}
// [/RLVa:KB]
View
3  indra/newview/llviewerobject.h
@@ -676,8 +676,9 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator
// extra data sent from the sim...currently only used for tree species info
U8* mData;
-
+public://Jay: IDGAF
LLPointer<LLViewerPartSourceScript> mPartSourcep; // Particle source associated with this object.
+protected:
LLAudioSourceVO* mAudioSourcep;
F32 mAudioGain;
View
3  indra/newview/llvoavatar.h
@@ -992,6 +992,9 @@ class LLVOAvatar :
LLFrameTimer mTimeVisible;
std::deque<LLChat> mChats;
BOOL mTyping;
+public:
+ BOOL isTyping(){ return mTyping; }
+private:
LLFrameTimer mTypingTimer;
static void on_avatar_name_response(const LLUUID& agent_id, const LLAvatarName& av_name, void *userdata);
View
5 indra/newview/pipeline.cpp
@@ -3105,6 +3105,8 @@ void renderSoundHighlights(LLDrawable* drawablep)
}
}
+void updateParticleActivity(LLDrawable *drawablep);
+
void LLPipeline::postSort(LLCamera& camera)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
@@ -3235,6 +3237,9 @@ void LLPipeline::postSort(LLCamera& camera)
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
llpushcallstacks ;
+
+ forAllVisibleDrawables(updateParticleActivity);
+
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
static const LLCachedControl<bool> beacons_visible("BeaconsVisible", false);
if (beacons_visible && !sShadowRender)
View
BIN  indra/newview/skins/default/textures/avatar_gone.tga
Binary file not shown
View
BIN  indra/newview/skins/default/textures/avatar_new.tga
Binary file not shown
View
BIN  indra/newview/skins/default/textures/avatar_typing.tga
Binary file not shown
View
BIN  indra/newview/skins/default/textures/particles_scan.tga
Binary file not shown
View
3  indra/newview/skins/default/xui/en-us/floater_radar.xml
@@ -13,7 +13,8 @@
<column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)"/>
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
- <column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
+ <column name="activity" label="Act." width="24" tool_tip="Activity"/>
+ <column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
</scroll_list>
<tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false"

No commit comments for this range

Something went wrong with that request. Please try again.