void FX_DisruptorMainShot( vec3_t start, vec3_t end )
{
	FX_AddLine( start, end, 0.1f, 4.0f, 0.0f, 
							1.0f, 0.0f, 0.0f,
							WHITE, WHITE, 0.0f,
							120, cgi_R_RegisterShader( "gfx/effects/redLine" ), 
							FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
}
Example #2
0
void FX_ConcAltShot( vec3_t start, vec3_t end )
{
	//"concussion/beam"
	FX_AddLine( -1, start, end, 0.1f, 10.0f, 0.0f, 
							1.0f, 0.0f, 0.0f,
							WHITE, WHITE, 0.0f,
							175, cgi_R_RegisterShader( "gfx/effects/blueLine" ), 
							0, FX_SIZE_LINEAR | FX_ALPHA_LINEAR );

	vec3_t	BRIGHT={0.75f,0.5f,1.0f};

	// add some beef
	FX_AddLine( -1, start, end, 0.1f, 7.0f, 0.0f, 
						1.0f, 0.0f, 0.0f,
						BRIGHT, BRIGHT, 0.0f,
						150, cgi_R_RegisterShader( "gfx/misc/whiteline2" ), 
						0, FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
}
/*
---------------------------
FX_DisruptorAltShot
---------------------------
*/
void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge )
{
	FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, 
							1.0f, 0.0f, 0.0f,
							WHITE, WHITE, 0.0f,
							175, cgi_R_RegisterShader( "gfx/effects/redLine" ), 
							FX_SIZE_LINEAR | FX_ALPHA_LINEAR );

	if ( fullCharge )
	{
		vec3_t	YELLER={0.8f,0.7f,0.0f};

		// add some beef
		FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, 
							1.0f, 0.0f, 0.0f,
							YELLER, YELLER, 0.0f,
							150, cgi_R_RegisterShader( "gfx/misc/whiteline2" ), 
							FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
	}
}
Example #4
0
static void CG_DoGlassQuad( vec3_t p[4], vec2_t uv[4], bool stick, int time, vec3_t dmgDir )
{
	float	bounce;
	vec3_t	rotDelta;
	vec3_t	vel, accel;
	vec3_t	rgb1;

	VectorSet( vel, Q_flrand(-1.0f, 1.0f) * 12, Q_flrand(-1.0f, 1.0f) * 12, -1 );

	if ( !stick )
	{
		// We aren't a motion delayed chunk, so let us move quickly
		VectorMA( vel, 0.3f, dmgDir, vel );
	}

	// Set up acceleration due to gravity, 800 is standard QuakeIII gravity, so let's use something close
	VectorSet( accel, 0.0f, 0.0f, -(600.0f + Q_flrand(0.0f, 1.0f) * 100.0f ) );

	VectorSet( rgb1, 1.0f, 1.0f, 1.0f );

	// Being glass, we don't want to bounce much
	bounce = Q_flrand(0.0f, 1.0f) * 0.2f + 0.15f;

	// Set up our random rotate, we only do PITCH and YAW, not ROLL.  This is something like degrees per second
	VectorSet( rotDelta, Q_flrand(-1.0f, 1.0f) * 40.0f, Q_flrand(-1.0f, 1.0f) * 40.0f, 0.0f );

	CPoly *pol = FX_AddPoly(p, uv, 4,			// verts, ST, vertCount
			vel, accel,				// motion
			0.15f, 0.0f, 85.0f,		// alpha start, alpha end, alpha parm ( begin alpha fade when 85% of life is complete )
			rgb1, rgb1, 0.0f,		// rgb start, rgb end, rgb parm ( not used )
			rotDelta, bounce, time,	// rotation amount, bounce, and time to delay motion for ( zero if no delay );
			3500 + Q_flrand(0.0f, 1.0f) * 1000,	// life
			cgi_R_RegisterShader( "gfx/misc/test_crackle" ),
			FX_APPLY_PHYSICS | FX_ALPHA_NONLINEAR | FX_USE_ALPHA );

	if ( Q_flrand(0.0f, 1.0f) > 0.95f && pol )
	{
		pol->AddFlags( FX_IMPACT_RUNS_FX | FX_KILL_ON_IMPACT );
		pol->SetImpactFxID( theFxScheduler.RegisterEffect( "misc/glass_impact" ));
	}
}
Example #5
0
//---------------------------------------------
void FX_DEMP2_AltDetonate( vec3_t org, float size )
{
	localEntity_t	*ex;

	ex = CG_AllocLocalEntity();
	ex->leType = LE_FADE_SCALE_MODEL;
	memset( &ex->refEntity, 0, sizeof( refEntity_t ));

	ex->refEntity.renderfx |= RF_VOLUMETRIC;

	ex->startTime = cg.time;
	ex->endTime = ex->startTime + 1300;
	
	ex->radius = size;
	ex->refEntity.customShader = cgi_R_RegisterShader( "gfx/effects/demp2shell" );

	ex->refEntity.hModel = cgi_R_RegisterModel( "models/items/sphere.md3" );
	VectorCopy( org, ex->refEntity.origin );
		
	ex->color[0] = ex->color[1] = ex->color[2] = 255.0f;
}
Example #6
0
//------------------------------------------------------
int SFxHelper::RegisterShader( const char *shader )
{
	return cgi_R_RegisterShader( shader );
}
Example #7
0
//------------------------------------------------------
int SFxHelper::RegisterShader( const gsl::cstring_view& shader )
{
	// TODO: it would be nice to change the ABI here to allow for passing of string views
	return cgi_R_RegisterShader( std::string( shader.begin(), shader.end() ).c_str() );
}
Example #8
0
void FX_ConcAltMiss( vec3_t origin, vec3_t normal )
{
	vec3_t pos, c1, c2;

	VectorMA( origin, 4.0f, normal, c1 );
	VectorCopy( c1, c2 );
	c1[2] += 4;
	c2[2] += 12;
	
	VectorAdd( origin, normal, pos );
	pos[2] += 28;

	FX_AddBezier( origin, pos, c1, vec3_origin, c2, vec3_origin, 6.0f, 6.0f, 0.0f, 0.0f, 0.2f, 0.5f, WHITE, WHITE, 0.0f, 4000, cgi_R_RegisterShader( "gfx/effects/smokeTrail" ), FX_ALPHA_WAVE );

	theFxScheduler.PlayEffect( "concussion/alt_miss", origin, normal );
}