eezstreet Posted October 1, 2014 Posted October 1, 2014 Yes, it's because of the way the missile code works. 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. Stoiss likes this
JediBantha Posted October 4, 2014 Author Posted October 4, 2014 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;
eezstreet Posted October 4, 2014 Posted October 4, 2014 Yes. The first two lines are referring to what I'm talking about.
eezstreet Posted October 5, 2014 Posted October 5, 2014 Figure out what it's doing there. I've already mentioned this once before in this thread
JediBantha Posted October 5, 2014 Author Posted October 5, 2014 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( ¢->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 ); }
eezstreet Posted October 9, 2014 Posted October 9, 2014 I don't understand, what are you wanting to do?
JediBantha Posted October 9, 2014 Author Posted October 9, 2014 Well... I'm trying to make the actual missile play it's specified effect (<weapon>/shot.efx), instead of just being invisible when fired.
JediBantha Posted October 22, 2014 Author Posted October 22, 2014 Since I am now comparing Destruction to a typical fireball, what lines of code in "WP_FireConcussion" and "WP_FireThermalDetonator" would be an ideal build for shooting off a fireball without it bouncing on the ground?
JediBantha Posted November 29, 2014 Author Posted November 29, 2014 @@eezstreetSorry 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now