diff options
Diffstat (limited to 'linden/indra/newview/llhudeffectbeam.cpp')
-rw-r--r-- | linden/indra/newview/llhudeffectbeam.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/linden/indra/newview/llhudeffectbeam.cpp b/linden/indra/newview/llhudeffectbeam.cpp index a7c1214..f6dff50 100644 --- a/linden/indra/newview/llhudeffectbeam.cpp +++ b/linden/indra/newview/llhudeffectbeam.cpp | |||
@@ -83,9 +83,30 @@ LLHUDEffectBeam::~LLHUDEffectBeam() | |||
83 | 83 | ||
84 | void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) | 84 | void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) |
85 | { | 85 | { |
86 | if (!mSourceObject) | 86 | LLViewerObject* source_object = (LLViewerObject*)mSourceObject; |
87 | |||
88 | if (!source_object) | ||
89 | { | ||
90 | markDead(); | ||
91 | return; | ||
92 | } | ||
93 | else if (!source_object->isAvatar()) | ||
87 | { | 94 | { |
88 | llwarns << "Missing source object!" << llendl; | 95 | LL_DEBUGS("HUDEffect")<<"Non-Avatar HUDEffectBeam message for ID: " |
96 | << source_object->getID().asString()<< LL_ENDL; | ||
97 | markDead(); | ||
98 | return; | ||
99 | } | ||
100 | else | ||
101 | { | ||
102 | LLVOAvatar* source_avatar = (LLVOAvatar*)source_object; | ||
103 | if (!source_avatar->isSelf()) | ||
104 | { | ||
105 | LL_DEBUGS("HUDEffect")<<"Non-self HUDEffectBeam message for ID: " | ||
106 | << source_avatar->getID().asString()<< LL_ENDL; | ||
107 | markDead(); | ||
108 | return; | ||
109 | } | ||
89 | } | 110 | } |
90 | 111 | ||
91 | // Pack the default data | 112 | // Pack the default data |