diff options
| -rwxr-xr-x | doc/contributions.txt | 1 | ||||
| -rwxr-xr-x | indra/newview/lltracker.cpp | 87 | 
2 files changed, 77 insertions, 11 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 99527c0587..2a279e1c58 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -674,6 +674,7 @@ Jonathan Yap  	OPEN-161  	STORM-1953  	STORM-1957 +	STORM-1981  Kadah Coba  	STORM-1060      STORM-1843 diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index cbd16e873d..1aa61cf50e 100755 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -412,7 +412,7 @@ const std::string& LLTracker::getTrackedLocationName()  	return instance()->mTrackedLocationName;  } -F32 pulse_func(F32 t, F32 z) +F32 pulse_func(F32 t, F32 z, bool tracking_avatar)  {  	if (!LLTracker::sCheesyBeacon)  	{ @@ -420,8 +420,15 @@ F32 pulse_func(F32 t, F32 z)  	}  	t *= F_PI; -	z -= t*64.f - 256.f; -	 +	if (tracking_avatar) +	{ +		z += t*64.f - 256.f; +	} +	else +	{ +		z -= t*64.f - 256.f; +	} +  	F32 a = cosf(z*F_PI/512.f)*10.0f;  	a = llmax(a, 9.9f);  	a -= 9.9f; @@ -497,9 +504,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,  	}  	LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getFogColor(); +	LLColor4 under_color = color_frac * LLColor4::blue + (1 - color_frac) * gSky.getFogColor();  	F32 FADE_DIST = 3.f;  	fogged_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST)); +	under_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));  	LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global); @@ -508,22 +517,21 @@ void LLTracker::renderBeacon(LLVector3d pos_global,  	LLGLDisable cull_face(GL_CULL_FACE);  	LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); -	  	gGL.matrixMode(LLRender::MM_MODELVIEW);  	gGL.pushMatrix();  	{  		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]); -		 +  		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);  		gGL.color4fv(fogged_color.mV);  		const U32 BEACON_VERTS = 256; -		const F32 step = 1024.0f/BEACON_VERTS; -		 +		const F32 step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS; +  		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();  		F32 t = gRenderStartTime.getElapsedTimeF32();  		F32 dr = dist/LLViewerCamera::getInstance()->getFar(); -		 +  		for (U32 i = 0; i < BEACON_VERTS; i++)  		{  			F32 x = x_axis.mV[0]; @@ -531,9 +539,10 @@ void LLTracker::renderBeacon(LLVector3d pos_global,  			F32 z = i * step;  			F32 z_next = (i+1)*step; -		 -			F32 a = pulse_func(t, z); -			F32 an = pulse_func(t, z_next); + +			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR; +			F32 a = pulse_func(t, z, tracking_avatar); +			F32 an = pulse_func(t, z_next, tracking_avatar);  			LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);  			LLColor4 col_next = fogged_color + LLColor4(an,an,an,an); @@ -561,7 +570,63 @@ void LLTracker::renderBeacon(LLVector3d pos_global,  			gGL.vertex3f(x*a,y*a,z);  			gGL.color4fv(col_edge_next.mV);  			gGL.vertex3f(x*an,y*an,z_next); +			gGL.end(); +		} +	} +	gGL.popMatrix(); + +	gGL.pushMatrix(); +	{ +		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0); + +//		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, under_color); + +		gGL.color4fv(under_color.mV); +		const U32 BEACON_VERTS = 256; +		const F32 step = pos_agent.mV[2] / BEACON_VERTS; + +		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis(); +		F32 t = gRenderStartTime.getElapsedTimeF32(); +		F32 dr = dist/LLViewerCamera::getInstance()->getFar(); + +		for (U32 i = 0; i < BEACON_VERTS; i++) +		{ +			F32 x = x_axis.mV[0]; +			F32 y = x_axis.mV[1]; +			 +			F32 z = i * step; +			F32 z_next = (i+1)*step; + +			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR; +			F32 a = pulse_func(t, z, tracking_avatar); +			F32 an = pulse_func(t, z_next, tracking_avatar); +			 +			LLColor4 c_col = under_color + LLColor4(a,a,a,a); +			LLColor4 col_next = under_color + LLColor4(an,an,an,an); +			LLColor4 col_edge = under_color * LLColor4(a,a,a,0.0f); +			LLColor4 col_edge_next = under_color * LLColor4(an,an,an,0.0f); +			 +			a *= 2.f; +			a += 1.0f+dr; +			 +			an *= 2.f; +			an += 1.0f+dr; +		 +			gGL.begin(LLRender::TRIANGLE_STRIP); +			gGL.color4fv(col_edge.mV); +			gGL.vertex3f(-x*a, -y*a, z); +			gGL.color4fv(col_edge_next.mV); +			gGL.vertex3f(-x*an, -y*an, z_next); +			gGL.color4fv(c_col.mV); +			gGL.vertex3f(0, 0, z); +			gGL.color4fv(col_next.mV); +			gGL.vertex3f(0, 0, z_next); +			 +			gGL.color4fv(col_edge.mV); +			gGL.vertex3f(x*a,y*a,z); +			gGL.color4fv(col_edge_next.mV); +			gGL.vertex3f(x*an,y*an,z_next);  			gGL.end();  		}  	}  | 
