STORM-1878: Blocking an avatar does not derender worn lights
Review Request #583 - Created June 10, 2012 and submitted
MartinRJ Fayray | Reviewers | ||
3.3.2 | viewer | ||
STORM-1878 | davep | ||
None | viewer-release |
An avatar currently gets derendered/invisible when the user blocks it. The local lights attached to that avatar have to become erased too. Repository: https://bitbucket.org/MartinRJ/storm-1878
Tested with 1-6 local attached lights on the target avatar. Blocking/muting the avatar also disabled the attached lights in all tests successfully.
indra/newview/llmutelist.cpp | |||
---|---|---|---|
Revision 29143d1fc6fa | New Change | ||
... | 36 lines hidden [Expand] | ||
37 |
* show in list whether chatter is avatar or object
|
37 |
* show in list whether chatter is avatar or object
|
38 |
*
|
38 |
*
|
39 |
* need fast lookup by id
|
39 |
* need fast lookup by id
|
40 |
* need lookup by name, doesn't have to be fast
|
40 |
* need lookup by name, doesn't have to be fast
|
41 |
*/
|
41 |
*/
|
42 | 42 | ||
43 |
#include "llviewerprecompiledheaders.h"
|
43 |
#include "llviewerprecompiledheaders.h"
|
44 | 44 | ||
45 |
#include "llmutelist.h"
|
45 |
#include "llmutelist.h"
|
46 | 46 | ||
47 |
#include "pipeline.h"
|
||
48 | |||
47 |
#include <boost/tokenizer.hpp>
|
49 |
#include <boost/tokenizer.hpp>
|
48 | 50 | ||
49 |
#include "lldispatcher.h"
|
51 |
#include "lldispatcher.h"
|
50 |
#include "llxfermanager.h"
|
52 |
#include "llxfermanager.h"
|
51 | 53 | ||
52 |
#include "llagent.h"
|
54 |
#include "llagent.h"
|
53 |
#include "llviewergenericmessage.h" // for gGenericDispatcher |
55 |
#include "llviewergenericmessage.h" // for gGenericDispatcher |
54 |
#include "llworld.h" //for particle system banning |
56 |
#include "llworld.h" //for particle system banning |
55 |
#include "llimview.h"
|
57 |
#include "llimview.h"
|
56 |
#include "llnotifications.h"
|
58 |
#include "llnotifications.h"
|
... | 128 lines hidden [Expand] | ||
BOOL LLMuteList::isLinden(const std::string& name) const |
|||
185 |
tokenizer::iterator token_iter = tokens.begin(); |
187 |
tokenizer::iterator token_iter = tokens.begin(); |
186 |
|
188 |
|
187 |
if (token_iter == tokens.end()) return FALSE; |
189 |
if (token_iter == tokens.end()) return FALSE; |
188 |
token_iter++; |
190 |
token_iter++; |
189 |
if (token_iter == tokens.end()) return FALSE; |
191 |
if (token_iter == tokens.end()) return FALSE; |
190 |
|
192 |
|
191 |
std::string last_name = *token_iter; |
193 |
std::string last_name = *token_iter; |
192 |
return last_name == "Linden"; |
194 |
return last_name == "Linden"; |
193 |
}
|
195 |
}
|
194 | 196 | ||
197 |
static LLVOAvatar* find_avatar(const LLUUID& id) |
||
198 |
{
|
||
199 |
LLViewerObject *obj = gObjectList.findObject(id); |
||
200 |
while (obj && obj->isAttachment()) |
||
201 |
{ |
||
202 |
obj = (LLViewerObject *)obj->getParent(); |
||
203 |
} |
||
204 | |||
205 |
if (obj && obj->isAvatar()) |
||
206 |
{ |
||
207 |
return (LLVOAvatar*)obj; |
||
208 |
} |
||
209 |
else |
||
210 |
{ |
||
211 |
return NULL; |
||
212 |
} |
||
213 |
}
|
||
195 | 214 | ||
196 |
BOOL LLMuteList::add(const LLMute& mute, U32 flags) |
215 |
BOOL LLMuteList::add(const LLMute& mute, U32 flags) |
197 |
{
|
216 |
{
|
198 |
// Can't mute text from Lindens |
217 |
// Can't mute text from Lindens |
199 |
if ((mute.mType == LLMute::AGENT) |
218 |
if ((mute.mType == LLMute::AGENT) |
200 |
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) |
219 |
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) |
201 |
{ |
220 |
{ |
202 |
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD()); |
221 |
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD()); |
203 |
return FALSE; |
222 |
return FALSE; |
204 |
} |
223 |
} |
... | 76 lines hidden [Expand] | ||
BOOL LLMuteList::add(const LLMute& mute, U32 flags) |
|||
281 |
updateAdd(localmute); |
300 |
updateAdd(localmute); |
282 |
notifyObservers(); |
301 |
notifyObservers(); |
283 |
if(!(localmute.mFlags & LLMute::flagParticles)) |
302 |
if(!(localmute.mFlags & LLMute::flagParticles)) |
284 |
{ |
303 |
{ |
285 |
//Kill all particle systems owned by muted task |
304 |
//Kill all particle systems owned by muted task |
286 |
if(localmute.mType == LLMute::AGENT || localmute.mType == LLMute::OBJECT) |
305 |
if(localmute.mType == LLMute::AGENT || localmute.mType == LLMute::OBJECT) |
287 |
{ |
306 |
{ |
288 |
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID); |
307 |
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID); |
289 |
} |
308 |
} |
290 |
} |
309 |
} |
310 |
//mute local lights that are attached to the avatar |
||
311 |
LLVOAvatar *avatarp = find_avatar(localmute.mID); |
||
312 |
if (avatarp) |
||
313 |
{ |
||
314 |
LLPipeline::removeMutedAVsLights(avatarp); |
||
315 |
} |
||
291 |
return TRUE; |
316 |
return TRUE; |
292 |
} |
317 |
} |
293 |
} |
318 |
} |
294 |
} |
319 |
} |
295 |
|
320 |
|
296 |
// If we were going to return success, we'd have done it by now. |
321 |
// If we were going to return success, we'd have done it by now. |
297 |
return FALSE; |
322 |
return FALSE; |
298 |
}
|
323 |
}
|
299 | 324 | ||
300 |
void LLMuteList::updateAdd(const LLMute& mute) |
325 |
void LLMuteList::updateAdd(const LLMute& mute) |
... | 439 lines hidden [Expand] |
indra/newview/pipeline.h | |
---|---|
Revision 29143d1fc6fa | New Change |
indra/newview/pipeline.cpp | |
---|---|
Revision 29143d1fc6fa | New Change |
Other reviews