aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhudeffectlookat.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-05 16:19:06 -0700
committerJacek Antonelli2010-06-19 02:43:31 -0500
commitf7ebdef157eba6ced63bb73472c5a965cbaf41bc (patch)
tree14656142459602baadedd8573b1642b502d3d82e /linden/indra/newview/llhudeffectlookat.cpp
parentPotential fix for #330 (messages in queue cause a crash when logging back in) (diff)
downloadmeta-impy-f7ebdef157eba6ced63bb73472c5a965cbaf41bc.zip
meta-impy-f7ebdef157eba6ced63bb73472c5a965cbaf41bc.tar.gz
meta-impy-f7ebdef157eba6ced63bb73472c5a965cbaf41bc.tar.bz2
meta-impy-f7ebdef157eba6ced63bb73472c5a965cbaf41bc.tar.xz
Reverted cedce34e in favor of the coolviewer anti-show look at patch (fixes the crash in #322). Kept the debug setting the same
Diffstat (limited to 'linden/indra/newview/llhudeffectlookat.cpp')
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index 7de5f14..60b2b89 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -287,36 +287,18 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys)
287 287
288 // pack both target object and position 288 // pack both target object and position
289 // position interpreted as offset if target object is non-null 289 // position interpreted as offset if target object is non-null
290 ELookAtType target_type = mTargetType;
291 LLVector3d target_offset_global = mTargetOffsetGlobal;
292 LLViewerObject* target_object = (LLViewerObject*) mTargetObject;
293
294 LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject;
295 bool is_self = source_avatar-> isSelf();
296 bool is_private = gSavedSettings.getBOOL("PrivateLookAtTarget");
297
298 if (is_private && is_self)
299 {
300 //this mimicks own avatar selected, consider not to change this
301 //because bots could profile other settings for evil client detection
302 target_type = LOOKAT_TARGET_SELECT;
303 target_offset_global.setVec(5.0, 0.0, 0.0);
304 target_object = mSourceObject;
305 }
306
307
308 if (mTargetObject) 290 if (mTargetObject)
309 { 291 {
310 htonmemcpy(&(packed_data[TARGET_OBJECT]), target_object->mID.mData, MVT_LLUUID, 16); 292 htonmemcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16);
311 } 293 }
312 else 294 else
313 { 295 {
314 htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); 296 htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16);
315 } 297 }
316 298
317 htonmemcpy(&(packed_data[TARGET_POS]), target_offset_global.mdV, MVT_LLVector3d, 24); 299 htonmemcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24);
318 300
319 U8 lookAtTypePacked = (U8)target_type; 301 U8 lookAtTypePacked = (U8)mTargetType;
320 302
321 htonmemcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1); 303 htonmemcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1);
322 304