diff options
Diffstat (limited to 'indra/newview/llhudeffectbeam.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llhudeffectbeam.cpp | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index 43a8dd1d81..54e683e048 100644..100755 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -2,31 +2,25 @@ * @file llhudeffectbeam.cpp * @brief LLHUDEffectBeam class implementation * - * $LicenseInfo:firstyear=2002&license=viewergpl$ - * - * Copyright (c) 2002-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -84,7 +78,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) { if (!mSourceObject) { - llwarns << "Missing source object!" << llendl; + LL_WARNS() << "Missing source object!" << LL_ENDL; } // Pack the default data @@ -121,7 +115,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) { - llerrs << "Got beam!" << llendl; + LL_ERRS() << "Got beam!" << LL_ENDL; BOOL use_target_object; LLVector3d new_target; U8 packed_data[41]; @@ -132,7 +126,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != 41) { - llwarns << "Beam effect with bad size " << size << llendl; + LL_WARNS() << "Beam effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 41, blocknum); @@ -178,7 +172,7 @@ void LLHUDEffectBeam::setSourceObject(LLViewerObject *objp) { if (objp->isDead()) { - llwarns << "HUDEffectBeam: Source object is dead!" << llendl; + LL_WARNS() << "HUDEffectBeam: Source object is dead!" << LL_ENDL; mSourceObject = NULL; return; } @@ -216,7 +210,7 @@ void LLHUDEffectBeam::setTargetObject(LLViewerObject *objp) { if (mTargetObject->isDead()) { - llwarns << "HUDEffectBeam: Target object is dead!" << llendl; + LL_WARNS() << "HUDEffectBeam: Target object is dead!" << LL_ENDL; } mTargetObject = objp; @@ -301,16 +295,21 @@ void LLHUDEffectBeam::render() F32 alpha = mFadeInterp.getCurVal()*mColor.mV[3]; alpha *= mInterpFade[i].getCurVal(); coloru.mV[3] = (U8)alpha; - glColor4ubv(coloru.mV); + gGL.color4ubv(coloru.mV); - glPushMatrix(); - glTranslatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]); - glScalef(scale, scale, scale); - gSphere.render(0); - glPopMatrix(); + gGL.pushMatrix(); + gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]); + gGL.scalef(scale, scale, scale); + gSphere.render(); + gGL.popMatrix(); } } +void LLHUDEffectBeam::renderForTimer() +{ + render(); +} + void LLHUDEffectBeam::setupParticle(const S32 i) { LLVector3d start_pos_global; |