Jump to content

From Concussion to Destruction (Help)


Recommended Posts

The effect is based on what you pass in s.weapon. Look in the events, there's one that handles the missile draw, I'm pretty sure. If not that, then cg_ents.cpp handles it.

 

Is this what you meant? (cg_ents)

 

 

if ( weapon->missileTrailFunc )  
weapon->missileTrailFunc( cent, weapon );
 
// add dynamic light
if ( wData->missileDlight )
cgi_R_AddLightToScene(cent->lerpOrigin, wData->missileDlight, 
wData->missileDlightColor[0], wData->missileDlightColor[1], wData->missileDlightColor[2] );
 
// add missile sound
if ( weapon->missileSound )
cgi_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->missileSound );
 
//Don't draw something without a model
if ( weapon->missileModel == 0 )
return;
}
 
// create the render entity
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin);
VectorCopy( cent->lerpOrigin, ent.oldorigin);
/*
Ghoul2 Insert Start
*/
CG_SetGhoul2Info(&ent, cent);  
 
/*
Ghoul2 Insert End
*/
 
// flicker between two skins
ent.skinNum = cg.clientFrame & 1;
ent.renderfx = /*weapon->missileRenderfx | */RF_NOSHADOW;
 
if ( cent->gent->alt_fire )
ent.hModel = weapon->alt_missileModel;
else
ent.hModel = weapon->missileModel;
Link to comment

Could I apply these lines to another weapon model, somehow?

 

 

if ( !Q_stricmp( token, "bladeEffect" ) ) 
{
if ( COM_ParseString( &p, &value ) ) 
{
continue;
}
saber->bladeEffect = G_EffectIndex( (char *)value );
continue;
}
 
if (  !WP_SaberBladeUseSecondBladeStyle( &cent->gent->client->ps.saber[saberNum], bladeNum )
&& cent->gent->client->ps.saber[saberNum].bladeEffect )
{
CG_PlayEffectIDBolted( cent->gent->client->ps.saber[saberNum].bladeEffect, modelIndex, bolt, scent->currentState.clientNum, scent->lerpOrigin, -1, qfalse );
}
Link to comment
  • 2 weeks later...
  • 1 month later...

@@eezstreet

Sorry for being a dick earlier, had a lot going on.

 

As of right now, I'm still using the "Conc-Paste" method:

 

 
static void ForceDestructionMissile(gentity_t *ent)
{
vec3_t start;
vec3_t dir;
int radius = forceDestructionRadius[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]];
int damage = forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]];
float vel = 2600;
 
if (ent->s.number >= MAX_CLIENTS)
{
vec3_t angles;
vectoangles(forwardVec, angles);
angles[PITCH] += (crandom() * (CONC_NPC_SPREAD + (6 - ent->NPC->currentAim)*0.25f));
angles[YAW] += (crandom() * (CONC_NPC_SPREAD + (6 - ent->NPC->currentAim)*0.25f));
AngleVectors(angles, forwardVec, vrightVec, up);
}
 
if (ent->client->ps.forcePowersActive & (1 << FP_RAGE))
{
damage *= 2;
}
 
VectorCopy(ent->client->renderInfo.handLPoint, start);
AngleVectors(ent->client->ps.viewangles, dir, NULL, NULL);
 
WP_TraceSetStart(ent, start, vec3_origin, vec3_origin);
 
gentity_t *missile = CreateMissile(start, dir, vel, 10000, ent);
 
WP_MissileTargetHint(ent, muzzle, forwardVec);
 
missile->classname = "destruct_proj";
missile->s.weapon = WP_DESTRUCTION;
missile->mass = 10;
 
if (ent->s.number != 0)
{
if (g_spskill->integer == 0)
{
damage = ceil(forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]] * 0.15f);
}
else if (g_spskill->integer == 1)
{
damage = ceil(forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]] * 0.30f);
}
else
{
damage = ceil(forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]] * 0.50f);
}
}
 
VectorSet(missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE);
VectorScale(missile->maxs, -1, missile->mins);
 
missile->dflags = DAMAGE_EXTRA_KNOCKBACK | DAMAGE_HEAVY_WEAP_CLASS;
 
missile->methodOfDeath = MOD_FORCE_DESTRUCTION;
missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION;
 
missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER;
 
missile->damage = damage;
missile->splashDamage = damage;
missile->splashRadius = radius;
missile->bounceCount = 0;
}
 

 

https://lh6.googleusercontent.com/-AyZ8ErnUalo/VHk0LL41CkI/AAAAAAAAAFo/2Yk5GmrwYZo/w1024-h768-no/shot2014-11-28_20-33-50.gif

 

Red flash = Under where the .efx is supposed to be.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...